0

I'm trying to display the label of the applied shopping cart price rule. I can display the rule name, but there is no label.

$rule = Mage::getModel('salesrule/rule')->load($ruleId);
echo $rule->getName();  // <- this one displays the rule name
echo $rule->getLabel(); // <- this one displays nothing
var_dump($rule->getData()); // <- I don't see the label in the data

I have configured a label for each one of the storeviews.

¿How can I display the label?

2

Try following code:


var_dump($rule->getStoreLabel());

If you want all labels use following way:


$rule->getStoreLabels()
  • $rule->getStoreLabel() works fine, thank you – Alex Jan 29 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.