News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

changing invoice emailed to customers.

Started by readyforchange, May 10, 2012, 23:59:13 PM

Previous topic - Next topic

readyforchange

I'm looking at the invoice that is being sent out to customers... and it looks crazy.

How do I simplify it?  Can I do it in.. settings somewhere or do I have to edit the invoice phps?

Here's a screen cap of what i am talking about.

[attachment cleanup by admin]

jenkinhill

The templates for this are in joomla_root/components/com_virtuemart/views/invoice/tmpl/
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

readyforchange

Thanks for the reply Jenkins.

I am looking to change specifically ... the column spacing so it automatically spaces out evenly to allow for more or less numerical characters as well as figure out why the column which I boxed in bigger in red is like that? 

I have included my prices settings... not sure where to start editing as my php skills are pretty nonexistent at the moment, i'm trying to teach myself at the moment.

Best Regards.

R

[attachment cleanup by admin]

archos

Hello,

Same problem with €.
I feel the problem is the same when the currency is set to the right of the price...

jelly

Hi Ready for change,

I have the same ugly customer invoice like that.  :'( I have used VM for years, but I am very disappointed by the new VM that this is the default lay out of it...

I want to simplify it too:
- the column rebates is unnecessary,
- the quantity field is quite large for this compressed lay out...

The layout changes are not exactly to be called improved in the new VM...  :'(
I am also not very glad with the default subject line of the email send to the customer...

selina1122

maybe this is the solution.

you can edit next file /www/components/com_virtuemart/views/invoice/tmpl/invoice_items.php

here you find the next string :

<table class="html-email" width="100%" cellspacing="0" cellpadding="0" border="0">

change it to:

<table class="html-email" width="100%" cellspacing="0" cellpadding="0" border="0" font-size="10px">

this will decrease the font so there is less space used.

Also you can remove colomns and spread the widht % over the others. like this
OLD
<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="40%" ><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>
<td align="right" width="10%" ><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_PRICE'?></strong></td>
<td align="right" width="5%"><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_QTY'?></strong></td>
<?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="10%"><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_TOTAL'?></strong></td>
</tr>


NEW

<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="40%" ><strong><?php echo JText::_('COM_VIRTUEMART_PRODUCT_NAME_TITLE'?></strong></td>
REMOVE LINE <td align="center" width="10%"><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_PRODUCT_STATUS'?></strong></td>
10% INCREASED <td align="right" width="20%" ><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_PRICE'?></strong></td>
<td align="right" width="5%"><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_QTY'?></strong></td>
<?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="10%"><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_TOTAL'?></strong></td>
</tr>


As you can see i removed column 3 so we have to remove column 3 from the orders. see below

<tr valign="top">
<td align="left"> //COLUMN 1
<?php echo $item->order_item_sku?>
</td>
<td align="left" colspan="2" > //COLUMN 2
<a href="<?php echo $_link?>"><?php echo $item->order_item_name?></a>
<?php
//  vmdebug('$item',$item);
if (!empty($item->product_attribute)) {
if(!class_exists('VirtueMartModelCustomfields'))require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'customfields.php');
$product_attribute VirtueMartModelCustomfields::CustomsFieldOrderDisplay($item,'FE');
echo $product_attribute;
}
?>

</td>
<td align="center"> //COLUMN 3 REMOVE THIS PART
<?php echo $this->orderstatuses[$item->order_status]; ?>  //COLUMN 3 REMOVE THIS PART
</td>  //COLUMN 3 REMOVE THIS PART
<td align="right"   class="priceCol" >
    <?php echo '<span >'.$this->currency->priceDisplay($item->product_item_price) .'</span><br />'?>
</td>


I hope this will take care of your problems.