Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WC Vendors › Add product form – view subcategories
- This topic has 1 reply, 2 voices, and was last updated 5 years, 2 months ago by WCFM Forum.
Viewing 1 reply thread
- AuthorPosts
- September 19, 2019 at 3:36 am #82359aurelien_boutillierParticipant
Hello,
In the add product form, the vendor can see the categories to fill in but he has to click on the arrow to see the subcategories and then check the box (images attached).
I would like to display directly the categories and subcategories (the seller no longer needs to click on the arrow) (image attached)
Do you know if it’s possible ?
Thanks
Best regards
Aurélien.Attachments:
You must be logged in to view attached files. - September 21, 2019 at 8:04 pm #82811WCFM ForumMember
Hi,
Please add this code to your site –
add_action( 'after_wcfm_products_manage', function() { ?> <script> jQuery(document).ready(function($) { setTimeout(function() { $('#product_cats_checklist').children('.product_cats_checklist_item').each(function() { if( $(this).children('.product_taxonomy_sub_checklist').length > 0 ) { $(this).children('.sub_checklist_toggler').click(); } }); }, 1000); }); </script> <?php }, 50 );
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/Thank You
- AuthorPosts
Viewing 1 reply thread
- You must be logged in to reply to this topic.