Zen Cart Logo
Forums / General Questions / Increase price on all products universally?

Increase price on all products universally?

Views: 23,313

Results 1 to 20 of 79
10 Nov 2007, 4:53 PM
#1
Join Date:
May 2007
Posts:
3
Plugin Contributions:
0

Increase price on all products universally?

Hello guys

I need to increase 35% to all my products in zen_products

Can you help with the script to used in mysql

Please help..........

10 Nov 2007, 5:40 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Increase price on all products universally?

This is two step ...

Backup your database before doing this ...

In the Tools ... Insert SQL Patch ... you can run the command:

UPDATE products SET products_price = products_price * 1.35;

Then go to the Tools ... Store Manager ... and run the Update Products Price Sorter ...

NOTE: If you have attributes you have to look to see if you can use something similar for them as well ...

NOTE: if you have Specials, you will need to update those as well but it depends on how your specials are made ...

11 Nov 2007, 10:51 PM
#3
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Increase price on all products universally?

I'll thank you for that one!! Handy little tid-bit!
Marg

12 Nov 2007, 12:26 PM
#4
Join Date:
May 2007
Posts:
3
Plugin Contributions:
0

Re: Increase price on all products universally?

Hello AJEH

your MYSQL script work very good.........

thanks

12 Nov 2007, 4:31 PM
#5
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Increase price on all products universally?

i have a post regarding inflation etc and it goes into a little more detail. if you search for inflation you should find it.

17 Mar 2008, 7:31 PM
#6
coucho avatar

coucho

Zen Follower

Join Date:
Jan 2008
Location:
Memphis, USA
Posts:
298
Plugin Contributions:
0

Re: Increase price on all products universally?

Ajeh:

This is two step ...

Backup your database before doing this ...

In the Tools ... Insert SQL Patch ... you can run the command:

UPDATE products SET products_price = products_price * 1.35;

> 
> Then go to the Tools ... Store Manager ... and run the Update Products Price Sorter ...
> 
> NOTE: If you have attributes you have to look to see if you can use something similar for them as well ...
> 
> NOTE: if you have Specials, you will need to update those as well but it depends on how your specials are made ...

If I need to decrease prices by 5% do I change the 1.35 referenced in the quote to 0.95?
6 Sep 2008, 10:46 AM
#7
raimond avatar

raimond

Zen Follower

Join Date:
Jul 2004
Location:
The Netherlands, Wierden
Posts:
423
Plugin Contributions:
0

Re: Increase price on all products universally?

Don't forget the products_price_sorter either with this

UPDATE products SET products_price_sorter = products_price_sorter * 1.35;  
6 Sep 2008, 8:54 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Increase price on all products universally?

Wait ... don't do the Products Price Sorter in that method ... :eek:

You want to use the updater in the Tools ... Store Manager ... as I mentioned above to do the fix on the products_price_sorter ...

That price is not always the same as the products_price and updates to it need to be processed ...

While a percentage change to both fields may "appear" to work, this is not always the case and will result in displays in price order to become jumbled ...

It can work under "some" circumstances, however, the safe and sure way to update that field is to use the Update in the Store Manager and do it the right way ... :smile:

28 Jan 2009, 1:07 PM
#9
miles avatar

miles

Zen Follower

Join Date:
Oct 2006
Location:
At Home
Posts:
357
Plugin Contributions:
0

Re: Increase price on all products universally?

If I want to increase the price to 4%, is this the right setting?

UPDATE products SET products_price = products_price * 0.04;
28 Jan 2009, 1:07 PM
#10
data_digger avatar

data_digger

Zen Follower

Join Date:
Jan 2009
Posts:
222
Plugin Contributions:
2

Re: Increase price on all products universally?

No, this is:

UPDATE products SET products_price = products_price * 1.04;  
28 Jan 2009, 1:11 PM
#11
miles avatar

miles

Zen Follower

