I fancy using the Tax module that's built in, but I've already put all my products on the shop with the price including VAT.
Is there a way in Mysql that I can remove 17.5 % off the prices across all products?
Thanks
Is there a way in Mysql that I can remove 17.5 % off the prices across all products?
Thanks
Code: Select all
update product set price = round(price/1.175,2)
Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products
Hey mystifier,
Just ran that code in the SQL query, it told me it affected 1673 rows, but my prices haven't changed a thing.
Ive got the import/Export module is there a way I can do it in Excel?
Thanks again dude
Just ran that code in the SQL query, it told me it affected 1673 rows, but my prices haven't changed a thing.
Ive got the import/Export module is there a way I can do it in Excel?
Thanks again dude

If it updated the rows, the prices will have changed. You should see that they are correct in the database product table.
Are you sure you aren't looking at cached content? Aside from your browser cache, featured products, latest products etc., are cached so you may have to delete them in /system/cache.
Product prices obviously won't be changed in orders because the price there is stored as the price at purchase.
Are you sure you aren't looking at cached content? Aside from your browser cache, featured products, latest products etc., are cached so you may have to delete them in /system/cache.
Product prices obviously won't be changed in orders because the price there is stored as the price at purchase.
Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products
Ok you were right Mystifyer, the prices did change in the database, but not on the front of the store, or in the admin section either.
I cleared my browser cache, as well as the system cache, but they are displaying the old prices.
Another problem I have, is that I believe I ran that sql query twice, so It removed 17.5% twice, so yet again, I have the wrong price. can I undo this so It only accounts for one instead of two?
Thanks
I cleared my browser cache, as well as the system cache, but they are displaying the old prices.
Another problem I have, is that I believe I ran that sql query twice, so It removed 17.5% twice, so yet again, I have the wrong price. can I undo this so It only accounts for one instead of two?
Thanks
this is impossible. are you sure you're looking at the right databaseultraspoon wrote:Ok you were right Mystifyer, the prices did change in the database, but not on the front of the store, or in the admin section either.
only if you have a backup. Once sql is run, it's runcan I undo this so It only accounts for one instead of two?
another option is to do the math in reverse and run that.
Haha, Yea, JTR, your right, Im looking at the wrong database. Ill try it again, in the correct one.
I do wonder about myself at times.

I do wonder about myself at times.
Yup worked like a charm,
Thanks Mystifyer for the sql and thanks jty for making me realise im a tool.
Thanks Mystifyer for the sql and thanks jty for making me realise im a tool.

It should be simple enough to work out from the example
To increase prices by 5% would be:

Code: Select all
update product set price = round(price*1.05,2)
Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products
mystifier wrote:It should be simple enough to work out from the exampleTo increase prices by 5% would be:
Code: Select all
update product set price = round(price*1.05,2)
I wonder if anyone can help me with an sql query that can acomplish the following as I have to setup wholesale pricing based on cost for a store that has between 5000-7500 products.
product cost * profit margin = wholesale customer group special price
The resulting amounts do not have to be pretty as these would be just for the wholesale customer group.
I know from your post and other sources that to change the main customer price with a percentage I use the following sql query:
UPDATE product SET price = ROUND(price * 1.05, 2)
I do not know too much about mysql but i guess what I wanted was a sql query something more like:
UPDATE product SET special (for specific customer group) = ROUND(cost * 1.5, 2)
Is this even possible to do? Can anyone help me with this query? I didn´t want to mess too much with the database trying to guess since the website is live.
By the way I am still on 1.4.9.4.
Thanks in advance.
Here is an extension I wrote for mass product price change.
Who is online
Users browsing this forum: Bing [Bot] and 43 guests