0

I would like to display the special price end date on the product and Categories pages.

4

On Product detail page or Category list page, You can use following code to display special price end date.

<?php

// check if product has special
if($_product->getSpecialPrice()){
    // get special price
    echo $_product->getSpecialPrice();
    // get special end date 
    echo $_product->getSpecialToDate();

}
2

You can use

$pro = Mage::getModel("catalog/product")->load(PRODUCT_ID);
echo $pro->getSpecialToDate();

Change PRODUCT_ID with id of product

For formatting date

$dt = $pro->getSpecialToDate();
echo date('Y-m-d',strtotime($dt));

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.