Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › Customise the add product form
- This topic has 30 replies, 3 voices, and was last updated 4 years, 8 months ago by
Mathew Wright.
- AuthorPosts
- April 6, 2020 at 7:06 pm #115959
ashley.younguk
ParticipantHi
I would like to change the options at the bottom of the add product form, the bit that contains the tabs for inventory, shipping, attributes etc..
Rather than tabs I would like them all displayed on the one page. Is that possible?
Can you point me in the right direction?
Thank you
- April 7, 2020 at 1:36 pm #116278
Ramamurthy Krishnan
KeymasterHi,
Please add the below code to your child theme’s functions.php file or if you are not using any child theme then please use Code Snippets plugin (https://wordpress.org/plugins/code-snippets/) to add this code to your site.
add_action( 'after_wcfm_products_manage', function() { ?> <style> .wcfm-tabWrap .page_collapsible, .wcfm-tabWrap .page_collapsible + .wcfm-container { width: 98% !important; position: relative !important; } .wcfm-tabWrap { height: auto !important; } </style> <script> jQuery( document ).ready( function( $ ) { setTimeout(function() { $('.wcfm-tabWrap .page_collapsible').off('click'); $('.wcfm-tabWrap').find('.wcfm-container').removeClass('collapse-close').addClass('collapse-open').show(); }, 2000 ); }); </script> <?php });
Thanks,
- June 13, 2020 at 2:39 am #141001
Mathew Wright
ParticipantI also need everything to be on the main page without tabs. Tried adding this snippet to my functions.php but no luck. Would you guys be able to take a look for me please?
- April 12, 2020 at 4:29 pm #118421
ashley.younguk
ParticipantGreat – thank you that worked, however now I have a problem with variations.
If the product is a variable product and I scroll down to attributes and add some they do not show in the variation section unless I untick ‘Use as variation’ and then tick it again. Is there a way to make the ‘use as variation’ checkbox uncheck by default so the vendor has to check the box in order to generate the variation?
Thank you,
- April 14, 2020 at 7:13 pm #119077
ashley.younguk
ParticipantAny ideas on this?
- April 14, 2020 at 8:42 pm #119095
Ramamurthy Krishnan
KeymasterHi,
“Use as variation” option checked by default and it should not behave like you said. Still can you please share us your website login details as private reply here. We need to check the issue.
Thanks,
- April 14, 2020 at 8:46 pm #119096
ashley.younguk
ParticipantThis reply has been marked as private. - April 15, 2020 at 5:39 pm #119364
ashley.younguk
ParticipantAny luck looking at this…
- April 16, 2020 at 6:37 pm #119781
ashley.younguk
ParticipantCan someone please help with this?
- April 16, 2020 at 6:40 pm #119782
Ramamurthy Krishnan
KeymasterYes we’re looking into it, will let you know asap.
- April 16, 2020 at 6:45 pm #119783
ashley.younguk
ParticipantThank you 🙂
- April 16, 2020 at 8:33 pm #119826
Ramamurthy Krishnan
KeymasterHi,
Please go by the following steps:
1) First create a js file named “custom-script.js” and put it inside the “js” folder (if you don’t have a “js” folder then create it) of your child theme.
2) Add the below code to your newly created “custom-script.js” file.jQuery( document ).ready( function( $ ) { $( ".wcfm_add_attribute" ).click(function() { $(".wcfm_input_attributes .variable-subscription").last().prop("checked", false); }); });
3) Add the below code to your child theme’s functions.php file.
add_action( 'wp_enqueue_scripts', 'custo_scripts_enqueue_styles', 99999 ); function custo_scripts_enqueue_styles() { wp_enqueue_script( 'custom-script', get_stylesheet_directory_uri() . '/js/custom-script.js', array( 'jquery' ), '1.0', true ); }
Thanks,
- April 16, 2020 at 8:46 pm #119834
ashley.younguk
ParticipantThis reply has been marked as private. - April 16, 2020 at 8:46 pm #119835
ashley.younguk
ParticipantThis reply has been marked as private. - April 17, 2020 at 1:59 am #119888
ashley.younguk
ParticipantHello – did you get chance to look at this again?
- April 17, 2020 at 5:57 pm #120020
ashley.younguk
ParticipantSorry to nag but I really need this looking at so I can move forward!
Thank you!
- April 17, 2020 at 6:00 pm #120021
Ramamurthy Krishnan
KeymasterHi,
We’re looking into it, will update you today.
Thanks,
- April 17, 2020 at 6:00 pm #120024
ashley.younguk
ParticipantWOW that was a quick response – thank you!
- April 17, 2020 at 7:29 pm #120056
Ramamurthy Krishnan
KeymasterHi,
Implemented it to your website, its working now.
You didn’t enqueue the js script correctly.Thanks,
- April 17, 2020 at 7:45 pm #120063
ashley.younguk
ParticipantThis reply has been marked as private. - April 17, 2020 at 7:55 pm #120072
Ramamurthy Krishnan
KeymasterHi,
I’ve tested it. it’s working fine.
Please clear your browser cache and then hard refresh, it will work. You can also check it in incognito mode.Thanks,
- April 17, 2020 at 7:59 pm #120074
Ramamurthy Krishnan
KeymasterPlease check this video: https://drive.google.com/file/d/18IAUZDFCjRrjyflTKKOpV1GbBs5p_mkC/view
- April 17, 2020 at 8:00 pm #120075
ashley.younguk
ParticipantThis reply has been marked as private. - April 17, 2020 at 8:03 pm #120077
Ramamurthy Krishnan
KeymasterPlease check the video link I sent, you can see it’s working fine here. It must be a cache issue from your end.
- April 17, 2020 at 8:07 pm #120079
ashley.younguk
ParticipantAh ok – I see it works if you create a new attribute, but what about the ones that have already been created (by me). If someone clicks on colour it does work…
- April 17, 2020 at 8:18 pm #120086
ashley.younguk
Participant*doesn’t work
- April 17, 2020 at 8:22 pm #120087
ashley.younguk
ParticipantCould I also add this
jQuery( document ).ready( function( $ ) { $( ".collapsed_checkbox[data-name="is_active"]" ).click(function() { $(".wcfm_input_attributes .variable-subscription").last().prop("checked", false); }); });
- April 17, 2020 at 9:00 pm #120109
ashley.younguk
ParticipantHello?
- April 18, 2020 at 11:29 am #120255
Ramamurthy Krishnan
KeymasterHi,
Replace the previous code with the below given code in custom-script.js file.
jQuery( document ).ready( function( $ ) { $( ".wcfm_add_attribute" ).click(function() { $(".wcfm_input_attributes .variable-subscription").last().prop("checked", false); }); $( ".wcfm_defined_attributes input.attribute_ele" ).click( function(event) { setTimeout( function() { $(event.target).closest('.wcfm_defined_attributes').find('.variable-subscription').prop( "checked", false ); }, 900 ); }); });
Thanks,
- April 18, 2020 at 12:12 pm #120259
ashley.younguk
ParticipantPerfect – that worked amazingly – thank you for all your help 🙂
- April 18, 2020 at 12:16 pm #120260
Ramamurthy Krishnan
KeymasterHi,
You’re most welcome. 🙂
Can we ask for a favor? Would you mind taking a few minutes to review our plugin at https://wordpress.org/support/plugin/wc-multivendor-marketplace/reviews/ and let others know about your 5 Star experience with WCFM Marketplace. Also, follow us on Twitter https://twitter.com/wcfmmp for more exciting news, important updates, and irresistible offers.
Thanks,
- AuthorPosts
- You must be logged in to reply to this topic.