1
<?php
if ($this->helper('tax')->displaySalesPriceInclTax($_order->getStore())) {
$itemprice = $this->helper('checkout')->getPriceInclTax($_item) ;
echo $this->helper('checkout')->formatPrice($itemprice);
} else {
echo $this->helper('checkout')->formatPrice($_item->getPrice()) ;
}

with help of above code i am able to add unit special price but i want to add original price. anyone can help me

1
  • i want to add original price in order email template while i am adding unit price but its special price. Oct 20, 2016 at 12:15

2 Answers 2

1

you can get the original price by

echo $this->helper('checkout')->formatPrice($_item->getOriginalPrice()) ;

or

echo $this->helper('checkout')->formatPrice($_item->getBaseOriginalPrice()) ;

or you can get product price

echo $this->helper('checkout')->formatPrice($_item->getProdcut()->getPrice()) ;
26
  • ....its not working for me it is still showing special price but i want to show original price ...e.g if i have one product original price is 90 and special price is 60 than i want to show 90 on email order Oct 21, 2016 at 5:53
  • did you tried the last one what is output of that? Oct 21, 2016 at 5:54
  • same it is showing special price not original price Oct 21, 2016 at 5:56
  • please help me if possible .... Oct 21, 2016 at 5:56
  • then go for $itemproduct = Mage::getModel('catalog/product')->load($_item->getProductId()); echo $itemproduct->getPrice(); this is tested code Oct 21, 2016 at 6:01
1

you can do this steps this always works for me

$product = Mage::getModel('catalog/product')->load($_item->getProductId‌​());
echo $product->getPrice();
12
  • i am asking about order email template... Oct 20, 2016 at 12:24
  • just place this code in php $item loop instead your code , I have used $_item varibale and load orignal product and fetch its actual price Oct 20, 2016 at 12:25
  • okay lets me check ... Oct 20, 2016 at 12:26
  • <?php if ($this->helper('tax')->displaySalesPriceInclTax($_order->getStore())) { $itemprice = $this->helper('checkout')->getPriceInclTax($_item) ; echo $this->helper('checkout')->formatPrice($itemprice); } else { echo $this->helper('checkout')->formatPrice($_item->getPrice()) ; } Oct 21, 2016 at 5:55
  • <?php if ($this->helper('tax')->displaySalesPriceInclTax($_order->getStore())) { $itemprice = $this->helper('checkout')->getPriceInclTax($_item) ; echo $this->helper('checkout')->formatPrice($itemprice); } else { echo $this->helper('checkout')->formatPrice($_item->getPrice()) ; } where should i paste your code Oct 21, 2016 at 5:55

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.