Jump to content

[SOLVED] "Add to Cart" ignoring quantity


Recommended Posts

Sorry, still learning my way around this forum. I posted this somewhere else and realized it should be here, but can't figure out how to delete my other post. Anyway...

 

Running 1.5.5.0 on IIS 6.0, PHP 5.3.2, and MySQL 5.1.34-community. I've loaded a few dozen products and assigned categories.

 

I bring a single product on screen, change the quantity (say, 5) and click "Add to Cart." The icon magically floats across the screen and spawns the correct shopping cart entry, but the quantity is 1. This happens every time, with different products and quantities. Have I missed something?

 

ADDENDUM 9/5/2013: I also copied the site/data to a different server running Ubuntu/PHP/MySQL and get the same faulty behavior.

Edited by yankeerudy (see edit history)
Link to comment
Share on other sites

Sorry, still learning my way around this forum. I posted this somewhere else and realized it should be here, but can't figure out how to delete my other post. Anyway...

 

Running 1.5.5.0 on IIS 6.0, PHP 5.3.2, and MySQL 5.1.34-community. I've loaded a few dozen products and assigned categories.

 

I bring a single product on screen, change the quantity (say, 5) and click "Add to Cart." The icon magically floats across the screen and spawns the correct shopping cart entry, but the quantity is 1. This happens every time, with different products and quantities. Have I missed something?

 

ADDENDUM 9/5/2013: I also copied the site/data to a different server running Ubuntu/PHP/MySQL and get the same faulty behavior.

 

 

Hello, I can't actually reproduce this issue you are having. Have you tried doing this with the default theme? Let me know if it works. It may be your themes configuration if you are using a different theme. 

Link to comment
Share on other sites

  • 2 weeks later...

I was able to solve the problem on the default theme, I had made some modifications in product.tpl that caused this - In the product.tpl both the quantity part and the add to cart button need to be under the same instance of <form id="buy_block"> for it to work.

Link to comment
Share on other sites

I was able to solve the problem on the default theme, I had made some modifications in product.tpl that caused this - In the product.tpl both the quantity part and the add to cart button need to be under the same instance of <form id="buy_block"> for it to work.

 

I was able to solve the problem on the default theme, I had made some modifications in product.tpl that caused this - In the product.tpl both the quantity part and the add to cart button need to be under the same instance of <form id="buy_block"> for it to work.

 

Usually add to cart issues can be debugged by switching to the default theme (make sure to have a back up or test replica store) .. Then you can see if the problem is with the PrestaShop files or your theme. 

Link to comment
Share on other sites

Yes, Benjamin. After two such instances I have added "Flip back to the default theme and double check" as a primary debugging step in my arsenal!

 

 

You should totally have a testing environment as well. Replicate your store on a localhost and make any template or module or code changes directly to the local replicated site. That way, you can see problems and solve them before you change your live store (and business) 

 

That is one of the most important pieces of advice I can give, test any changes locally before you touch your live store. 

Link to comment
Share on other sites

  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...