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.

 

Creating the SQL Query for a Mass Price Update

  1. Login to the Cpanel
  2. Scroll down the Cpanel interface until you find the DATABASES section.  Click on phpMyAdmin to continue.List of databases in phpMyAdmin
  3. When the phpMyAdmin interface opens, the list of database will be in a column on the left (as per the screenshot at right).  Scroll through this list of databases until you find the database associated with your PrestaShop 1.5 installation. If you need help finding your database name, go to Locating the Database Name Prestashop 1.5 store.
  4. Click on your database once you find it.  This will change the screen view to show the tables that make up the structure of the Prestashop database.
  5. At the top of the phpMyAdmin interface you will see the tab labeled SQL.  Click on this tab in order to build the query.
  6. The following listed code samples provide you the code that you can enter in order to make your bulk price changes:

    To Decrease the price:

    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


    To Increase the price:

    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

    Select the code that best meets your needs and enter this code into the SQL query window that you opened in Step 5.
  7. After you have finished entering the code, click on the GO button in the bottom right of the screen.  Note that this will change the prices for all of your products.


In order to see the effect on the prices check out the screenshots below.  The screenshots show the increase in price by $1.00:

Original Price for featured products Screenshot shows increase in price




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!

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
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.