Zen Cart Logo

Attribute Pricing

Locked

Views: 1,363

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
15 May 2008, 8:09 PM
#1
abcoombe avatar

abcoombe

New Zenner

Join Date:
May 2008
Posts:
36
Plugin Contributions:
0

Attribute Pricing

Is there a way to price all the attributes at once under one option name? I have 35 or so option values, and they each would add $4.00 to the product. Is there a way I can avoid having to price each one individually?
Thanks!

21 May 2008, 12:09 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Attribute Pricing

This would depend on how you have things setup and whether or not the options_id and options_values_id pair is for a given products_id to make the same price or if "all" options_id and options_values_id pair are the same price regardless of products_id ...

For ALL products_id with ALL options_values_id to be 4.00 you can use:

UPDATE products_attributes SET options_values_price = 4.00, price_prefix = '+' WHERE options_id = 12;

For ALL products_id with the same pair of options_id and options_values_id you can use:

UPDATE products_attributes SET options_values_price = 4.00, price_prefix = '+' WHERE options_id = 12 and options_values_id = 13;

For a given products_id you can adapt the code above to be:
For ALL products_id with ALL options_values_id to be 4.00 you can use:

UPDATE products_attributes SET options_values_price = 4.00, price_prefix = '+' WHERE options_id = 12 and products_id= 27;

For ALL products_id with the same pair of options_id and options_values_id you can use:

UPDATE products_attributes SET options_values_price = 4.00, price_prefix = '+' WHERE (options_id = 12 and options_values_id = 13) and products_id= 27;

NOTE: before attempting any of these, you will want to backup your database ...

NOTE: the commands can be run in the Tools ... Install SQL Patches ... from the Zen Cart Admin

27 May 2008, 6:18 PM
#3
abcoombe avatar

abcoombe

New Zenner

Join Date:
May 2008
Posts:
36
Plugin Contributions:
0

Re: Attribute Pricing

Thank you SO much! It worked. You just made my job a whole lot easier :)

27 May 2008, 6:37 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Attribute Pricing

Glad to hear that this worked for you to save you hours and hours and hours of work ... remember us when you are rich and famous ... :smartalec: