I use some catalog price rules, to display discount on frontend. All these rules do have a end date.
I want to display the end date on frontend, so that a customer knows when the discount will end.
How can I display that?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityyou can get with help of below function.
define this function in to your local/custom helper
protected function getCatalogRules($_product) {
return Mage::getResourceModel('catalogrule/rule')->getRulesFromProduct(
Mage::getModel('core/date')->date('Y-m-d'), 1, Mage::getSingleton('customer/session')->getCustomerGroupId(), $_product->getId()
);
}
pass product as object in to this to get desire result if product has applied catalog rule.
Then you can get information about current catalog rule applicable for current product.grab in to one array and display end from response.
hope this will work for you.