- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2018
03:54 AM
03-08-2018
03:54 AM
$item = $observer->getEvent()->getQuoteItem(); $item = ( $item->getParentItem() ? $item->getParentItem() : $item ); $_product = Mage::getModel('catalog/product')->load($item->getProductId()); $finalPrice = $Customprice + $_product->getPrice(); $item->setCustomPrice($finalPrice); $item->setOriginalCustomPrice($finalPrice); $item->getProduct()->setIsSuperMode(true); $item->save();
After that when customer as guest logged in and customer add to cart any of the product at that time display the error like:
"Cannot add the item to shopping cart"
How to fix this error?
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2018
07:20 AM
03-08-2018
07:20 AM
Hi,
try to remove the last line "$item->save()"
this can make problems when it`s about a guest customer.
Magento Senior Developer (Freelancer).
Contact: siegfriedschmitz@me.com
Contact: siegfriedschmitz@me.com
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2018
04:22 AM
03-08-2018
04:22 AM
Re: How to fix "Cannot add the item to shopping cart" error?
To see the root problem, share the last error message from /var/log/exception.log file.
-- Ravindra
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2018
07:20 AM