1

In the email sent to customer for order confirmation, product unit price does not show. I did the following changes, but I am facing these issues,

  1. Order is being processed, but I am not being redirected to Thankyou page. Before implementing these codes, when I click Place Order it will redirected to Thank you page.
  2. No email confirmation as well, before implementing this code, I received email confirmation as well.
  3. When I click Place Order it does not take me to the next page which is Thank You page, instead it stays in the Place Order page, but the order is been processed shows in the admin section

1) app/design/frontend/base/default/template/email/order/items.phtml

I added Unit Price under SKU

<th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Unit Price') ?></th>


  1. app/design/frontend/base/default/template/email/order/items/order/default.phtml

Below this line:

<td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><?php echo $this->htmlEscape($this->getSku($_item)) ?></td>

I added the following code:

 `<td align="center" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
<!-- Show Unit Price here -->
<?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()) ;
}
?>
<!-- END UNIT PRICE -->
</td>`
  1. app/design/frontend/base/default/layout/sales.xml

In "sales_email_order_items", I changed the colspan from 3 to 4

<pre><code><action method="setLabelProperties"><value>colspan="3" align="right" style="padding:3px 9px"</value></action></code></pre>

and changed it to

<action method="setLabelProperties"><value>colspan="4" align="right" style="padding:3px 9px"</value></action>

Any help here? Thanks!

  • Any help? It is very impt, I am stuck... thanks – ras574 Sep 24 '14 at 13:24
2

Add following code 




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()) ;
}
| improve this answer | |
0

late but might be helpful to someone

1) app/design/frontend/base/default/template/email/order/items.phtml

<th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Unit Price') ?></th>
  1. app/design/frontend/base/default/template/email/order/items/order/default.phtml
<td align="center" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
<!-- Show Unit Price -->
<?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()) ;
}
?>
<!-- END Unit Price -->
</td>
  1. app/design/frontend/base/default/layout/sales.xml

Open the above file and find for "sales_email_order_items".and replaced with following or just change colspan as per your extra columns added.

<action method="setLabelProperties"><value>colspan="4" align="right" style="padding:3px 9px"</value></action>
| improve this answer | |

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.