1

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?

1 Answer 1

3

Try following code:


var_dump($rule->getStoreLabel());

If you want all labels use following way:


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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