One of the last things I had to implement in Magento was a function to empty the customer cart. At first I found this great extension made by the Inchoo people, but it did much more than I needed. Having a controller to do this is fair enough, and the only code you need to put in that controller is the following:
When calling the function $block->getProduct() in a quote item in the cart page, Magento 2 will return the product and its basic attributes. The attributes that can be retrieved from the product when calling this Read more…
Since the very first time I started working with collections in Magento I run into situations where I needed to filter a collection by an attribute whose value is not set yet (for example, when Read more…
Magento Development India · July 22, 2012 at 7:32 pm
I had this query a few days ago but I found one plugin. Thanks for this article. I was looking for it.
doh · January 29, 2013 at 11:45 am
This gives me:
SQLSTATE: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento`.`sales_flat_quote_item`, CONSTRAINT `FK_SALES_FLAT_QUOTE_ITEM_QUOTE_ID_SALES_FLAT_QUOTE_ENTITY_ID` FOREIGN KEY (`quote_id`) REFERENCES `sales_flat_quote` (`entity_id`) ON DELETE CASC)
Pau · January 29, 2013 at 12:21 pm
I’m not sure why that constraint is affecting. It shouldn’t. Does this happen to you for all the quotes or only for a particular one?