Jump to content

stay on page after adding to cart


Guest unknwn

Recommended Posts

hopefully this is the right forum to post.. it is so annoying that cubecart takes you to index page after you add an item to the basket. I would like the user to stay on this same page, no matter if it is a category page or item page.

Can someone help me ( or point into the right directions ) on how to achieve it ? ( I don't want to spend $ on add to cart ajax .. ) is there any other way ?

Link to comment
Share on other sites

The javascript simply verifies that the name of the form exists on the page that the submit button was clicked. This serves two (or more) purposes: forces javascript to be turned on so that the rest of the store will function as designed, and provides a hook for further processing/modifications. This javascript is not an ajax function that sends data back to the store without a page reload.

The View Product page form would have to have a hidden field added that includes the current page, then the form processor would have to be modified to interpret that and send that page back. Unfortunately, I do not yet know what edits to the code would be required to do that.

Link to comment
Share on other sites

It is maybe the form action.

<form action="{CURRENT_URL}" method="post" id="prod{PRODUCT_ID}" name="addtobasket"  target="_self">

This should keep you at the current location. Have a look at your viewProd.tpl and see if yours looks like the above (Around line 13).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...