Attributes Price Markup

Results 1 to 16 of 16
01 Jan 2013, 17:18
#1
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Posts:
1,230
Plugin Contributions:
2

Attributes Price Markup

Is there a way to add markup to product prices including product attribute prices for v1.5?

I am aware of the Global Price Markup Mod but it doesn't work with v1.5, or at least I couldn't get it to install correctly as it appears that the DB script has a fault during installation.

I need to add 20% markup to all product attribute prices and if it has to be done in the Database that is fine.
02 Jan 2013, 07:58
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Posts:
9,707
Plugin Contributions:
6

Re: Attributes Price Markup

Don't find Global Price Markup but, have you tried taking a look at Quick Updates?
02 Jan 2013, 10:13
#3
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Posts:
1,230
Plugin Contributions:
2

Re: Attributes Price Markup

I had a look at that and have installed it but it doesn't appear to put a percentage on attributes prices, only the product prices.##All my products show zero values in quick updates due to them being priced by attributes. So I need another way.
02 Jan 2013, 15:56
#4
ajeh avatar

ajeh

Oba-san

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

Re: Attributes Price Markup

To raise the Attribute Price of ALL Attributes you could use:
UPDATE products_attributes SET options_values_price = options_values_price * 1.20;


This will raise all Attribute Prices by 20% ...

NOTE: Backup your database before running this ...

NOTE: You can run this in your Zen Cart Admin in the Tools ... Install SQL Patches ...
02 Jan 2013, 16:02
#5
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Posts:
1,230
Plugin Contributions:
2

Re: Attributes Price Markup

Ajeh:

To raise the Attribute Price of ALL Attributes you could use:
UPDATE products_attributes SET options_values_price = options_values_price * 1.20;


This will raise all Attribute Prices by 20% ...

NOTE: Backup your database before running this ...

NOTE: You can run this in your Zen Cart Admin in the Tools ... Install SQL Patches ...



Perfect, thats exactly what I'm looking for. Out of interest how would I do this per category?
02 Jan 2013, 16:56
#6
ajeh avatar

ajeh

Oba-san

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

Re: Attributes Price Markup

That gets a bit more complicate ...

But you could try, to update the Attribute Prices ONLY in master_categories_id 67 to use:
UPDATE products_attributes as pa 
LEFT JOIN products as p ON  pa.products_id = p.products_id
LEFT JOIN products_options_values as pov ON pov.products_options_values_id = pa.options_values_id
SET pa.options_values_price = pa.options_values_price * 1.20
WHERE p.master_categories_id = 67;


NOTE: Backup your database before trying this ...
02 Jan 2013, 17:19
#7
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Posts:
1,230
Plugin Contributions:
2

Re: Attributes Price Markup

Ajeh:

That gets a bit more complicate ...

But you could try, to update the Attribute Prices ONLY in master_categories_id 67 to use:
UPDATE products_attributes as pa 
LEFT JOIN products as p ON  pa.products_id = p.products_id
LEFT JOIN products_options_values as pov ON pov.products_options_values_id = pa.options_values_id
SET pa.options_values_price = pa.options_values_price * 1.20
WHERE p.master_categories_id = 67;


NOTE: Backup your database before trying this ...


Ok thanks Linda will give this a go.
03 Jan 2013, 23:05
#8
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Posts:
1,230
Plugin Contributions:
2

Re: Attributes Price Markup

Linda what would I do if I wanted to add £1.00 to all attributes and then markup by 20%? or the other way around?
03 Jan 2013, 23:37
#9
ajeh avatar

ajeh

Oba-san

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

Re: Attributes Price Markup

Think that through for a minute ...

Do you want to:
1 add $1.00 then raise by 20%

Or ...

Do you want to:
raise by 20% then add a $1.00
03 Jan 2013, 23:41
#10
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Posts:
1,230
Plugin Contributions:
2

Re: Attributes Price Markup

sorry it would be raise by £1.00 then markup by 20%
04 Jan 2013, 01:33
#11
ajeh avatar

ajeh

Oba-san

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

Re: Attributes Price Markup

If the goal is for Attribute Price to change:

10.00 to 13.20
100.00 to 121.20
5.00 to 7.20
99.00 to 120.00


then use the SQL of:
UPDATE products_attributes as pa 
LEFT JOIN products as p ON  pa.products_id = p.products_id
LEFT JOIN products_options_values as pov ON pov.products_options_values_id = pa.options_values_id
SET pa.options_values_price = ((pa.options_values_price +1.00) * 1.20)
WHERE p.master_categories_id = 67;


NOTE: Be sure to backup your database before trying this ...
04 Jan 2013, 09:17
#12
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Posts:
1,230
Plugin Contributions:
2

Re: Attributes Price Markup

Ajeh:

If the goal is for Attribute Price to change:


then use the SQL of:
UPDATE products_attributes as pa 
LEFT JOIN products as p ON  pa.products_id = p.products_id
LEFT JOIN products_options_values as pov ON pov.products_options_values_id = pa.options_values_id
SET pa.options_values_price = ((pa.options_values_price +1.00) * 1.20)
WHERE p.master_categories_id = 67;


NOTE: Be sure to backup your database before trying this ...


Ok thanks again Linda, thats exactly what I need.
04 Jan 2013, 09:26
#13
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Posts:
1,230
Plugin Contributions:
2

Re: Attributes Price Markup

Nick1973:

Ok thanks again Linda, thats exactly what I need.


Actually Linda while I need that solution I also need it globally so would I do something like

UPDATE products_attributes SET options_values_price = options_values_price +1.00 * 1.20;

if I wanted to update every products attributes by £1.00 and then add 20% globally?
04 Jan 2013, 13:05
#14
ajeh avatar

ajeh

Oba-san

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

Re: Attributes Price Markup

I would use:
UPDATE products_attributes SET options_values_price = ((options_values_price +1.00) * 1.20);


NOTE: Again, be sure to backup and test this to ensure that all is right in the world when done ...
04 Jan 2013, 13:26
#15
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Posts:
1,230
Plugin Contributions:
2

Re: Attributes Price Markup

Thanks again Linda, I think thats everything I need now on this part.

Happy New Year by the way :smile:
04 Jan 2013, 14:28
#16
ajeh avatar

ajeh

Oba-san

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

Re: Attributes Price Markup

You are most welcome ... glad that you have this all sorted out ... :cool:

Have a great New Year!