I am on Magento 1.9.1.1 and currently I am trying to create a shopping cart price rule based off a custom attribute for a product that is in the cart. I use the following code in my observer (sales_quote_save_after) to set the attribute, it has no effect on the shopping cart price rule. It appears that when I am setting the cart product attribute, the price rule is actually checking the product attribute instead of the product attribute in the cart.
$quote = $observer->getEvent()->getQuote();
$cartItems = $quote->getAllVisibleItems();
$productSkus = Mage::getSingleton('core/session')->getProductSkus();
foreach ($cartItems as $item) {
$skuname = $item->getSku();
if ($skuname == $productSkus){
$item->getProduct()->setData('stone_remnant_flag',$remnant);
$item->save();
break;
}
}
So I am wondering how I would go about creating a shopping cart price rule condition based off a Cart Item Attribute. Currently Magento only shows:
- Price in cart
- Quantity in cart
- Row total in cart