New Zenner
- Join Date:
- Dec 2010
- Posts:
- 51
- Plugin Contributions:
- 0
mass price change for all products in a specific category
Can it be done?
Can I make a 15% price raise on all products in a specific category?
Please help,
Chaiavi.
Started by chaiavi on 8 Dec 2010, 1:18 PM · Views: 18,167
New Zenner
Can it be done?
Can I make a 15% price raise on all products in a specific category?
Please help,
Chaiavi.
Oba-san
If all of those Products use that Category's categories_id as their master_categories_id ...
You can backup your database and then run:
UPDATE products SET products_price = products_price * 1.15 WHERE master_categories_id = XX;
where XX is the master_categories_id for these Products ...
Then, go to the Tools ... Store Manager ... and run the:
Update ALL Products Price Sorter
to be able to sort by displayed prices: Update
Linda McGrath
If you have to think ... you haven't been zenned ...
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
New Zenner
Nice hack
Thanks.
Oba-san
Thanks for the update that this was able to do the Product Price increase that you needed ... :smile:
Linda McGrath
If you have to think ... you haven't been zenned ...
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
New Zenner
Is there any addon / plugin that does the same thing without manual direct DB access?
Oba-san
You can run the same command from the Zen Cart Admin in the Tools ... Install SQL Patches ...
Otherwise, you would need to customize the code to build this in as something more user friendly ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
New Zenner
i had to update my hole store buy 11% , i used obisan's code ```php
UPDATE products SET products_price = products_price * 1.11
note this will do ALL products in the store
tyvm obi for showing me the way :)
Reguards
Andrew
http://www.ultracheapauto.com.au
New Zenner
Hi,
Where to make the modifs in the code?
Which line more precisely because I need to add a tax on a specific category for particular products??
Is it in the script 'categories.php'?
Am a newbie to Zen Cart..:smile:
Thanks
Liizz
New Zenner
liizz:
Hi,
Where to make the modifs in the code?
Which line more precisely because I need to add a tax on a specific category for particular products??
Is it in the script 'categories.php'?
Am a newbie to Zen Cart..:smile:
Thanks
Liizz
Hi Liizz - No to add tax to all your items or items from a category you can do another SQL query on your database - I am not good at SQL, but it would look something like this:
UPDATE products SET products_tax_class_id = 1 WHERE master_categories_id = XX
Where xx is the category you want to update all products :clap:
Remember - always backup before doing any SQL queries :)
Good Luck,
Ryan
New Zenner
If you use a spreadsheet program like Excel or Open Office you can do it real simple, its called Paste Special - I just learned about it.
In an empty cell (anywhere on that active sheet is fine) enter the percentage you wish to increase prices by i.e 1.35 for 35% or 1.11 for 11% etc.
Now Click CTRL C (Copy) over the cell you just created
Highlight the cells/column you wish to change
Click on EDIT -> PASTE SPECIAL
In that screen select MULTIPY
CLick OK
Your Done!
I would suggest trying it out on fresh spreadsheet to get a handle on what you're doing.:clap:
If I can find the link to that forum page I will respond back and post it. Otherwise, you should be able to find it in a google search: Paste Special (open office or excel)
Matt Doty
https://www.MoodBoosters.net
"It's better to be a Smart A$$ than a Dumb A$$
New Zenner
Hi.
Thanks for your post..
I need to copy all the products' data from MySQL & paste it in Excel..
Bt the rate at which these products may vary..
I have created a category for 'Computer Hardware' and there are different models & make.. The prices will vary based on the models as no fixed rate has been applied..
Plz give any suggestions
Thanks
Liizz
New Zenner
The only I could suggest is to break it down by category or type or however and Sort it that way.
With Paste Special, you can control what gets changed by what you have highlighted, so if you can Sort the Data to make selections easier do it that way.
But if most of your items require different rates, then there isn't much else you can do but one by one.
Matt Doty
https://www.MoodBoosters.net
"It's better to be a Smart A$$ than a Dumb A$$
New Zenner
Hi guys, does anyone know how to mass update products, but only in case if manufacturer = canon ? I'm playing with it but can't find a solution. :frusty:
Thank you.
New Zenner
Ajeh:
UPDATE products SET products_price = products_price * 1.15 WHERE master_categories_id = XX;
hi ajeh, can i just ask, will this hack work with zc 1.5.1 thanks,
regards vo ;-)
Oba-san
As that is just straight SQL, it can work with any version ...
NOTE: Be sure to backup your database before attempting it and then when done, go to the Tools ... Store Manager ... and update the:
Update ALL Products Price Sorter
to be able to sort by displayed prices:
Linda McGrath
If you have to think ... you haven't been zenned ...
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
New Zenner
thanks ajeh,
I am not worthy :bow: thanks for that
regards,
vo :smile:
New Zenner
Can this be modified at all to increase by X percent if price is over X amount of dollars?
Administrator
AquaticAddiction:
Can this be modified at all to increase by X percent if price is over X amount of dollars?
Sure, to update a set of products' prices by 11% if a product's price is greater than $7.59, you'd enter this (***after *backing up your database) in your admin's Tools->Install SQL Patches:
UPDATE products SET products_price = products_price * 1.11 WHERE products_price > 7.59;
New Zenner
lat9:
Sure, to update a set of products' prices by 11% if a product's price is greater than $7.59, you'd enter this (***after *backing up your database) in your admin's Tools->Install SQL Patches:
UPDATE products SET products_price = products_price * 1.11 WHERE products_price > 7.59;
Excellent, thank you. Now, just to add another wrench in the works - if I wanted to specify a specific category (Ex 79) to get a price increase could I do something to the effect of
UPDATE products SET products_price = products_price * 1.01 WHERE master_categories_id = 79 WHERE products_price > 300.00;
Totally Zenned
AquaticAddiction:
Excellent, thank you. Now, just to add another wrench in the works - if I wanted to specify a specific category (Ex 79) to get a price increase could I do something to the effect of
UPDATE products SET products_price = products_price * 1.01 WHERE master_categories_id = 79 WHERE products_price > 300.00;
Something "like" but different. In that case would AND the two criteria.
UPDATE products SET products_price = products_price * 1.01 WHERE master_categories_id = 79 AND products_price > 300.00;
If you wanted to modify additional fields (not just to update products_price), the field along with assignment would be separated by a comma.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Tell staff why this post should be reviewed.