Really struggling with this. I'm trying to see if the conditions of a 'Shopping Cart Price Rule' have been met directly on the 'View Cart' page. If so, I want to add a product automatically to the cart.
I have been trying different methods using:
Mage::getModel('salesrule/rule')->load($id)->getConditions();
with the rule ID being 18, then echoing to see if it worked, no such luck yet.
I'm trying to make it so I can at least see if the conditions have been met before I try to automatically add a product to the cart.
Something along the lines of:
if (product conditions have been met) {
automatically add product to cart
}
I have already seen this How to check if shopping cart price rule applied to quote, however that is showing rules that have already been applied, rather than rule that 'could' be applied.
Any help would be much appreciated.
James