VirtueMart CMS Code for BasePriceWithTax on Products Template

apps5
4 Posts
apps5 posted this 14 February 2018

Can Anybody help?

Can Anybody help?
Vote to pay developers attention to this features or issue.
3 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 14 February 2018

Hello,

Please try this code for Product template:

<?php
if(!(isset($currency))){
$currency = CurrencyDisplay::getInstance ();
}
echo $currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $product->prices);
?>

For more CMS Code examples for different prices please refer to https://answers.themler.io/articles/67028/tips-and-tricks#t_price

Sincerely,
Nettie,
BillionDigital Team

Hello, Please try this code for Product template: <?php if(!(isset($currency))){ $currency = CurrencyDisplay::getInstance (); } echo $currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $product->prices); ?> For more CMS Code examples for different prices please refer to https://answers.themler.io/articles/67028/tips-and-tricks#t_price Sincerely, Nettie, BillionDigital Team
apps5
4 Posts
apps5 posted this 15 February 2018

The Problem is tha the "BasePrice" is WHITOUT Tax..... :-(
Ive seen Allready the Tips & Tricks, but there are only 2 Scriptdemos for the "Product Template"... :-(

Please help me out :-)

The Problem is tha the "BasePrice" is WHITOUT Tax..... :-( Ive seen Allready the Tips & Tricks, but there are only 2 Scriptdemos for the "Product Template"... :-( Please help me out :-)
Support Team
Support Team posted this 19 February 2018

Hi,

In the provided article you can find the code for Base price with tax also:
echo $this->currency->createPriceDiv ( 'basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices );

Simply change the line in the example:
echo $currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $product->prices);
to the desired price code:
echo $currency->createPriceDiv ( 'basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $product->prices );

You just need a proper parameter: 'basePriceWithTax.

Thank you,
Olivia

Hi, In the provided article you can find the code for Base price with tax also: `echo $this->currency->createPriceDiv ( 'basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices );` Simply change the line in the example: `echo $currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $product->prices);` to the desired price code: `echo $currency->createPriceDiv ( 'basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $product->prices );` You just need a proper parameter: `'basePriceWithTax`. Thank you, Olivia
You must log in or register to leave comments