Item names disappear on checkout in Magento

橙三吉。 提交于 2020-01-17 02:55:09

问题


I have a problem in my Magento site wherein an item in a cart of a registered customer doesn't get cleared after checking out. Thus I searched stackoverflow and found this solution: magento shopping cart does not get clear

After implement it by adding this in my one page checkout phtml file, the item names and picture disappear.

 foreach( Mage::getSingleton('checkout/session')->getQuote()->getItemsCollection() as $item ){

     Mage::getSingleton('checkout/cart')->removeItem( $item->getId() )->save();
 }

Now, I can place an order without any problems. The cart now clears after checking out. However, in the reviews block, I can only see the prices, the item name, description and photo are now gone. :(

I think the problem is in this line, but I'm not sure: ->getQuote()->getItemsCollection() as $item. Maybe my $item is different or should be replace to something to show the items.

Did I miss something or forgot to add something in the code? :(


回答1:


First of remove the code and check any third party module have you installed.

If then disabled that module and check it.



来源:https://stackoverflow.com/questions/24974306/item-names-disappear-on-checkout-in-magento

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