VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: user_id on June 19, 2018, 08:48:01 AM

Title: Can't show basePriceWithTax by createPriceDiv()
Post by: user_id on June 19, 2018, 08:48:01 AM
I have problem to show basePriceWithTax using createPriceDiv. I showed salesPrice without problems.
I use method this way:
echo $currency->createPriceDiv('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $product->prices);

When I print $product->prices array by foreach it list and there is basePriceWithTax:
Quotevirtuemart_product_price_id=>348
virtuemart_product_id=>404
virtuemart_shoppergroup_id=>0
product_price=>95
override=>1
product_override_price=>499
product_tax_id=>2
product_discount_id=>-1
product_currency=>47
product_price_publish_up=>0000-00-00 00:00:00
product_price_publish_down=>0000-00-00 00:00:00
price_quantity_start=>0
price_quantity_end=>0
created_on=>2018-06-18 09:39:41
created_by=>1222
modified_on=>2018-06-19 06:33:21
modified_by=>1222
locked_on=>0000-00-00 00:00:00
locked_by=>0
costPrice=>95
basePrice=>407.322
basePriceVariant=>407.322
basePriceWithTax=>501.00606
discountedPriceWithoutTax=>405.69106
priceBeforeTax=>407.322
salesPrice=>499
taxAmount=>93.30894
salesPriceWithDiscount=>0
salesPriceTemp=>501.00606
unitPrice=>0
priceWithoutTax=>407.69712
discountAmount=>-2.00606
variantModification=>0
DBTax=>Array
Tax=>Array
VatTax=>Array
DATax=>Array
Marge=>Array
salesPriceTt=>499
discountedPriceWithoutTaxTt=>405.69106
priceWithoutTaxTt=>407.69712
discountAmountTt=>-2.00606
taxAmountTt=>93.30894

Title: Re: Can't show basePriceWithTax by createPriceDiv()
Post by: Jörgen on June 19, 2018, 09:54:44 AM
Hello

If You can display the salesPrice next to this, there must be some typo that prevents it from working. if You can´t display the salesPrice either, then You might have to check if some model is missing.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Can't show basePriceWithTax by createPriceDiv()
Post by: user_id on June 19, 2018, 10:41:06 AM
Quote from: Jörgen on June 19, 2018, 09:54:44 AM
If You can display the salesPrice next to this, there must be some typo that prevents it from working. if You can´t display the salesPrice either, then You might have to check if some model is missing.
I can display salesPrice. Also salesPriceTemp but I don't want to use "temp" price.

Do you know any documentation for createPriceDiv()? VM documentaiton looks more like manual. I can't find anything on their website and google. Only forums.
Maybe is there any docs where explain what mean COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX etc.?
Title: Re: Can't show basePriceWithTax by createPriceDiv()
Post by: GJC Web Design on June 19, 2018, 10:45:13 AM
public function createPriceDiv($name,$description,$product_price,$priceOnly=false,$switchSequel=false,$quantity = 1.0,$forceNoLabel=false, $force = false)

administrator\components\com_virtuemart\helpers\currencydisplay.php ~ line 311
Title: Re: Can't show basePriceWithTax by createPriceDiv()
Post by: Jörgen on June 19, 2018, 10:48:54 AM
https://docs.virtuemart.net/manual.html (https://docs.virtuemart.net/manual.html)

Jörgen @ Kreativ Fotografi