When using e-commerce programs, it is inevitable that you will need to change prices from time to time. In some cases, however, you may need to increase all prices up or down by a specific amount or percentage. If you have a large number of products this will be extremely time consuming. Though osCommerce does not have the ability to make price changes to all products at once, you can still do it via a short SQL query via your phpMyAdmin. Follow along below as we guide you in how to perform a mass price change in osCommerce using MySQL.

How to perform an osCommerce bulk price change in phpMyAdmin

  1. Log into your cPanel dashboard.
  2. Locate the Databases catageory and click on the phpMyadmin tool icon.
    click phpmyadmin icon
  3. Now that you are in the phpMyAdmin are, the database name for your osCommerce in the left side panel. Click on the name of the database to open its information in the right panel.
    click database name
  4. A list of all the tables will appear in the right panel along with a row of tabs across the top of the panel. Click on the SQL tab to move to the next step.
    click sql tab
  5. This is the SQL Query construction screen where you will construct the query that will add the price change to the database. Look below for a few code samples.


    Sample code to increase all prices by fifteen cents (.10).
    UPDATE products SET products_price = products_price+0.10

    Sample code to decrease all prices by ten percent (10%).
    UPDATE products SET products_price = products_price*.90

    Sample code to increase all prices by ten percent (15%).
    UPDATE products SET products_price = products_price*1.15
  6. After entering the query code, click on the Go button in the lower right hand corner to send the command to the MySQL database to perform the price change. For our example, we will lower all prices by 15% (perhaps for a store-wide sale).
    query construction screen
  7. Once the query runs, a success message will appear at the top displaying the number of rows that were changed. Below is a before and after example of some prices using this method.
    BeforeAfter
    prices before query prices after query run
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 our Help Center:
Email Address
Optional, but our team may contact you for more information.
Did you find this article helpful?

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

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

News / Announcements

Update to SSL Certificates - Certificate Warnings
1969-12-31 11:00 am EST
Hits: 636

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.