I have created catalog price rule in admin, but catalog price rule name not displaying in product view page.Can you please help me?


Once you created catalog Price rule, you must click on "Apply rules" button to apply those rules. then clear cache once....

enter image description here

| improve this answer | |
  • Hi, apply rules button clicking but in product price page only price is changed,but it not shows catalog price rule name.Can you plaese help me? – Dileep Kumar Nov 17 '17 at 9:56
  • @DileepKumar so discounts are displaying in product view page , but it not showing the catalog price rule name in product page ? – Baby in Magento Nov 17 '17 at 9:57
  • ok sir, how to discounts are displaying in product view page? – Dileep Kumar Nov 17 '17 at 10:00
  • @DileepKumar can you please tell clearly, are discounts are not displaying in product page ? – Baby in Magento Nov 17 '17 at 10:02
  • in add to cart button above my price shows these $100.00 $72.00 but here below not show 10% offer message not displayed.Can you please help me? – Dileep Kumar Nov 17 '17 at 10:02

That's true, it is not default Magento behavior to display the price rule name on the frontend of the website.

One way to achieve this could be:

$website = Mage::app()->getWebsite(); // Get current website context.
$product = $this->getProduct(); // The current product.

$rules = Mage::getModel('catalogrule/rule')->getCollection()

foreach ($rules as $rule) {
    $matchedProductIds = $rule->getMatchingProductIds();
    if (isset(matchedProductIds[$product->getId()])) {
        // Product has an active price rule.
        echo $rule->getName();
| improve this answer | |
  • Hi@ mizuti sir , Tell me file path? – Dileep Kumar Nov 17 '17 at 11:43
  • Fatal error: Cannot use isset() on the res ult of a function call (you can use "null !== func()" instead) in C:\xampp\htdocs\magento\app\design\frontend\rwd\default\template\catalog\product\price.phtml on line 399.Please help me? – Dileep Kumar Nov 17 '17 at 11:57
  • Ah I see, I'll update my answer. – Niels Nov 17 '17 at 12:09
  • ok sir, I am waiting for your updated answer – Dileep Kumar Nov 17 '17 at 12:11
  • 1
    Hi@mizuti sir,I dont know how to implemented this task.Can you please help me? – Dileep Kumar Nov 20 '17 at 5:11

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.