Hi everybody!
I cannot find proper configuration settings.
I want to display old price and discount price only for the items, where discount is set. If there is now discount only real price value is dispayed.
Thank you!
There is no configuration for this.
If you like you can copy
components\com_virtuemart\views\productdetails\tmpl\default.php
to
templates\yourtemplatesname\html\com_virtuemart\productdetails\default.php (assuming this doesnt already exist)
Then edit the price display line something like this:
if (round($this->product->prices['basePriceWithTax'],VmConfig::get('salesPriceRounding')) != $this->product->prices['salesPrice']) {
echo '<span class="price-crossed" >' . $this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices) . "</span>";
}
instead of just
echo '<span class="price-crossed" >' . $this->currency->createPriceDiv ('basePriceWithTax', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_WITHTAX', $this->product->prices) . "</span>";
I just realised the default price display of virtuemart is a bit different now so you may need to do the same as above but with default_showprices.php instead of default.php
Also if you search the forum you will find a lot of similar posts from me and others...
Use firebug to examine you site code and css styling: https://forum.virtuemart.net/index.php?topic=102850.0
Template Overrides:
Creating Template overrides: https://forum.virtuemart.net/index.php?topic=98505.0
Template System: https://dev.virtuemart.net/projects/virtuemart/wiki/Hints_for_the_use_of_the_template_system
Regards