cyrill666 Posted March 21, 2005 Share Posted March 21, 2005 Hi, I'm busy modifying a standard install to work with a florist site I'm developing. One thing I'm trying to achieve is to force a specified category summary page to be shown after the user has added an item to their cart: 1) Customer picks flowers 2) Clicks "Buy Now" from category summary list. 3) Item added to cart and shown specified category summary list (of extras). So far I "think" I've found the code I need to alter in application_top.php: case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) { if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'])); } else { $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; I believe it's the last tep_redirect that needs modifying. I've tried to repalce it with this hardcoded redirect tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=21')); ... but it generates a 404 error. Confused... any help would be appreciated at this point. Kind regards, Gary. Link to comment Share on other sites More sharing options...
boxtel Posted March 21, 2005 Share Posted March 21, 2005 Hi, I'm busy modifying a standard install to work with a florist site I'm developing. One thing I'm trying to achieve is to force a specified category summary page to be shown after the user has added an item to their cart: 1) Customer picks flowers 2) Clicks "Buy Now" from category summary list. 3) Item added to cart and shown specified category summary list (of extras). So far I "think" I've found the code I need to alter in application_top.php: case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) { if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) { tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'])); } else { $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; I believe it's the last tep_redirect that needs modifying. I've tried to repalce it with this hardcoded redirect tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=21')); ... but it generates a 404 error. Confused... any help would be appreciated at this point. Kind regards, Gary. <{POST_SNAPBACK}> sure you have a FILENAME_CATEGORIES defined, sure it is not FILENAME_DEFAULT ? Treasurer MFC Link to comment Share on other sites More sharing options...
cyrill666 Posted March 21, 2005 Author Share Posted March 21, 2005 sure you have a FILENAME_CATEGORIES defined, sure it is not FILENAME_DEFAULT ? <{POST_SNAPBACK}> You are quite right, I should have been using FILENAME_DEFAULT, it now works a treat - thank you very much. Kind regards, Gary. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.