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

Can I display unit price with tax in email?

Started by Beni, September 03, 2014, 20:10:53 PM

Previous topic - Next topic

Beni

Dear Members,

Can I display products unit price with TAX in order confirmation email? If yes, please write the solution... Thank you!

I think i must to change this section in templates/xxx/html/com_virtuemart/invoice/invoice_items.php

<?php if ($this->doctype == 'invoice') { ?>
         <td align="center"   class="priceCol" style="border: solid 1px #6C6C6C;padding: 4px;font-size:14px; vertical-align: middle; display: table-cell;">
            <?php
            $item->product_discountedPriceWithoutTax = (float) $item->product_discountedPriceWithoutTax;
            if (!empty($item->product_priceWithoutTax) && $item->product_discountedPriceWithoutTax != $item->product_priceWithoutTax) {
               echo '<span class="line-through">'.$this->currency->priceDisplay($item->product_item_price, $this->currency) .'</span><br />';
               echo '<span >'.$this->currency->priceDisplay($item->product_discountedPriceWithTax, $this->currency) .'</span><br />';
            } else {
               echo '<span >'.$this->currency->priceDisplay($item->product_item_price, $this->currency) .'</span><br />';
            }
            ?>
         </td>
      <?php } ?>

Although I don't know the PHP, so I cant change this...
I use VM 2.6.8b

Beni

GJC Web Design

you need to echo out your $item object to find what price you want then use it instead of $item->product_item_price

print 'Debug Line '.__LINE__.' $item <pre>'; print_r ($item); print "</pre><br />\n";
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Beni

Thank you, but I don't know PHP...  But I solved my problem (not nice, but working  ;))

echo '<span >'.$this->currency->priceDisplay($item->product_item_price*127/100, $this->currency) .'</span><br />';     (our tax is 27%)

Beni