Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › order of appearance in adding a product page
- This topic has 9 replies, 2 voices, and was last updated 4 years, 6 months ago by Sushobhan.
- AuthorPosts
- April 28, 2020 at 3:39 am #123955aurelien_boutillierParticipant
Hi,
I would like to modify order of appearance in adding a product page.
Today I have the following order (have a look at the screenshot attached) :
1. Stock status (Inventaire)
2. Dimensions (SKU)
3. AttributesI would like to have :
1. Dimensions
2. Attributes
3. Stock statusDo you have any idea to do this ?
Thanks
Have a good day
Aurélien.Attachments:
You must be logged in to view attached files. - April 28, 2020 at 10:57 am #124045SushobhanKeymaster
Hi,
To do that you will need to override the ‘wc-frontend-manager\views\products-manager\wcfm-view-products-manage-tabs.php’ template inside your child theme. The final path should be child-theme-folder/wcfm/products-manager/wcfm-view-products-manage-tabs.php
Let me know how it goes.
Thank You! - April 29, 2020 at 3:40 am #124451aurelien_boutillierParticipant
Hi,
Thanks for your help.
I don’t understand what I have to do ? I have to copy / paste the file wcfm-view-products-manage-tabs.php in the folder child-theme-folder/wcfm/products-manager/ ?
And then what I have to do ?Have a good evening.
Aurélien - April 29, 2020 at 12:41 pm #124538SushobhanKeymaster
Hello,
Kindly use the attached file and put it under child-theme-folder/wcfm/products-manager/. I have also marked starting and ending of each tab, so that you can change the order of any block. Please make sure you copy from start to end of a tab, it looks like this-<!-- Inventory Tab start --> //here goes the content of the tab <!-- Inventory Tab end -->
Thank You!
Attachments:
You must be logged in to view attached files. - April 30, 2020 at 3:33 am #124876aurelien_boutillierParticipant
Hi Sushobhan,
thank you for your return.
It doesn’t work.
I have put the file in my theme folder.
wp-content/themes/mesmerize-pro/wcfm/products-manager/wcfm-view-products-manage-tabs.php
I understand that I can adjust the code to display the order of appearance that suits me. It’s Ok for me.And that’s all ? Or I have to do another thing ?
Thanks
Aurélien - April 30, 2020 at 11:49 pm #125187SushobhanKeymaster
Sorry, about that. When revisiting the issue I found a easier approach. Please use the following snippet for your purpose (template overriding not required)-
add_action( 'after_wcfm_products_manage', function() { ?> <script> jQuery( document ).ready( function ( $ ) { if ( $( '#wcfm_products_manage_form' ).length ) { setTimeout( function () { $form = $( '#wcfm_products_manage_form' ); $inventory = [ $form.find( '.products_manage_inventory' ).next().next().clone( true ).end().remove(), $form.find( '.products_manage_inventory' ).next().clone( true ).end().remove(), $form.find( '.products_manage_inventory' ).clone( true ).end().remove() ]; $form.find( '.products_manage_linked' ).before( $inventory.reverse() ); }, 0 ); } } ); </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/
Let me know how this goes.
Thanks! - May 1, 2020 at 2:51 am #125218aurelien_boutillierParticipant
Hi Sushobhan,
Thank you ! For the order of appearance it works :
1. Dimensions
2. Attributes
3. InventoryBut the tab “inventory” is not clickable anymore. Do you have a solution ?
Thanks
Aurélien. - May 1, 2020 at 6:46 pm #125441SushobhanKeymaster
Oh! Sorry about that. I should have tested my code 🙁
Please use the following snippet instead.add_action( 'after_wcfm_products_manage', function() { ?> <script> jQuery( document ).ready( function ( $ ) { if ( $( '#wcfm_products_manage_form' ).length ) { setTimeout( function () { $form = $( '#wcfm_products_manage_form' ); $stock = $form.find( '.products_manage_inventory' ); group = [ $stock, $stock.next(), $stock.next().next() ]; $form.find( '.products_manage_linked' ).before(group); }, 0 ); } } ); </script> <?php } );
Let me know how it goes.
Thank You! - May 2, 2020 at 1:48 am #125566aurelien_boutillierParticipant
Hi Sushobhan,
It works perfectly. Thank you very much !
Have a good evening !
Aurélien - May 2, 2020 at 12:37 pm #125647SushobhanKeymaster
You are always welcome 🙂
Let me know if there’s anything else we can help you with.
Can we ask for a favor? Would you mind taking a few minutes to review our plugin (if you haven’t already) 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.
- AuthorPosts
- You must be logged in to reply to this topic.