wheeloftime Posted December 11, 2004 Posted December 11, 2004 I can't seem to find an answer for this one: I have an option for gift wrap (just a No and a Yes with extra price) with my products but when you use the Buy Now button it doesn't add the product directly to the cart but always goes first to the product info page where you should select the option even though it shows No as default first entry. Products selected with the Buy Now buttion and without the option attached will go directly to the cart and have no interference from the product info page. Is there a way to just have the first option entry 'No' selected by default so the product will be added directly to the cart with that default option ? Any help is greatly appreciated !
♥bruyndoncx Posted December 11, 2004 Posted December 11, 2004 if gift wrap is the only option you have in your store, you could easily remove the section under case 'buy_now' in catalog/includes/application_top that checks for attributes and redirects to product info page. KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt
wheeloftime Posted December 11, 2004 Author Posted December 11, 2004 if gift wrap is the only option you have in your store, you could easily remove the section under case 'buy_now' in catalog/includes/application_top that checks for attributes and redirects to product info page. <{POST_SNAPBACK}> Hello bruyndoncx, Thanks for your reply and direction ! I will try this out and report back if it worked for me ! Grtz.
wheeloftime Posted December 11, 2004 Author Posted December 11, 2004 Hello bruyndoncx, Thanks for your reply and direction ! I will try this out and report back if it worked for me ! Grtz. <{POST_SNAPBACK}> Well, that works. I changed: // performed by the 'buy now' button in product listings and review page 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; to // performed by the 'buy now' button in product listings and review page 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); // } } $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; so it will always add to the cart directly. The only caveat of this is that on the order there is no mentioning of 'gift wrap: no' but knowing that no message means no that is not a big deal. Thanks :)
♥bruyndoncx Posted December 11, 2004 Posted December 11, 2004 just watch out if you do start to use attributes for other thngs besides gift wrap ! KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt
wheeloftime Posted December 11, 2004 Author Posted December 11, 2004 just watch out if you do start to use attributes for other thngs besides gift wrap ! <{POST_SNAPBACK}> I will....try to remember !
Recommended Posts
Archived
This topic is now archived and is closed to further replies.