Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › Customise the add product form
- This topic has 30 replies, 3 voices, and was last updated 3 years, 9 months ago by Mathew Wright.
- AuthorPosts
- April 6, 2020 at 7:06 pm #115959ashley.youngukParticipant
Hi
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 #116278Molay DasKeymaster
Hi,
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 #141001Mathew WrightParticipant
I 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 #118421ashley.youngukParticipant
Great – 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 #119077ashley.youngukParticipant
Any ideas on this?
- April 14, 2020 at 8:42 pm #119095Molay DasKeymaster
Hi,
“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 #119096ashley.youngukParticipantThis reply has been marked as private.
- April 15, 2020 at 5:39 pm #119364ashley.youngukParticipant
Any luck looking at this…
- April 16, 2020 at 6:37 pm #119781ashley.youngukParticipant
Can someone please help with this?
- April 16, 2020 at 6:40 pm #119782Molay DasKeymaster
Yes we’re looking into it, will let you know asap.
- April 16, 2020 at 6:45 pm #119783ashley.youngukParticipant
Thank you 🙂
- April 16, 2020 at 8:33 pm #119826Molay DasKeymaster
Hi,
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 #119834ashley.youngukParticipantThis reply has been marked as private.
- April 16, 2020 at 8:46 pm #119835ashley.youngukParticipantThis reply has been marked as private.
- April 17, 2020 at 1:59 am #119888ashley.youngukParticipant
Hello – did you get chance to look at this again?
- April 17, 2020 at 5:57 pm #120020ashley.youngukParticipant
Sorry to nag but I really need this looking at so I can move forward!
Thank you!
- April 17, 2020 at 6:00 pm #120021Molay DasKeymaster
Hi,
We’re looking into it, will update you today.
Thanks,
- April 17, 2020 at 6:00 pm #120024ashley.youngukParticipant
WOW that was a quick response – thank you!
- April 17, 2020 at 7:29 pm #120056Molay DasKeymaster
Hi,
Implemented it to your website, its working now.
You didn’t enqueue the js script correctly.Thanks,
- April 17, 2020 at 7:45 pm #120063ashley.youngukParticipantThis reply has been marked as private.
- April 17, 2020 at 7:55 pm #120072Molay DasKeymaster
Hi,
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 #120074Molay DasKeymaster
Please check this video: https://drive.google.com/file/d/18IAUZDFCjRrjyflTKKOpV1GbBs5p_mkC/view
- April 17, 2020 at 8:00 pm #120075ashley.youngukParticipantThis reply has been marked as private.
- April 17, 2020 at 8:03 pm #120077Molay DasKeymaster
Please 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 #120079ashley.youngukParticipant
Ah 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 #120086ashley.youngukParticipant
*doesn’t work
- April 17, 2020 at 8:22 pm #120087ashley.youngukParticipant
Could 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 #120109ashley.youngukParticipant
Hello?
- April 18, 2020 at 11:29 am #120255Molay DasKeymaster
Hi,
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 #120259ashley.youngukParticipant
Perfect – that worked amazingly – thank you for all your help 🙂
- April 18, 2020 at 12:16 pm #120260Molay DasKeymaster
Hi,
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.