Guest unknwn Posted February 21, 2011 Share Posted February 21, 2011 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 ? Quote Link to comment Share on other sites More sharing options...
leeofaccy Posted February 21, 2011 Share Posted February 21, 2011 Hi Have you modified anything? When you add to basket, from either the product page or from a category page, the item should be submitted, using javascript, leaving you on the same page. Lee Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 21, 2011 Share Posted February 21, 2011 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. Quote Link to comment Share on other sites More sharing options...
leeofaccy Posted February 21, 2011 Share Posted February 21, 2011 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). Quote Link to comment Share on other sites More sharing options...
Guest unknwn Posted February 22, 2011 Share Posted February 22, 2011 thank you guys, you are correct, I did some modifications to viewProd.tpl which screwed up the code. Now everything is fixed. Thank you again.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.