danthman Posted May 9, 2011 Share Posted May 9, 2011 I made some mods to a oscommerce 2.2rc2a cart, now the Buy Now button does not work. The link is correct - action=buy_now&products_id=75 - when I mouse over the button but it does not add to cart. It goes to the cart page but it says "no products in cart". I can add products from the product info page. I have checked the mods I made and cannot find an error. Can anyone tell me what would cause this? Thanks, Dan Link to comment Share on other sites More sharing options...
web-project Posted May 9, 2011 Share Posted May 9, 2011 check the following code in application_top.php file (372-381 line): // 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; Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here! 8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself. Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues. Any issues with oscommerce, I am here to help you. Link to comment Share on other sites More sharing options...
danthman Posted May 9, 2011 Author Share Posted May 9, 2011 thanks for the suggestion but my code was just like yours. Just to make sure I put your code in and uploaded, still the same result. What else effects the buy now button? Dan Link to comment Share on other sites More sharing options...
danthman Posted May 9, 2011 Author Share Posted May 9, 2011 Actually I think your solution solved it after all. It's working fine now, Thanks! Dan Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.