son Posted November 7, 2008 Share Posted November 7, 2008 Is it possible to have an add-to-basket button in form, which references another page/script to add the item to, but use the same item/amount values to add to a session on current page? I would like to find a way to display item count and total amount on product page while keeping the add to cart and shopping cart itself the way they are...Son Link to comment Share on other sites More sharing options...
Jesdisciple Posted November 7, 2008 Share Posted November 7, 2008 Do you mean you want to add an item to the cart without loading a new page? If so, see AJAX. Link to comment Share on other sites More sharing options...
son Posted November 11, 2008 Author Share Posted November 11, 2008 Do you mean you want to add an item to the cart without loading a new page? If so, see AJAX.I mean to have a script, which always displays the current total and number of items in cart, which is separate to actual add to cart script. Hope this makes more sense.Son Link to comment Share on other sites More sharing options...
Jesdisciple Posted November 11, 2008 Share Posted November 11, 2008 When do you expect this script to run? If it's a server-side script, why not just go ahead and add to cart? Link to comment Share on other sites More sharing options...
son Posted November 13, 2008 Author Share Posted November 13, 2008 When do you expect this script to run? If it's a server-side script, why not just go ahead and add to cart?What do you mean by your question? Did not understand what you meant? I cannot use server-side scripting, has to be client side (cannot use server side languages in shopping cart itself, but still want to show the totals in there)...Son Link to comment Share on other sites More sharing options...
Jesdisciple Posted November 13, 2008 Share Posted November 13, 2008 Oh, this is related to the other... So what should trigger the client-side script to change the total? Link to comment Share on other sites More sharing options...
son Posted November 14, 2008 Author Share Posted November 14, 2008 Oh, this is related to the other... So what should trigger the client-side script to change the total?Pressing the add to cart button. My problem is just that the add to cart button is in form, which references script which runs on the other server. Can I still access with Javascript on page I am on and then keep it on all pages when user goes to different web page on same website?Son Link to comment Share on other sites More sharing options...
Synook Posted November 14, 2008 Share Posted November 14, 2008 You could set a cookie with JS...http://www.quirksmode.org/js/cookies.html Link to comment Share on other sites More sharing options...
Jesdisciple Posted November 14, 2008 Share Posted November 14, 2008 That's the best answer in the absence of PHP, although I hope we don't run into this problem again. (And I would think this e-commerce website would have the shopping cart already set up server-side...) Link to comment Share on other sites More sharing options...
son Posted November 16, 2008 Author Share Posted November 16, 2008 That's the best answer in the absence of PHP, although I hope we don't run into this problem again. (And I would think this e-commerce website would have the shopping cart already set up server-side...)I will give it a go...Thanks,Son Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.