Magento quantity field doesn't work

浪子不回头ぞ 提交于 2019-12-24 11:29:48

问题


i simply can't find a solution to my problem! The quantity field worked as it should. After a few months of programming on the whole shop, i wanted to test the quantity field and recognized that it doesn't function.

I only can add one product to the cart although i typed “3” in the quantity field.

I didn’t change anything in product/view.phtml and addtocart.phtml. Don't know where i have to search for this error. Maybe someone can give me a tip...

greets max


回答1:


The quantity field is used in the various product type prepareForCart functions. Did you override any of your product classes?




回答2:


solved

In my case, the button add to cart had not the original

onclick="productAddToCartForm.submit(this)"

With this method is not only the product submitted, the quantity is beeing submitted, too. In my on click was

onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"

This sent the data via GET and did it always without the quantity. Personaly I do not know, what, why or when the change occured to the view.phtml.

Hope this helps :)



来源:https://stackoverflow.com/questions/2958750/magento-quantity-field-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!