• Resolved jsnow338

    (@jsnow338)


    I just found your plugin the other day and think it’s exactly what I need, but I’m having trouble getting the Markup to add to the price.
    You’ve mentioned in other threads to set the base price with the Set Regular Prices function. That’s the same as the Regular Price field in a Variation isn’t it?
    In my example, since there are so many options, a single variation with every Attribute set to Any makes the most since. Only those attributes that need a markup would have them. Is there something I’m missing in how I need to set the Regular Prices or could I have another plugin interfering somehow?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mark Tomlinson

    (@marktomlinson)

    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.

    1. Use Delete all variations to clear out the troublesome variations.
    2. 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.)
    3. 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.)
    4. 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.
    5. 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.

    Thread Starter jsnow338

    (@jsnow338)

    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 3 years, 6 months ago by jsnow338.
    Plugin Author Mark Tomlinson

    (@marktomlinson)

    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?

    Thread Starter jsnow338

    (@jsnow338)

    Got you, that’s what I was wondering, if I needed to do it in PHP.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Markup not adding to price’ is closed to new replies.