The way the plugin works is that when you use the Set regular prices or Set sale prices function on the Variations tab of a variable product, it parses through each variation and sets the price according to the price you input plus (or minus) the markups associated with that variation’s options. If the color blue has a markup, then that markup is added to any ‘blue’ variation. Additionally, the way WooCommerce works, if there is an ‘Any’ variation for that attribute, WooCommerce will select that one regardless of the other variations that are available.
I can see you do, indeed, have a LOT of potential variations. Here’s how I would handle it.
- Use
Delete all variations to clear out the troublesome variations.
- On the Attributes tab, remove the check mark from
Used for variations from the attributes that do not have a markup. (Pistol, Dominant Hand, Sweat Guard, Light, and Threaded Barrel.)
- Back on the Variations tab, you can now use
Create variations from all attributes, and it will only create 12 product variations (Four Clip Selection options times three Kydex Color options.)
- Back on the Attributes tab, re-select
Used for variations for everything. When you return to the Variations tab, you will see 7 attributes on each product variation, with ‘Any …’ selected for 5 of them.
- Now, you can safely run
Set regular prices. Markup-by-Attribute will correctly price each of the 12 variations, and WooCommerce will select the correct one when presenting it to the customer.
Does that make sense? Essentially, I think you have ‘Any Clip Selection’ and ‘Any Kydex Color’ variations available, and that throws off both Markup-by-Attribute and WooCommerce.
Doesn’t seem to work. Even if I don’t add back in the other Attributes as Variations, the markup never gets added to the regular price for those options.
-
This reply was modified 4 years, 9 months ago by
jsnow338.
What am I missing here?
I reread your original post, and I don’t think I answered your question about the Set regular prices function and the Regular Price field. No, the Set regular prices function is not the same as the Regular Price field. The function sets the price in the field across all variations at once. So, no product variations would have a price in the regular price field before you run the function, and they all would afterward. Markup-by-Attribute hooks into the function to change the price that is set in the Regular Price field. Does that help?
If that doesn’t help, we’ll have to do some debugging.
- For your sample page from your first post, how many product variations do you end up with following my suggestion? There should be 12; four different Clip Selections with three Kydex Colors each.
- The above 12 should also include Any Pistol, Any Dominant Hand, Any Sweat Guard, Any Light, and Any Threaded Barrel.
- There should be no ‘Any Clip Selection’ nor ‘Any Kydex Color’.
If all of these things are true, and you set the prices with the Set regualr prices function, do you still have the problem?
Got you, that’s what I was wondering, if I needed to do it in PHP.