Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Your Zen Cart Products / Setting Up Categories, Products, Attributes / Attribute Prices - Increase all of them by £5 or fixed percentage

Attribute Prices - Increase all of them by £5 or fixed percentage

Started by matt_staines on 1 Aug 2014, 3:14 PM · Views: 1,346

Results 1 to 6 of 6
1 Aug 2014, 3:14 PM
#1
matt_staines avatar

matt_staines

New Zenner

Join Date:
Oct 2013
Location:
Portishead, North Somerset, United Kingdom
Posts:
34
Plugin Contributions:
0

Post #1 by matt_staines

Hi Everyone,

Can anyone advise how I can add a set value or % to all my product attribute prices globally. I have approximately 1,000 products, each with a drop-down menu of various prices (e.g.. 1000 qty - £40 etc).

My products are priced by attributes, so I need in increase the attribute prices alone site-wide, not the base price as that is set to zero.

All products/prices are different so I cannot copy from another category. I need a MYSQL method.

Any help appreciated.

Thanks

5 Aug 2014, 4:20 PM
#2
matt_staines avatar

matt_staines

New Zenner

Join Date:
Oct 2013
Location:
Portishead, North Somerset, United Kingdom
Posts:
34
Plugin Contributions:
0

Post #2 by matt_staines

Matt Staines:

Hi Everyone,

Can anyone advise how I can add a set value or % to all my product attribute prices globally. I have approximately 1,000 products, each with a drop-down menu of various prices (e.g.. 1000 qty - £40 etc).

My products are priced by attributes, so I need in increase the attribute prices alone site-wide, not the base price as that is set to zero.

All products/prices are different so I cannot copy from another category. I need a MYSQL method.

Any help appreciated.

Thanks

Okay, so I've figured out I can use:

update products_attributes set options_values_price = options_values_price +5;
``` to update all my prices in attributes. Unfortunately this updates ALL attributes such as "file upload" and other attributes that do not have prices on my store resulting in a price appearing next to them.

Can anyone tell me how I would update a specific attribute?
5 Aug 2014, 4:26 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #3 by mc12345678

Couple of ways. There's easyPopulate whichwould allow you to download, update the prices, then upload.

There's what you had, but if understood correctly you don't want to update prices of things that currently have a zero value, so you could append WHERE options_values_price != 0

The other thing would be to use the WHERE clause to omit attributes of a certain type. I apologize that iable to recall nor investigaate the fields in that table to advise of the proper option(s) to choose from, but looks like you are marching down the right path.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

5 Aug 2014, 4:28 PM
#4
matt_staines avatar

matt_staines

New Zenner

Join Date:
Oct 2013
Location:
Portishead, North Somerset, United Kingdom
Posts:
34
Plugin Contributions:
0

Post #4 by matt_staines

Thanks.

Just worked it out with a bit of MSQL googling!

update zen_products_attributes set options_values_price = options_values_price +5 where options_id=X
5 Aug 2014, 4:33 PM
#5
matt_staines avatar

matt_staines

New Zenner

Join Date:
Oct 2013
Location:
Portishead, North Somerset, United Kingdom
Posts:
34
Plugin Contributions:
0

Post #5 by matt_staines

This would make a good admin function. Something to update certain attributes globally.

Choose Attribute [options_id]---> Change by % or fixed value ---> Update [run sql script].

5 Aug 2014, 7:16 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #6 by mc12345678

I haven't had to do something like that, but I seem to remember some modifications were possible globally associated with attributes in the option names/option values sections. It may only be a copy/delete capability, but there does seem to be some options to copy costs associated with the lower option/selection.

Further, because I haven't had to do that type of mass work, I haven't come to understand exactly the full capabilities offered there. I've seen explanations and ithas made sense at the time, but don't use it lose it wins in that regards. :)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...