Attributes Price Markup

Views: 1,559

Results 1 to 16 of 16
1 Jan 2013, 5:18 PM
#1
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

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.

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

2 Jan 2013, 7:58 AM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,873
Plugin Contributions:
19

Re: Attributes Price Markup

Don't find Global Price Markup but, have you tried taking a look at Quick Updates?

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

2 Jan 2013, 10:13 AM
#3
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

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.

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

2 Jan 2013, 3:56 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
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 ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

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!

2 Jan 2013, 4:02 PM
#5
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

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?

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

2 Jan 2013, 4:56 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
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 ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

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!

2 Jan 2013, 5:19 PM
#7
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

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.

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

3 Jan 2013, 11:05 PM
#8
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

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?

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

3 Jan 2013, 11:37 PM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
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

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

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!

3 Jan 2013, 11:41 PM
#10
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Attributes Price Markup

sorry it would be raise by £1.00 then markup by 20%

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

4 Jan 2013, 1:33 AM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
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 ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

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!

4 Jan 2013, 9:17 AM
#12
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

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.

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

4 Jan 2013, 9:26 AM
#13
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

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?

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

4 Jan 2013, 1:05 PM
#14
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
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 ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

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!

4 Jan 2013, 1:26 PM
#15
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Attributes Price Markup

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

Happy New Year by the way :smile:

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

4 Jan 2013, 2:28 PM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
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!

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

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!