bob251 Posted December 8, 2005 Posted December 8, 2005 When I try to use the Add to Cart button, such as from clicking on the Best Sellers list, nothing gets added to the cart! It always says "Cart is empty" ... But when I browse the Product category and use the Buy Now button, it works fine - the cart gets updated. Why can't I use the Add to Cart button - do I have to change code somewhere? Thanks!! :(
boberca Posted December 10, 2005 Posted December 10, 2005 When I try to use the Add to Cart button, such as from clicking on the Best Sellers list, nothing gets added to the cart! It always says "Cart is empty" ... But when I browse the Product category and use the Buy Now button, it works fine - the cart gets updated. Why can't I use the Add to Cart button - do I have to change code somewhere? Thanks!! :( Same problem here. Pretty sure config.php doesn't have to do anything with it. Will dig into that, owever if someone aware of the solution please post. I'm loosing my sleep :angry:
bob251 Posted December 16, 2005 Author Posted December 16, 2005 Same problem here. Pretty sure config.php doesn't have to do anything with it. Will dig into that, owever if someone aware of the solution please post. I'm loosing my sleep :angry: I found the fix! At least it works for me ... After a lot of head-scratching (and I don't have much hair to begin with), I noticed that the Add to Cart button was working from the Write Reviews page, but not from the Product Info page. Turns out the Reviews page uses 'action=buy_now' (which is the same 'Buy Now' functionality that currently works) while the Product Info page uses 'action=add_product' So I edited the product_info.php file and changed 'action=add_product' to 'action=buy_now' and IT WORKS. Why the 'add_product' variable is not working is a mystery to me, especially since it was in the original osCommerce code, unmodified. Weird. Anyway, the cart now behaves itself, which is a huge relief.
Guest Posted December 16, 2005 Posted December 16, 2005 That is not a good solution as if the product has attributes it'll just bounce the customer back to the product page. The best solution is to find out why the action is not working and fix the root problem. Maybe a missing form end tag? Check your HTML that is output to make sure the form is closed correctly.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.