Author Topic: Can't show basePriceWithTax by createPriceDiv()  (Read 363 times)

user_id

  • Beginner
  • *
  • Posts: 5
Can't show basePriceWithTax by createPriceDiv()
« 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:
Code: [Select]
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:
Quote
virtuemart_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


Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1669
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Can't show basePriceWithTax by createPriceDiv()
« Reply #1 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
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

user_id

  • Beginner
  • *
  • Posts: 5
Re: Can't show basePriceWithTax by createPriceDiv()
« Reply #2 on: June 19, 2018, 10:41:06 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.?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8006
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Can't show basePriceWithTax by createPriceDiv()
« Reply #3 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
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1669
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Can't show basePriceWithTax by createPriceDiv()
« Reply #4 on: June 19, 2018, 10:48:54 am »
https://docs.virtuemart.net/manual.html

Jörgen @ Kreativ Fotografi
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)