News:

Support the VirtueMart project and become a member

Main Menu

How to add "From" price?

Started by brooklynbase, February 22, 2016, 17:56:46 PM

Previous topic - Next topic

Uglystick

Has anyone got this working, I have an clothing outlet site about to go live and child products prices vary.
So would love the Parent Product page to have From....

Studio 42

Overide your template file for product prices (if you use standard way, this is in sublayouts)
The simplest way, but i don't know if this work in last releases.
if (!empty($this->product->customsChilds))
  echo $currency->createPriceDiv ('salesPrice', 'FROM', $product->prices);
else
   echo $currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);


Else you have to check all customfield to know if you have child relations (type "C" and type="A") or use a DB query
see > \components\com_virtuemart\sublayouts\customfield.php