Pages

Magento get product price

Assuming that you have known product object, $_product

1. Get product price snippet

<?php echo $this->getPriceHtml($_product, true);?>

2. Get $_product price

echo $_product->getPrice();
echo number_format($_product->getPrice(), '2', '.', ',');

3. Get $_product special price

echo $_product->getSpecialPrice();
echo number_format($_product->getSpecialPrice(), '2', '.', ',');

4. Get $_product final price

echo $_prodcut->getFinalPrice();
echo number_format($_product->getFinalPrice(), '2', '.', ',');

5.Get $_product Msrp

echo $_product->getMsrp();
echo number_format($_product->getMsrp(), '2', '.', ',');

No comments:

Post a Comment