News:

Looking for documentation? Take a look on our wiki

Main Menu

Global product price increase

Started by biltong, November 30, 2016, 12:09:20 PM

Previous topic - Next topic

biltong

Hi,

If I want to permanently increase the Cost Price on all products in the shop by x% starting from a specific date, do I simply do this by creating a new Calculation Rule?

Thanks

AH

#1
I would do this using SQL command directly in the database rather than using a rule as you want this to be permanent.



update YOURPREFIX_virtuemart_product_prices as p set p.product_price = p.product_price * 1.03


Test on a backup first.

Regards
A

Joomla 3.10.11
php 8.0

biltong

#2
Thanks AH,

My client wants to schedule this for 1/1/17 AND wants to round the Final Price (cost price + 20% VAT) to the nearest 50p!

I don't suppose there's a way of entering a calculation in the Value field of the Tax Calculation rule is there?

If so, I will set this up as a Calc Rule and then subsequently do a db UPDATE to make it permanent - after the excesses of the New Year have worn off  :o ;D.

If not, I'd be very greatful for the SQL to update cost price to ((cost price + 20% VAT)*1.05 then rounded to nearest 0.5 then -20% VAT to get back to cost price)

Thanks!

AH

biltong

You will need to create the calculation yourself for this one

However - you can run multiple updates to get the end result you require

You I would not use a rule to do this (not sure if you can round to whole 50p!)- as it is a fixed one off cost change

MYSQL - has rules for Rounding etc
Regards
A

Joomla 3.10.11
php 8.0

Studio 42

I had same request using my VM be Pro tool, i think you are the same user?
Else in vm be PRO, you can export the displayed list as CSV then apply the rule in OO calc or ms Excel(or google sheet), check that the price is correct and reimport prices with Vm Be Pro.
For a simple rule you can use a muliplicator *1.05 in the batch processor, but this don't round it.

biltong