Jump to content

aligning order confirmation email template


Recommended Posts

I would like to align the order confirmation template in the way that the cells of values under reference, product, unit price, quantity, total price would be aligned to top cells. A lot can be done in order_conf.html, but i think that this can't be changed there.

post-323524-0-76327400-1340906415_thumb.png

Edited by elfstone (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Not sure if I'm skilled but I'll give it a go anyways ;)

 

 

Edit your /classes/PaymentModule.php and add some spans around the output of the actual values in the HTML output of the functions invoked.

 

For this you look up the HTML output section for the products (2 instances) and vouchers (1 instance);

 

First section at lines 316-318 (on PS 1.4.8.2) The lines look as follows after adding the <span style="float: right;"> tags;

 

<td style="padding: 0.6em 0.4em; text-align: right;"><span style="float: right;">'.Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? $price : $price_wt, $currency, false).'</span></td>
   <td style="padding: 0.6em 0.4em; text-align: center;"><span style="float: right;">'.$customizationQuantity.'</span></td>
   <td style="padding: 0.6em 0.4em; text-align: right;"><span style="float: right;">'.Tools::displayPrice($customizationQuantity * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? $price : $price_wt), $currency, false).'</span></td>

 

Rinse and repeat for lines 327-329

 

Then go to line 410 (this is for the vouchers) and change that to;

 


<td style="padding: 0.6em 0.4em; text-align: right;"><span style="float: right;">'.($value != 0.00 ? '-' : '').Tools::displayPrice($value, $currency, false).'</span></td>

 

It should look something similar to this;

 

screenshot3.jpg

 

Hope that helps :)

 

 

PS. In my sample I floated the quantity to the right too.

Edited by forkless (see edit history)
Link to comment
Share on other sites

Thank you for trying. This seams to be a little different in 1.5 version. I tried to do what you suggested and received an error.

I am attaching another image of what is my problem, and i think all versions 1.5 have this problem.

post-323524-0-04634600-1342448805_thumb.png

Link to comment
Share on other sites

  • 4 weeks later...

Not sure if I'm skilled but I'll give it a go anyways ;)

 

 

Edit your /classes/PaymentModule.php and add some spans around the output of the actual values in the HTML output of the functions invoked.

 

For this you look up the HTML output section for the products (2 instances) and vouchers (1 instance);

 

First section at lines 316-318 (on PS 1.4.8.2) The lines look as follows after adding the <span style="float: right;"> tags;

 

<td style="padding: 0.6em 0.4em; text-align: right;"><span style="float: right;">'.Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? $price : $price_wt, $currency, false).'</span></td>
   <td style="padding: 0.6em 0.4em; text-align: center;"><span style="float: right;">'.$customizationQuantity.'</span></td>
   <td style="padding: 0.6em 0.4em; text-align: right;"><span style="float: right;">'.Tools::displayPrice($customizationQuantity * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? $price : $price_wt), $currency, false).'</span></td>

 

Rinse and repeat for lines 327-329

 

Then go to line 410 (this is for the vouchers) and change that to;

 


<td style="padding: 0.6em 0.4em; text-align: right;"><span style="float: right;">'.($value != 0.00 ? '-' : '').Tools::displayPrice($value, $currency, false).'</span></td>

 

It should look something similar to this;

 

screenshot3.jpg

 

Hope that helps :)

 

 

PS. In my sample I floated the quantity to the right too.

 

Hey, are you writing about modifiying 410 line in /classes/PaymentModule.php ?

 

regards

Link to comment
Share on other sites

×
×
  • Create New...