I'm on Mage 1.8 with custom data.
- I have created a catalog rule that give 10% discount when sku = 'n2610' ( relative product id is 16 )
- saved the rule
- apply all the rule
Now I m testing the rule with the following code:
<?php require_once './app/Mage.php'; umask(0); Mage::app(); //Mage::setIsDeveloperMode(true); $rule = Mage::getModel('catalogRule/rule')->load(5); var_dump($rule->getData()); var_dump($rule->getMatchingProductIds());
getMatchingProductIds() gives me back an array() with all prod. here the part for the interested product.
16 => array (size=3) 0 => int 0 1 => int 0 2 => int 0
I expect that the array contains some 1.
If I debug the following method, I can see that the
$validatedValue is always empty so the rule never match.
Anyone can point me to the error ? is it a bug on 1.8 ( I'm quite sure I haven't touched any core file.)