When working with your PrestaShop store, there will be times where you may need or want to update the prices for all products at once. You may be wanting to give a discount to all products as a store-wide sale, or maybe you need to increase your prices due to an increase in supplies or manufacturers costs. While this can be done for each product one at a time, it can quickly become tedious and time consuming, especially if you have hundreds or even thousands of products. There is a way to do it much quicker by using SQL (Structured Query Language). This cannot be done within the PrestaShop back office. If you are hosting with us here at Web Hosting Hub, you can perfofm this task in your phpMyAdmin tool found in your cPanel.

Making mass price changes using SQL in phpMyAdmin

  1. Log into your cPanel.
  2. Now that you are in the cPanel, locate the Databases category and click on the phpMyAdmin icon.
    click phpmyadmin icon
  3. You are led to the main phpMyAdmin page. Take a look at the left hand sidebar and find the name of your PrestaShop database. Click on the name to begin working with it. Our database for this example is named pres764. If you are not sure of your database name, you can find it by following these instructions.
    select database from left sidebar
  4. After clicking on the database name, the right hand panel will populate with a list of tables. More importantly, the work tabs at the top appear. Click on the SQL tab to open the SQL query editor.
    click on the SQL tab
  5. From the SQL query editor, you will need to enter the code to make the price change. Below are a few sample codes to demonstrate increasing and decreasing prices by both specific amounts and percentages. PrestaShop needs to be updated in two tables to handle the change.
    sql query editor

    Sample code to increase all prices by twenty percent (20%).
    UPDATE ps_product_shop SET price = price*1.20;
    UPDATE ps_product SET price = price*1.20;

    Sample code to decrease all prices by 15 cents (.25).
    UPDATE ps_product_shop SET price = price-.15;
    UPDATE ps_product SET price = price-.15;

    Sample code to increase all prices by fifty cents (.15).
    UPDATE ps_product_shop SET price = price+0.50;
    UPDATE ps_product SET price = price+0.50;

    Sample code to decrease all prices by ten percent (10%)
    UPDATE ps_product_shop SET price = price / 1.1;
    UPDATE ps_product SET price = price / 1.1;
  6. Once you have entered a query with your desired price change, click the Go button at the bottom. This will activate the query and make the change. Your prices should now display with the new changes. Below is a before and after example of a price change where we increased the prices by 10%.
    BeforeAfter
    screenshot of prices before change screenshot of prices before change
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
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.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Did you find this article helpful?

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 757-416-6627 Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.
}