order of appearance in adding a product page

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 9 reply threads
  • Author
    Posts
    • #123955

      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. Attributes

      I would like to have :
      1. Dimensions
      2. Attributes
      3. Stock status

      Do you have any idea to do this ?

      Thanks
      Have a good day
      Aurélien.

      Attachments:
      You must be logged in to view attached files.
    • #124045
      Sushobhan
      Keymaster

      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!

    • #124451

      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

    • #124538
      Sushobhan
      Keymaster

      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.
    • #124876

      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

    • #125187
      Sushobhan
      Keymaster

      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!

    • #125218

      Hi Sushobhan,

      Thank you ! For the order of appearance it works :
      1. Dimensions
      2. Attributes
      3. Inventory

      But the tab “inventory” is not clickable anymore. Do you have a solution ?

      Thanks
      Aurélien.

    • #125441
      Sushobhan
      Keymaster

      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!

    • #125566

      Hi Sushobhan,

      It works perfectly. Thank you very much !

      Have a good evening !
      Aurélien

    • #125647
      Sushobhan
      Keymaster

      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.

Viewing 9 reply threads
  • You must be logged in to reply to this topic.