Forums / Setting Up Categories, Products, Attributes / Batch change all the prices

Batch change all the prices

Views: 1,067

Results 1 to 5 of 5
31 Jul 2014, 3:48 AM
#1
cpardy avatar

cpardy

New Zenner

Join Date:
Sep 2010
Location:
Canton, MA
Posts:
12
Plugin Contributions:
0

Batch change all the prices

How can I Batch change all the prices to take of 10% without going through each individual item? I use easy populate, but that still means I have to calculate 10% off of each item pretty much manually.

Thanks in advance.

I Create things You'll Love & Cherish
www.cpardydesign.com
www.craftyhomesteader.com

31 Jul 2014, 10:18 AM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Batch change all the prices

Back up your database and do the update through SQL, using phpMyAdmin or the SQL Patches facility under Tools.
So to decrease prices by 10%

update products set products_price = products_price * 0.9;
update products set products_price = round(products_price, 2);

Remember that if you use phpMyAdmin, you must include the prefix in the table name. So if the value of DB_PREFIX in includes/configure.php is 'zen_', you would use the commands

update zen_products ...

The advantage to using the SQL Patches facility is that you don't have to worry about this.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

1 Aug 2014, 4:27 AM
#3
cpardy avatar

cpardy

New Zenner

Join Date:
Sep 2010
Location:
Canton, MA
Posts:
12
Plugin Contributions:
0

Re: Batch change all the prices

Thanks for the quick reply. I managed to calculate all of the prices quickly with a formula in Excel, then copy and paste into the correct column and used easy populate to update my product. But next time I'll try it through SQL (though it really intimidates me)

I Create things You'll Love & Cherish
www.cpardydesign.com
www.craftyhomesteader.com

1 Aug 2014, 10:29 AM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Batch change all the prices

Make a backup, and then work fearlessly!

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.