Author Topic: Display price before discount overrides  (Read 501 times)

bunglehaze

  • Jr. Member
  • **
  • Posts: 485
Display price before discount overrides
« on: April 05, 2018, 14:27:46 pm »
Hey all, I am using the catproduct extension to show my products in a table and have as part of the addon hidden the prices from the ontop and addtocart positions on VM 3.2.12

However, one limitation the extension has is that I cannot display the price before any discounts, only the final prices selected. As a result I now want to add a line to the default product page that will show MSRP: [and the price before discount price]

Code: [Select]
<?php echo $this->product->prices['salesPrice']  ?> Shows the discounted price, but I am unsure what the price description is for the price before discount with tax instead of salesPrice.

If anyone could help I would appreciate it.

lausianne

  • Jr. Member
  • **
  • Posts: 50
Re: Display price before discount overrides
« Reply #1 on: April 05, 2018, 20:07:02 pm »
How about basePriceWithTax? (just a guess)

In .\administrator\components\com_virtuemart\helpers\currencydisplay.php I found this:

$priceNames = array('basePrice','variantModification','basePriceVariant',
   'basePriceWithTax','discountedPriceWithoutTax', 'discountedPriceWithoutTaxTt',
   'salesPrice', 'salesPriceTt', 'priceWithoutTax', 'priceWithoutTaxTt',
   'salesPriceWithDiscount','discountAmount','discountAmountTt','taxAmount', 'taxAmountTt','unitPrice');

bunglehaze

  • Jr. Member
  • **
  • Posts: 485
Re: Display price before discount overrides
« Reply #2 on: April 06, 2018, 10:45:01 am »
Yeah, I have tried the variants in the prices and they all seem to just display the sale price. It's an odd one

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1608
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Display price before discount overrides
« Reply #3 on: April 08, 2018, 10:27:08 am »
Do You mean this extension ?

https://extensions.virtuemart.net/product/products/catproduct-detail

Post a support ticket or speak to the developer.

regards

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

bunglehaze

  • Jr. Member
  • **
  • Posts: 485
Re: Display price before discount overrides
« Reply #4 on: April 16, 2018, 17:02:11 pm »
Just a quick update for those with the same issue. It was a simple setup issue in that my overrides on pricing were +/-% margin. I just changed it to DBtax (price modifier before tax) and the line I added changed to the correct MSRP price on it's own.