Plugin not changing price
-
Im sure this is just inexperience with the plug in.
I created a product that requires customers to enter in custom measurements. I add the variation to the product with the options bevel or no bevel. If they select bevel then we add 10% to the price. no bevel is standard pricing.
i cant figure out why it isnt adding the additional 10% to the price after they enter in the measurements.
The page I need help with: [log in to see the link]
-
I figured it out
Glad you did! Thanks for using the plugin.
What did you do to fix it? I’m having the same issue.
I never learned from the original poster how they resolved their issue. However, when I’ve seen this before, it’s usually a matter of not running the [Set regular prices] function after adding the markup to the attribute. This is because the plugin hooks into the [Set regular prices] and [Set sale prices] functions.
I hate to sound like a newbie, but I’m not sure how to run that function. I’m using the same plugin, but have the pricing table in use so I can’t set regular pricing. Also, this allows me to add a percentage increase to the base, right? So the size is the first thing they select, then if the want a red one I want it to add 20% to the price set by the size. I.E. the 22″ width is $100 and if they want it red it will be $120. Am I understanding that right?
-
This reply was modified 5 years, 9 months ago by
caliansigns.
I’ll answer your last question first. The base price is the price without any options selected. So, in your example, selecting the size does not set the base price. Let’s say that your base price is $80 and 20″ has no markup, whereas 22″ has a $20 markup, yielding $100 for 22″. The 20% markup for Red would be calculated off $80, for a total of $116.
I’ve considered methods of prioritizing the attributes so that you can do cumulative calculations, but that would require extensive changes to the plugin which I do not believe I can support. You may be better off with a plugin that applies a user-defined formula to a ‘Simple product’, rather than Markup by Attribute, which requires a ‘Variable product’.
To your first concern: Markup by Attribute uses global attributes and variable products. I’ve written some usage instructions that contains links to the relevant areas of the WooCommerce documentation. The [Set regular prices] function appears on the Variations tab of a variable product.
I hope that was helpful.
In understand what you are saying. I appreciate your help!
I did not want to create a new ticket but i also experience the problem with the plugin not changing the price according to markup.
I followed the instructions in https://github.com/Mark-Tomlinson/markup-by-attribute-for-woocommerce/wiki/Usage. Thought that the problem would be due to , being the delimiter, changed it to . but still nothing. When i set regular price, all products receive that regular price no matter what the markup is.
My attributes are:
Type:
1) 0 markup
2) +5 markup
3) +5 markupTechnique:
1) 0 markup
2) +9 markup
3) +5 markup
4) +13 markupWooCommerce creates 12 variations, which i think is correct.
But when i Set regular prices e.g. 5, all variations show 5.Is there a way to debug this from my side?
The delimiter does not make any difference to the plugin. That is really just a display format managed by the WooCommerce currency settings. And yes, you should have 12 variations because you have three options (Type) times four options (Technique).
It sounds like you are doing everything correctly. You must have created global attributes, or you would not have been able to set the markup. You must be using variable products, or you wouldn’t have any variations. You must have checked the
Used for variationsbox when adding the attributes to the product, or the[Create variations from all attributes]functions would not have worked. And, you mention that you “set regular price”, so I assume you mean you are using the[Set regular prices]function. That’s really all there is to using Markup by Attribute.Does the description of any variation change? If you’re using the default settings of Markup by Attribute, you should see an explanation of the markup added to the description of the variations that have a markup. If the description changed but the price did not, then the problem is somewhere inside the plugin. If none of the descriptions changed, then it’s probable that the plugin is not being invoked or being invoked out of order (due to, perhaps, a conflict with another plugin).
First of all, thank you for your quick reply.
Yes, I meant
Set regular prices.The dropdown options show correct markups.
The description is not updated.I tried to deactivate all plugins except Woocommerce and Markup by Attribute but results were the same.
Since i have full permissions to all directories and files, can I somehow enable logs?
Here’s what that answers for me.
Since the dropdown is working that shows that there is nothing wrong with the plugin installation and the attributes are being updated correctly. But the dropdown is updated in real time in the store, while the prices are adjusted on the database when the
[Set regular prices]function is run. That narrows the scope of the problem to one module, “/src/product.php”.Since you disabled any other plugins, it isn’t a conflict or prioritization problem with another plugin. That tells me the problem is probably not how the plugin hooks into WooCommerce.
So, the next question is one I think you would have mentioned, but I need to ask anyway. When you run
[Set regular prices], how long does it take to finish? With 12 variations, I think it should be fairly quick. However, does it appear to run forever and you have to refresh the page to make the little in-progress indicator go away? If so, that would indicate an abend.The only way we’ll find an abend is by turning on the WordPress debug log. Here’s how to enable the debug.log; https://ww.wp.xz.cn/support/article/debugging-in-wordpress/. However, I’ve found it is generally easier to just use a plugin. I use WP Debugging at https://ww.wp.xz.cn/plugins/wp-debugging/.
If it appears to be abending, can you clear the log, run
[Set regular prices], and then send whatever errors you receive to [email protected]? I don’t want you posting the error log here because you might inadvertently expose sensitive information.Thanks for your patience.
Problem solved!
Unfortunately, i do not remember exactly all my actions but changing the attribute slug seemed to fix it. First, I deactivated again all plugins. Then changed All Slugs (which were in Greek). After this, (Markup: +5) was shown in attribute description. Then i deleted all variations and attributes in product and created them again and it worked. Enabling the plugins didn’t cause any trouble.
@marktomlinson Thank you very much for your help and quick replies.
You’re welcome! Glad you fixed it.
-
This reply was modified 5 years, 9 months ago by
The topic ‘Plugin not changing price’ is closed to new replies.