Loading
Cancel
Webmail Login
Control Panel Login
Update Zencart Prices via SQL Code
.CO.UK ONLY £5.33
Find your perfect domain here

Update Zencart Prices via SQL Code

Zencart is a fantastic e-commerce script but one feature it lacks out of the box is the ability to update all your products prices at once. The below guide will show you how to update all your product prices via a percentage (or other factor) and also how to update your attribute prices.

Your Zencart site may time out if the hosting your using isn't powerful enough, if so why not check out our Zencart hosting packages.

Step 1 : Log into your Zencart

The first thing we need to do is log into your Zencart site and move the mouse over the tools tab and click Install SQL Patches.

install SQL patch

On the next page you will see a large box and a send button. In here is where we will put the below code depending on what we want to do to the prices and to run it we click send.

SQL code box

Update Zencart Prices SQL Code

The following code statements will work and have been tested with Zencart 1.5. It is STRONGLY suggested you backup your database before doing any of the below.

On the below codes the end bit is where maths comes in. E.g. to make everything 10% more you would do * 1.10. this would multiply the current price by 1.10 and as such add 10% to the original price. You can change this to anything you want e.g. to remove £1.40 off every product you would change the ending to - 1.40.

Update All Zencart Prices SQL Code (minus attributes)

The following code will update all your products prices by 5%

UPDATE products SET products_price = products_price * 1.05;

Update All Zencart Attribute prices SQL Code

The following code will update all your attribute prices by 10%

UPDATE products_attributes SET options_values_price = options_values_price * 1.10;

Update All Zencart Prices in a specific categories SQL Code

The following code is a little different as the maths equation is in the middle instead of at the end. This will increase a chosen category by 15%

UPDATE products SET products_price = products_price * 1.15 WHERE master_categories_id = XX;

You will need to replace the XX at the end with your category id. This is listed next to the category in your admin area on the left hand side.



Leave a comment

Has this guide helped you? Have an idea for a guide or need help? Let us know below.

© Copyright 2014 | Squirrel Hosting Limited
Company Number 9031308