Jump to content

Add to cart and display of total items/total on page


son
 Share

Recommended Posts

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

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...