One of the problems that comes of having a large inventory is making changes on a large scale. Unfortunately, this is not easily done within the default interface provided by Prestashop. For example, if you need to change all of your inventory pricing by 10%, then you would have to change each item individually. If your inventory items numbered in the hundreds or thousands, then this could quickly become too tedious a task without some type of automation. Fortunately, this can be accomplished using a SQL query. In order to make the query, you will need to have access to the MySQL database using a database client like phpMyadmin (available in the Cpanel interface). The following article will walk you through the process of creating a SQL query to update your entire inventory in the PrestaShop database.
Decease by a fixed amount of currency (code example decreases all prices by 25 cents):
UPDATE ps_product_shop SET price = price-.25
UPDATE ps_product SET price = price-.25
Decrease by a percentage (code example decreases all prices by 25%)
UPDATE ps_product_shop SET price = price / 1.25
UPDATE ps_product SET price = price / 1.25
Increase by a fixed amount of currency (code example increases prices by $1.00)
UPDATE ps_product_shop SET price = price+1.00
UPDATE ps_product SET price = price+1.00
Increase by a percentage (code example increases prices by 10%)
UPDATE ps_product_shop SET price = price*1.10
UPDATE ps_product SET price = price*1.10
In order to see the effect on the prices check out the screenshots below. The screenshots show the increase in price by $1.00:
n/a Points
|
2015-02-20 8:37 am
Thanks for this tutorial :) For those PrestaShop users who do not want such type of functionality like can use a external automatic plug-in like this http://goo.gl/l3NJTs which can automatically change the prices of all the categories or a set of products in a blink of an eye.
|
Staff 1,198 Points
|
2015-02-20 7:59 pm
Hello Michael,
Thank you for that information and I will have our team look into that plugin. Best Regards, TJ Edens |
n/a Points
|
2015-04-21 10:01 am
Hi Thanks for such tutorial. For those customers who need more customization on their web store regarding changing the price of multiple products can use this extension: http://www.fmemodules.com/en/73-bulk-price-update.html
|
n/a Points
|
2015-05-10 3:07 am
Was very helpful as it put me on path about SQL syntax. The biggest question for me was why ps_product table has to be updated also, but it perhaps makes sense in a single shop case. Anyways, I needed to update prices for a multi-store setting and in fact for a secondary one only. Thus also used filtering command "WHERE" and it did a job. Table ps_product was not touched. |
n/a Points
|
2015-07-31 6:47 pm
nothing changed |
Staff 1,198 Points
|
2015-08-01 8:18 pm
Hello Vikash,
Once you made the change have you tried clearing your browsers cache or tried to view your website in incognito mode to make sure your browser isn't caching old information? Best Regards, TJ Edens |
Email: | support@WebHostingHub.com | Ticket: | Submit a Support Ticket |
---|---|---|---|
Call: | 757-416-6627 | Chat: | Click To Chat Now |
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
new! - Enter your name and email address above and we will post your feedback in the comments on this page!