VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: axone on September 04, 2015, 20:05:31 PM

Title: How can I add a custom field value to a reduced price ?
Post by: axone on September 04, 2015, 20:05:31 PM
Hello !

I work with Joomla 3.4.3 + VirtueMart 3.0.9 and I use a custom field in "productdetails" page for managing prices by quantity
(eg. 500g + $0, 1000g + $10, 2000g + $18)

I display the "sale price" ($90) : "base price" -10%
below the "sale price", I display the "base price" ($100).

I display the "base price" with this line :
echo "<span class="line-through">'.$this->currency->createPriceDiv ('basePriceVariant', '', $this->product->prices).'</span>';

It works well when I change quantity the "sale price" change ... but "base price" don't change.

If I choose "1000g + $10" the "base price" should be increased with $10 to obtain $110.

How do I get the value of my custom field for the quantity and add it to "base price" ?

Thanks for your help !