Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards!

Addons – remove field type

WCMp Advanced Frontend Manager

Tagged: 

Resolved
Viewing 3 reply threads
  • Author
    Posts
    • #141603
      Uros Eleven
      Participant

      hi, how do I remove a field type(s) when creating addons – for example checkbox, multi-select, etc… (see attached image)? We only need to have 2 options, and remove the rest. Right now I’m using display:none one the ul “option”, but it’s not working in Safari.

    • #141626

      Hi,
      Kindly override wcmp-frontend_product_manager/views/products/product-addons/html-product-addons.php template by copying it to yourtheme/wcmp-afm/products/product-addons/html-product-addons.php

      Then you have to remove options as per your requirement.
      checkout after line no 87

      Regards,

    • #141630
      Uros Eleven
      Participant

      Hi, I managed to do it with the following jQuery, if maybe some of your users need this solution:

      jQuery(document).ready(function( $ ){
      $(“#wc-pao-addon-content-type-0 option[value=custom_text]”).remove();
      $(“#wc-pao-addon-content-type-0 option[value=custom_textarea]”).remove();
      $(“#wc-pao-addon-content-type-0 option[value=file_upload]”).remove();
      $(“#wc-pao-addon-content-type-0 option[value=custom_price]”).remove();
      $(“#wc-pao-addon-content-type-0 option[value=input_multiplier]”).remove();
      $(“#wc-pao-addon-content-type-0 option[value=heading]”).remove();
      });

      it can be placed into Custom JS for example…

      Thank you anyway for your feedback!

    • #141677

      @Uros Eleven, this is not a permanent solution, as when you will be updating the plugin, you code will also be removed.

      So, it is better to add the code in the function.php or override the template file.

Viewing 3 reply threads

The topic ‘Addons – remove field type’ is closed to new replies.