Home
Percentage Price Discount no decimal 2 digits

Question: How do I make the price discount percentage only show 2 digits vs 4 digits?  For example, we have items with a discount price of 43.12%.  We would prefer to just show 43%.

Answer:  Open price.tpl.php in components > com_virtuemart > themes > default > templates > common

Look for this code around line 40:

echo $discount_info["amount"]."%";

Change to:

echo round($discount_info["amount"])."%";

 


Request Services
 
First Name
Last Name
E-mail
Phone
Domain
Service needed
Budget
  
Watch video overview


+ Suggested tags