VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: WebMercher on February 22, 2013, 21:13:46 PM

Title: Alpha sort products on invoice.
Post by: WebMercher on February 22, 2013, 21:13:46 PM
My client needs the product items on the invoice to be sorted alphabetically.
Where can I change this?

VM 2.0.18a
Joomla! 2.5.9


Thanks
Title: Re: Alpha sort products on invoice.
Post by: WebMercher on March 18, 2013, 08:29:12 AM
Can I PLEASE get a developer to address this issue?

Where can I change the item sort order for invoices created by VM?

I need the invoice to sort items alphabetically.

Thanks
Title: Re: Alpha sort products on invoice.
Post by: WebMercher on April 01, 2013, 12:42:57 PM
i think i found the area to change this, does anyone know how to use

$this->sort 

as a function to alpha sort the products on the invoice?

I can of course copy it as an override to the templates area later, just need to know how to mod this.


/components/com_virtuemart/views/invoice/tmpl/invoice_items.php

<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>
      <td align="right" width="10%" ><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_PRICE') ?></strong></td>
      <td align="right" width="6%"><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="11%"><strong><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_TOTAL') ?></strong></td>
   </tr>