Support » Plugin: Product Add-Ons WooCommerce » Generating the add-on groups manually?

  • Resolved skysarwer


    Hello there,

    Love the plugin. I would like to generate the add-on groups on my content-single-product template page manually so that I can wrap them in containers and implement conditional logic, formatting and other things. I am having trouble figuring out how to do so.

    Is there any quick way of going about this? Are the add-on groups registered under any particular post-type or taxonomy?

    Thank you very much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author bizswoop


    Thank you for the feedback, we appreciate it. 

    Regarding your question, we’re not sure we fully understand the use case or overall feature request you require. To answer your question, right now, product add-on groups uses a custom DB table, not post-type or taxonomy.

    If you can provide us some additional information and details, we’d be happy to evaluate. But to be upfront, this is not a support request and closer to a unique customization request and or feature request. As a result, we might not be able to support this functionality at this time being outside a support request. 

    One recommendation, if we are unable to support this customization effort, and it’s outside your development experience, you can also look to hire on a developer to help you build out the solution you require, a great resource to check out would be:  or other third party developer communities. 

    We’ll go ahead and close the post forum topic, but feel free to update the post with more details and we’d follow-up if we’re able to support this effort or consider it for a future feature to the plugin.

    Thank you very much for the reply!

    Yes I can see how this use case would be seen as a customization request. I am working on finding a solution independently and am happy to share more details.

    If there is a simple way to have the html code for the product groups generated inside the single-content-product template or something it would enable the adding of unique classes and IDs to the input and label fields, which the user can then add their own CSS and JS logic to.

    Of particular interest, this can allow users to assign different default values for different products that use the same fields, disabling and enabling fields based on the status of other inputs, and a lot more that I can see having wide appeal as features.

    I have tried to implement a solution you can see here (the “chest center” and “precious stone” field and values give a good example of newly introduced logic), by copying the html that the plugin generated, pasting it into my page template, then setting the display of the original html to none. It works on the client side, however the fields do not validate or carry over now to the cart or checkout page.

    I am trying to read through the product.php file and the templates in the frontend directory to see how I might enable them to be validated like the originally generated fields, but am not having success applying the rules to validate the fields on checkout.

    If there is a quick solution you can see from your perspective – it would be hugely appreciated and unlock a ton of potential that this plugin can have. Even just pointing me in the right direction would be a huge help – I’ll be sure to come back on here to share if I find a solution of course 🙂

    Thank you very much!

    • This reply was modified 1 month, 3 weeks ago by skysarwer.
    Plugin Author bizswoop


    Thanks for the additional details and reference to your site. The reason the copy and paste attempt of the HTML on the rendered front-end code won’t be a solution for you is due to the fact the plugin is developed in REACT.

    Based upon the objectives you wish to achieve, we think the simplest solution is developing ID and CSS fields to group settings. This would allow you to add an ID and CSS for each individual add-on group. To clarify, we would probably support the add-on group in full for the ID and CSS fields, not specifically on a label level within the add-on as this could get complex quickly with nesting of the group level versus label level.

    This functionality has been planned in our Roadmap, but a lower priority. If you think this could solve and allow you the flexibility you need to develop customization on the add-on group level, let us know and we can look to prioritize that feature this quarter.

    Hey! Thanks for your reply!

    I ended finding a solution suitable to my needs, very similar to what you laid out. I went into the frontend files and generated IDs and Classes based on the Group and Value titles and IDs – allowed a lot of new functionality that solved my issues.

    I will write a comprehensive report on what I did in a new post, after I tweak it a little 🙂 Thank you!

    If I may add another note: I think the best thing to prioritize would be enabling the user to change the order of the type values (the labels, or individual options). Right now if the user adds a new option and wants it in the middle of their existing Group or row, they have to rewrite all the options from scratch.

    Plugin Author bizswoop


    Thanks for the updates. Once you complete your work. Definitely provide us a comprehensive report. We’d love to collaborate and understand the items we can implement to make developing and using the plugin easier.

    Right now from the post discussion, we are tracking the following request: Adding CSS and ID fields to add-on groups and ability to modify front-end display order for the label options. After we get the comprehensive report, we’ll review and prioritize based upon complexity and roadmap plans.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.