Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Feature Request › Main product categories
- This topic has 4 replies, 2 voices, and was last updated 4 years, 11 months ago by sdel_nevo.
- AuthorPosts
- December 11, 2019 at 4:44 pm #97039sdel_nevoParticipant
Hi Guys
is it possible to prevent vendors from adding products into top-level categories?
for example
main category sub-category
stationary Cardsis it possible to stop products being added to “Stationary”
Steve
- December 12, 2019 at 5:22 pm #97238WCFM ForumMember
Hi,
Please add this code to your site for the purpose-
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('.checklist_type_product_cat').addClass('wcfm_custom_hide'); } }); }, 1000); }); </script> <?php }, 50 );
Thank You
- December 12, 2019 at 7:18 pm #97255sdel_nevoParticipant
Hi Guys
OMG this is fantastic, thank you so much
it’s going to help out brilliantly
Steve
- December 12, 2019 at 7:31 pm #97258sdel_nevoParticipant
Hi Guys
the only issue I have found after adding this is
i have set Categories are required” when adding products
if no category is entered, the warning is not displayed in red after adding this code
but the product is placed into draft mode 🙂 and not published
is it possible with this code added
to also show the error when no category has been selected
really sorry to be a pain
Steve
Attachments:
You must be logged in to view attached files. - December 13, 2019 at 6:23 pm #97374sdel_nevoParticipant
Hi Guys
sorry what I meant to say in the post above is
if no category selected, please replace the “Product successfully saved” message
with the red warning, category required
steve
- AuthorPosts
- The topic ‘Main product categories’ is closed to new replies.