Join Date:
Oct 2006
Location:
At Home
Posts:
357
Plugin Contributions:
0

Re: Increase price on all products universally?

If I want to set back to normal (no increase), how do remove it from the database?

28 Jan 2009, 2:27 PM
#12
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Increase price on all products universally?

coucho:

If I need to decrease prices by 5% do I change the 1.35 referenced in the quote to 0.95?

Yes.

Miles' question is a little trickier if the prices were previously increased. I'll have to think about how to decrease after an increase.

28 Jan 2009, 2:44 PM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Increase price on all products universally?

The easier solution for that would be to add a new field to "hold" the products_price ... such as:
products_price_original

Copy all the prices to that field first, then you can update the products_price as needed ...

When you want to put the prices back, you can copy those original prices stored in products_price_original ...

Otherwise, you could do a reverse calculation on the products_price field for how you altered the price ...

The difference between the two would be rounding issues ...

29 Jan 2009, 4:10 PM
#14
Join Date:
May 2007
Posts:
3
Plugin Contributions:
0

Re: Increase price on all products universally?

remember backup mysql................

backup,
backup,
backup
before do anithing

29 Jan 2009, 5:51 PM
#15
miles avatar

miles

Zen Follower

Join Date:
Oct 2006
Location:
At Home
Posts:
357
Plugin Contributions:
0

Re: Increase price on all products universally?

The easier solution for that would be to add a new field to "hold" the products_price ... such as:
products_price_originalI opened PHP MyAdmin. Is this the right TABLE where I should add a new field?

zen_products

Now I have already noticed the products_price field in **zen_products **table. If this the right table, how do I create a new field (products_price_original)?

3 Feb 2009, 2:59 AM
#16
virtual avatar

virtual

New Zenner

Join Date:
Feb 2007
Posts:
4
Plugin Contributions:
0

Re: Increase price on all products universally?

Hello Ajeh, Thanks for your great advice. Would you please advise how to do a Global Update of the pricing on a particular category of products on our ZenCart as opposed to all products? In our instance we want to increase our Stickers from $2.5454 net to $2.73 net?

The stickers are grouped into further categories however all the prices should be upgraded as above. Our site is:
http://papercraftsupplies.com.au/shop/index.php

We're using Version 1.3.8a (the most recent version)
We don't have any add-ons
We have customized templates in accordance with the e-Start User Guide.

Many thanks,
Eva

3 Feb 2009, 6:08 PM
#17
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Increase price on all products universally?

You could do it based on the master_categories_id on each product but this would not do the subcategories as that is not immediately realted ...

UPDATE products SET products_price = products_price * XX.XX where master_categories_id = YY;

where XX.XX is the percentage to update the price and YY is the Master Category that the Products belong to ...

5 Feb 2009, 9:30 AM
#18
virtual avatar

virtual

New Zenner

Join Date:
Feb 2007
Posts:
4
Plugin Contributions:
0

Re: Increase price on all products universally?

Thank you so much Ajeh,

This information guided me to make the changes - which I was able to make within seconds!!! Wow!

Eva
P.S. I hope you enjoyed your cup of coffee yesterday. :smile:

5 Feb 2009, 2:46 PM
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Increase price on all products universally?

Glad that this was able to help you out ... and we really appreciate the support to keep Zen Cart humming along ... :smile:

17 Apr 2009, 3:07 PM
#20
time111 avatar

time111

New Zenner

Join Date:
Sep 2008
Posts:
95
Plugin Contributions:
0

Re: Increase price on all products universally?

Ajeh:

You could do it based on the master_categories_id on each product but this would not do the subcategories as that is not immediately realted ...

UPDATE products SET products_price = products_price * XX.XX where master_categories_id = YY;

> 
> where XX.XX is the percentage to update the price and YY is the Master Category that the Products belong to ...

Hi,

Can you please say me how to change price for sub-category in place of master-category as you given above.

~ Time