scrapkats Posted July 22, 2008 Posted July 22, 2008 Hi When a person clicks on the Buy Now button to purchase a product, they are then immediately taken back to the new products page, rather than staying in the category they were in. If they click on the more detail button and then buy - they stay put. How can I change this so that once they hit buy now, they stay within the category, rather than going back to the new products page? Which file would I need to edit? Thank you for your time. Regards Kathryn "Life is short, break the rules, forgive quickly, kiss slowly, love truly, laugh uncontrollably, and never regret anything that made you smile."
jamartin Posted July 22, 2008 Posted July 22, 2008 Hi. I can only think about two little things to fix. In first place, be sure that the buy_now button is intended to leave you to the same category page. You can check if the link asociated to the button is example.com/index.php?cPath=57&action=buy_now&products_id=340. If you have something like that, then it is right. But if you have something like example.com/new_products.php?action=buy_now&products_id=340 then you have modified a little how the links are generated. When you locate the file that generates the listing of the products (ussally catalog/includes/modules/listing_products.php or catalog/includes/modules/products_new.php), look for the tep_href_link() function, and ensure that it uses this as the first parameter : basename($PHP_SELF) If that doesn't help, then probably you have something wrong in the catalog/includes/application_top.php. Try looking for the code that handles each action value, usually a switch ($action), and then the case 'buy_now'. There is a tep_redirect() in that code, and check that it points to the correct page using basename($PHP_SELF). Regards, Hey!!... I still need help with this http://www.oscommerce.com/forums/index.php?showtopic=309208. Please, take a look on it.
scrapkats Posted July 23, 2008 Author Posted July 23, 2008 Hi. I can only think about two little things to fix. In first place, be sure that the buy_now button is intended to leave you to the same category page. You can check if the link asociated to the button is example.com/index.php?cPath=57&action=buy_now&products_id=340. If you have something like that, then it is right. But if you have something like example.com/new_products.php?action=buy_now&products_id=340 then you have modified a little how the links are generated. When you locate the file that generates the listing of the products (ussally catalog/includes/modules/listing_products.php or catalog/includes/modules/products_new.php), look for the tep_href_link() function, and ensure that it uses this as the first parameter : basename($PHP_SELF) If that doesn't help, then probably you have something wrong in the catalog/includes/application_top.php. Try looking for the code that handles each action value, usually a switch ($action), and then the case 'buy_now'. There is a tep_redirect() in that code, and check that it points to the correct page using basename($PHP_SELF). Regards, Thank you for that, I will look and see what it says and change. Regards Kathryn "Life is short, break the rules, forgive quickly, kiss slowly, love truly, laugh uncontrollably, and never regret anything that made you smile."
Recommended Posts
Archived
This topic is now archived and is closed to further replies.