Totally Zenned
- Join Date:
- Sep 2005
- Posts:
- 836
- Plugin Contributions:
- 0
Post #1 by cntgifts
Is there an sql code i can run to make al lthe products price 10% lower
Totally Zenned
Is there an sql code i can run to make al lthe products price 10% lower
Black Belt
Is this to change the actual price or to offer 10% off all items?
Zen-Venom Get Bitten
Totally Zenned
change the actual price
Totally Zenned
quick updates can do that for you (depends on the amount of products if it really will be a quick update though).
But if I remember well you already use quick updates?
edit: sorry that is not an answer to your question I realize now :-)
Totally Zenned
Like this:
UPDATE `products` SET `products_price` = `products_price` * 0.9;
``` ?
Backup first!
Totally Zenned
Forgot to tell: you need to update the sprice sorter too, after the above.
Totally Zenned
ok thanks, how can i ad 10% on to the price
Totally Zenned
Are you serious? :shocking:
Alter the calculation part (products_price * 0.9) of paulm's query above to products_price * 1.1
Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !
Totally Zenned
Ryk:
Are you serious? :shocking:
Alter the calculation part (
products_price* 0.9) of paulm's query above toproducts_price* 1.1
Actually, no. It'll work if the prices haven't been discounted that way first, but it won't put them back where they were originally.
If the product was originally $100 and was discounted 10%, the result (100 * 0.9) is $90. If the $90 is multiplied by 1.1, it'll be $99, not $100.
Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.
Totally Zenned
That wasn't the question afo - it was "how can I add 10% to the price" with no mention of prior discount.
Regardless - the principle is the same; CnTGifts needs to work out the formula to apply for whatever s/he requires to do.
Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !
Totally Zenned
Ryk:
That wasn't the question afo - it was "how can I add 10% to the price" with no mention of prior discount.
Regardless - the principle is the same; CnTGifts needs to work out the formula to apply for whatever s/he requires to do.
The "add 10%" question was unclear since it followed the "10% off" question. As I said before, they'll work independently, but not in tandem.
If it's a temporary price reduction, I'd elect to go the 10% discount route available in ZC. That way, if you want to go back, you just remove it and no data has actually been touched.
Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.
Tell staff why this post should be reviewed.