Closed whis closed 5 years ago
What is actually happening is that the plugin is applying the mark-up to the regular price rather than the sales price.
regular price: 100 + (100 0.7) = 170 sale price: 80 + (100 0.7) = 150 It does this so that the mark-up is consistent (70) across both the regular and sale prices. The plugin did it the way you suggest originally, but I received a couple of comments that it was wrong. It sounds like I need to come up with another option -- calculate percentage markups on either regular or sale prices. Would that work for you?
-- Mark Tomlinson "I am not a trouble maker; I'm a catalyst for change."
Sent: Wednesday, January 02, 2019 at 4:59 AM From: "Jiří Běloch" notifications@github.com To: Mark-Tomlinson/markup-by-attribute-for-woocommerce markup-by-attribute-for-woocommerce@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Mark-Tomlinson/markup-by-attribute-for-woocommerce] Sale prices not calculated properly (#7)
Sale prices seem not to be calculated correctly. Let's say I have a product that has a regular price of 100 and sale price set to 80, and there is an attribute that adds 70%. I would expect the equation for variation with the attribute to be the following:
regular price: 100 (1 + 0.7) = 170 sale price: 80 (1 + 0.7) = 136
Instead, it seems to do the following: 100 * (1 + 0.7) - (100 - 80) = 150
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
It would work for me. I suppose it's just about the angle how you look at it. I would prefer to have it calculated as suggested above - from the sale price.
I'll start work on that right away.
-- Mark Tomlinson "I am not a trouble maker; I'm a catalyst for change."
Sent: Wednesday, January 02, 2019 at 12:17 PM From: "Jiří Běloch" notifications@github.com To: Mark-Tomlinson/markup-by-attribute-for-woocommerce markup-by-attribute-for-woocommerce@noreply.github.com Cc: "Mark Tomlinson" mt2@technologist.com, Comment comment@noreply.github.com Subject: Re: [Mark-Tomlinson/markup-by-attribute-for-woocommerce] Sale prices not calculated properly (#7)
It would work for me. I suppose it's just about the angle how you look at it. I would prefer to have it calculated as suggested above - from the sale price.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Version 3.2 has a "Use Sale Price for Markup" option on the Markup-by-Attribute settings page.
When this check-box is checked and you set a sale price, percentage markups for the sale prices will be calculated from the sale price. When the check-box is not checked (the default), the markup that was originally calculated from the regular price will be used.
Please note that the markup amount which appears in the variation description and the drop-down box will be the markup which was calculated from the regular price. This is necessary for the description because that only lists the regular price information. The regular price markup also appears in the drop-down so that it correlates with the description and does not confuse the customer. I am not fond of this and will consider any suggestions on how to distinguish the drop-down markup as a sale markup.
Hope this meets your needs.
Thanks for the quick update, much appreciated!
Has this function been removed? I cant find it.
Sale prices seem not to be calculated correctly. Let's say I have a product that has a regular price of 100 and sale price set to 80, and there is an attribute that adds 70%. I would expect the equation for variation with the attribute to be the following:
regular price: 100 (1 + 0.7) = 170 sale price: 80 (1 + 0.7) = 136
Instead, it seems to calculate the sale price as following: 100 * (1 + 0.7) - (100 - 80) = 150