- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
VirtueMart. Zero product prices issue
December 26, 2011
This tutorial is going to show you how to solve a problem with zero product prices when no discount is selected.
On some templates, when in your admin go to Components -> Virtuemart, click on Product list, select a product and in the Product Information tab change Discount Type to 0 (-none-) and click on Apply to save your changes, the price shows like this
To fix this, you need to access the theme files on your server, navigate to components/com_virtuemart/themes/vmtheme(your_theme_number)/templates/common/ and open price.tpl.php to edit. Look for the following code:
in price.tpl.php
getFullValue($base_price) ?> getFullValue($undiscounted_price); ?>
Where you need to interchange these two lines
if(!empty($discount_info["amount"])) { if( !empty( $price_info["product_price_id"] )) { ?>
so that your code would look like this
getFullValue($base_price) ?> getFullValue($undiscounted_price); ?>
Once you have done that, save the changes, re-fresh your product page and you are done.
Please, see the demo below for additional info.
VirtueMart. Zero product prices issue