News:

Looking for documentation? Take a look on our wiki

Main Menu

Edit order mail table

Started by Pejo, September 24, 2013, 03:27:16 AM

Previous topic - Next topic

Pejo

Hi,

Can you tell me please where can I edit table received in order e-mail?
As you can see in my attachment image, my currency symbol is out of line, also, payment price is not in line like other prices.

If it is possible just to resize whole box for 20px or maybe 10%?
Thanks.

[attachment cleanup by admin]

Pejo

I have look at some .php files and in components/com_virtuemart/views/invoice/tmpl/invoice_items.php i found lines of those prices and taxes, and I so that there is aligment "right". I have try to change to "left" but then is worse.

Any idea?

PRO

for the "width"
look here at the header percentage widths for each column.
<table class="html-email" width="100%" cellspacing="0" cellpadding="0" border="0">
   <tr align="left" class="sectiontableheader">
      <td align="left" width="5%"><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_SKU') ?></strong></td>
      <td align="left" colspan="2" width="38%" ><strong><?php echo JText::_('COM_VIRTUEMART_PRODUCT_NAME_TITLE') ?></strong></td>
      <td align="center" width="10%"><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_PRODUCT_STATUS') ?></strong></td>
      <?php if ($this->doctype == 'invoice') { ?>
      <td align="right" width="10%" ><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_PRICE') ?></strong></td>
      <?php } ?>
      <td align="right" width="6%"><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_QTY') ?></strong></td>
      <?php if ($this->doctype == 'invoice') { ?>
      <?php if ( VmConfig::get('show_tax')) { ?>
      <td align="right" width="10%" ><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_PRODUCT_TAX') ?></strong></td>
        <?php } ?>
      <td align="right" width="11%"><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_SUBTOTAL_DISCOUNT_AMOUNT') ?></strong></td>
      <td align="right" width="11%"><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_TOTAL') ?></strong></td>
      <?php } ?>
   </tr>


You can change the others smaller, and make that 1 larger.
OR: 1st, make sure they all equal 100%

for the last, out of line problem.
You need to reduce the "colspan"   of the TD right before it

Like if it is
<td align="left" colspan="4" >

change the 4 to 3

Pejo

Thank you so much for answer. I will try now and check out later here to confirm my results.
Thanks again. ;)

Pejo

OK, everything works great, it is like you said. THANKS.
But, here is one small thing:

As you can see, I remove some of items I do not need, for example "status", because, status is already in mail above (in header), also status of ordered will be in mail subject, and I got some more space and more percent for other tables.

Everything works great, also I reorder some of this items (for example, name of product is first, SKU is second, number of items third, etc.). I like it this way, thanks.

Now, thing that doesn't work is "colspan". As you can see in attached image, when I insert one number less (from 4 to 3), numbers goes in tabs where they have to be in first place, but now text is out of order.

I was looking in .php script for 'shipmentName' and for this 'paymentName' and code is exactly the same. I do not understand why for 'shipmentName' everything is good, but under it for 'paymentName' is out of table.

I am thanking you in advance for solving this.  ;D

[attachment cleanup by admin]

PRO

not all colspans will be the same,
for example, payments can have discounts.

so it could be from that column,.

Pejo

I know, but this one 'paymentName', is really out of order, I mean out of line.
When I insert some value, then tax is in line of discount, as you can see before I have translate it and change any in line in invoice_items.php

(look at attachment).

So, if I replace colspan from 4 to 3, then tax and total are in good columns, but text is out of order.
I am not so good in .php, but as I can see, all tables are made in invoice_items.php, right?

I know what you mean that payments can have discounts, but if this kind of payment would have discount, this discount would be show under total, not under discount.

It seems like there is one table row between text and tax. Do I need to find .php where payment is configured?
Maybe there I need to reorder or remove this blank field between text and tax.

Anyway, sorry for trouble and thanks for help.

[attachment cleanup by admin]

Pejo

I just tried something. I have copied 'shipmentName' whole code and replaced 'paymentName'. Now everything is in order, so that means that I have to look somewhere else to delete this blank field, or reorder, maybe this blank field is discount in front of tax or otherwise.

Pejo

#8
Noup. I can not find why is this out of table. I have no idea... :(

EDIT: My sincerely apologize. Forgot to say about my JM and VM versions:

Joomla 2.5.4 - VM 2.0.6

Problem is, I can not upgrade Joomla or VM, because it is connected (this is bought theme, and it is connected one with other). I tried to upgrade, but then nothing works anymore. Everything is messed up after upgrade, so I work with what I have at the moment... ;)

PRO

have you looked at it with firebug? to see whats going on?

Pejo

#10
No, I have mac and I use Safari. I am going to download Firefox and try with Firebug. Thanks.

EDIT:

I have just figure it out I can not use firebug in mail, or in invoice.items.php to see whats going on :(
Can not figure it out what it is. Same code, same everything, but different layout.

Maybe someone here can see in this code what to remove or to add, but as I said, if I replace first row "shipmentName" with second row "paymentName", I get everything in order.
Is there somewhere else where this table is created, or maybe where all of this is calculated?

<tr>
<td align="right" class="pricePad" colspan="5"><?php echo $this->orderDetails['shipmentName'?></td>


<?php if ( VmConfig::get('show_tax')) { ?>
<td align="right"><?php echo "<span  class='priceColor2'>".$this->currency->priceDisplay($this->orderDetails['details']['BT']->order_shipment_tax)."</span>" ?></td>
                                <?php ?>
<td align="right"></td>
<td align="right"><?php echo $this->currency->priceDisplay($this->orderDetails['details']['BT']->order_shipment$this->orderDetails['details']['BT']->order_shipment_tax); ?></td>

</tr>

<tr>
<td align="right" class="pricePad" colspan="5"><?php echo $this->orderDetails['paymentName']  ?><td>

<?php if ( VmConfig::get('show_tax')) { ?>
<td align="right"><?php echo "<span  class='priceColor2'>".$this->currency->priceDisplay($this->orderDetails['details']['BT']->order_payment_tax)."</span>" ?></td>
                                <?php ?>
<td align="right"></td>
<td align="right"><?php echo $this->currency->priceDisplay($this->orderDetails['details']['BT']->order_payment$this->orderDetails['details']['BT']->order_payment_tax); ?></td>


</tr>

Maxim Pishnyak

Quote from: Pejo on September 26, 2013, 20:52:11 PM
Joomla 2.5.4 - VM 2.0.6

Problem is, I can not upgrade Joomla or VM, because it is connected (this is bought theme, and it is connected one with other). I tried to upgrade, but then nothing works anymore. Everything is messed up after upgrade, so I work with what I have at the moment... ;)[/b]
http://forum.virtuemart.net/index.php?topic=107928.msg405017#msg405017
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

PRO


change the style of the table to have borders on the cells, and you can see better

Pejo

Quote from: PRO on October 01, 2013, 17:42:44 PM

change the style of the table to have borders on the cells, and you can see better

Sorry, I didn't quite understand. To insert border, where?

PRO