Magento.结帐购物车中的数量无法正常使用 [英] Magento. Quantity in checkout shopping cart doesn't work properly
问题描述
我已经安装了Magento 1.8.0,并且在本地主机上,购物车运行正常. 我更改购物车中产品的数量,然后按更新购物车"按钮,一切正常. 我已在线转移了该网站,但购物车数量不再起作用. 当我更改产品的数量并单击按钮时,数量保持不变.如果我返回并尝试将相同的产品添加到购物车,即使我指定了不同的数量(例如10而不是1),在购物车中,每当我单击添加到购物车"按钮时,只会添加1个商品,而不是指定为10. 我不知道问题出在哪里.我排除了自定义主题,然后回滚到默认主题,问题仍然存在. 我将magento更新为1.8.1,并且遇到了同样的问题.
I have installed Magento 1.8.0 and on localhost the cart is working correctly. I change the quantity of a product in the cart then I push the "Update cart" button and all works fine. I trasferred the site online and the cart quantity doesn't work anymore. As I change the quantity of a product and click the button the quantity remains the same. If I go back and try to add the same product to the cart, even if I specify a different quantity like 10 and not 1, in the cart only 1 item is added every time I click on "add to the cart" button and not 10 as specified. I cannot figure out where's the problem. I excluded my custom theme and rolled back to the default theme and the problem persist. I updated magento to 1.8.1 and the same problem.
推荐答案
在主题目录中
在您的/app/design/frontend/yourthemepackage/default/template/checkout/cart.phtml文件中或/app/design/frontend/default/yourtheme/template/checkout/cart.phtml文件中
In your /app/design/frontend/yourthemepackage/default/template/checkout/cart.phtml file or /app/design/frontend/default/yourtheme/template/checkout/cart.phtml file
只需将第50行放在getUrl('checkout/cart/updatePost')吗?>"method =" post>粘贴以下代码之后
Just place on line 50 just after getUrl('checkout/cart/updatePost') ?>" method="post"> paste the below code
<?php echo $this->getBlockHtml('formkey'); ?>
现在可以正常工作.
P.S.有关更多信息,您可以在 http://magento-online-tutorials.blogspot.in/2015/11/shopping-cart-quantity-not-able-to.html
P.S. for more information you can check same answer on http://magento-online-tutorials.blogspot.in/2015/11/shopping-cart-quantity-not-able-to.html
这篇关于Magento.结帐购物车中的数量无法正常使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!