Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Mandatory Attribute Visible on Product Page
Tagged: mandatory, product page, show attribute, vendor
- This topic has 4 replies, 3 voices, and was last updated 4 years, 7 months ago by Sushobhan.
- AuthorPosts
- April 7, 2020 at 1:09 am #116079contatoappParticipant
The vendor option for the attribute to be shown on the product page is not mandatory. How can I make it so?
- April 9, 2020 at 9:45 pm #117369contatoappParticipant
Hi. Does anyone have a solution for this? Thanks.
- April 12, 2020 at 12:29 pm #118327WCFM ForumMember
HI,
All attributes or only some specific one?
Between, when vendors add products “Show on Product” page option by default comes with “check”. Now if vendor disabled that then it’s his/her choice.
Thank You
- April 12, 2020 at 10:44 pm #118512contatoappParticipant
Hi. What I meant is that the “Show on product page” option should be mandatory so vendors are required to check it. So all the product attributes are always shown.
- April 13, 2020 at 8:55 pm #118797SushobhanKeymaster
Hi,
Kindly use the following snippet for this purpose-add_action( 'after_wcfm_products_manage', function() { ?> <script> jQuery(document).ready(function($) { if($('#attributes').length) { $('#attributes').on('click', '[id^="attributes_is_active_"],[id^="attributes_is_visible_"]', function() { $(this).closest('.wcfm_attributes_blocks').find('[id^="attributes_is_active_"],[id^="attributes_is_visible_"]').prop('checked', this.checked); }); } }); </script> <?php } );
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/
Thanks!
- AuthorPosts
- You must be logged in to reply to this topic.