Good day ,
I have problem with VM.I have version 2.024 c.I need get discount price in percentage.I tried all tutorials on this website,but these tutorials are for lowest version VM.
For me doesnt work these tutorials.I think,if VM consist this function in administration.But I not found nothing. Do you have any solution? Thank you very much everybody
There are tutorials for adding complex tax (http://docs.virtuemart.net/tutorials/31-administration-configuration-vm-2/109-taxes-calculation-rules-case-1.html), but discount etc is so simple.
Go to Products/Tax & Calculation rules. Set up a new rule.
Enter a Calculation Rule name and select published.
For Type of Arithmetic Operation select Price modifier, either before or after tax. Math Operation: -% and set the Value, eg 5 to give 5%. Select category, shopper group etc only if you need to use them.
Save and apply to products that need discount by applying to Base price or Final price in the Prduct editor.
Quote from: jenkinhill on January 23, 2014, 18:56:09 PM
There are tutorials for adding complex tax (http://docs.virtuemart.net/tutorials/31-administration-configuration-vm-2/109-taxes-calculation-rules-case-1.html), but discount etc is so simple.
Go to Products/Tax & Calculation rules. Set up a new rule.
Enter a Calculation Rule name and select published.
For Type of Arithmetic Operation select Price modifier, either before or after tax. Math Operation: -% and set the Value, eg 5 to give 5%. Select category, shopper group etc only if you need to use them.
Save and apply to products that need discount by applying to Base price or Final price in the Prduct editor.
Thank you for answer,but
i am bad explained.I need discount in percentage on the website in detailproduct on the display.Where it is shows in numeric number .This is what I need to change the percetange.
For certainly I upload image.
After this is same for categories in view discount i percantage!!!(http://trekkershop.cz/problem.jpg)
Create an override
This might work for you:-
templates/your template/html/com_virtuemart/productdetails/default_showprices.php
Then add this to the pricing layout
//quorvia created discount percentage calculation and display to replace the discount value
if (round($this->product->prices['discountAmount'] != 0 )) {
$discount_percent = round(($this->product->prices['basePriceWithTax'] - $this->product->prices['salesPrice']) * 100 / $this->product->prices['basePriceWithTax']);
?>
<div class="discountAmount">
Save <?php echo $discount_percent; ?>%
</div>
<?php
}
It works for me and the "div" allow you to position and color as required