wcfm-santa

Celebrate Poila Baisakh with upto 25% off - A Fresh Start, A Great Deal!

Claim Offer
01Day 16Hrs 10Min 25Sec
wcfm-santa

New Tab at Store 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!

Tagged: 

Viewing 6 reply threads
  • Author
    Posts
    • #88818
      Sinisa Bujan
      Participant

      Hi,

      I create new tab link you describe there ( https://docs.wclovers.com/tweaks/#vendor-customer-direct-pay-option ). But now my question is how the vendore can edit content for that specific new tab?

    • #90821
      WCFM Forum
      Keymaster

      Vendor will see a new setting tab under their setting panel.

    • #91047
      Sinisa Bujan
      Participant

      Hi,

      Where exactly, I login to one vendor account and I can’t find that options anywhere. Can you please tell me more info about it.

      Than you

      • #91135

        Hello,

        You can see in vendor settings tab under their setting panel. Please find attachment.

        Thanks.

        Attachments:
        You must be logged in to view attached files.
    • #91143
      Sinisa Bujan
      Participant

      Hi

      I create new tab link not a payment (url is wrong because you use anchor in that your page that I link you)

      thank you

    • #91261
      Sinisa Bujan
      Participant
      This reply has been marked as private.
    • #91288

      Hello,

      The above code you are using, it’s for adding tab in vendor store page(front-end).

      If you want “brendtab” (https://www.ktdizajn.hr/popust/oglasivac/trgovina1/brendtab/) shows dynamic data from vendor settings page you have to override wcfmmp-view-store.php in your theme(For editing copy this to yourtheme/wcfm/store).
      Add below code in switch case in the wcfmmp-view-store.php page,

      case 'brendovi':
         $WCFMmp->template->get_template( 'store/wcfmmp-view-store-brendovi.php', array( 'store_user' => $store_user, 'store_info' => $store_info ) );
      break;

      For getting dynamic data in the wcfmmp-view-store-brendovi.php template paste the below code there(https://www.ktdizajn.hr/popust/oglasivac/trgovina1/brendtab/),

      <?php
      $vendor_id = $store_user->get_id();
      $wcfm_vendor_brendovi = get_user_meta( $vendor_id, 'wcfm_vendor_brendovi', true );
      ?>

      And remove the code “add_filter(‘wcfmmp_store_default_template’)” from your code;

      Regarding “brendovi” tab in vendor settings page(Add this code to your child theme’s functions.php),

      add_action( 'end_wcfm_vendor_settings', function( $vendor_id ) {
        global $WCFM, $WCFMmp;
        $wcfm_vendor_brendovi = get_user_meta( $vendor_id, 'wcfm_vendor_brendovi', true );
        ?>
        <!-- collapsible -->
        <div class="page_collapsible" id="wcfm_settings_form_min_order_amount_head">
          <label class="wcfmfa fa-cart-plus"></label>
            <?php _e('Brendovi', 'wc-frontend-manager'); ?><span></span>
          </div>
          <div class="wcfm-container">
            <div id="wcfm_settings_form_vendor_invoice_expander" class="wcfm-content">
            <?php
            $WCFM->wcfm_fields->wcfm_generate_form_field( array(
            "wcfm_vendor_brendovi_options" => array('label' => __('Brendovi', 'wc-frontend-manager'), 'type' => 'textarea', 'class' => 'wcfm-textarea wcfm_ele wcfm_full_ele', 'label_class' => 'wcfm_title wcfm_ele wcfm_full_ele_title', 'value' => $wcfm_vendor_brendovi ),
            ) );
            ?>
            </div>
        </div>
        <div class="wcfm_clearfix"></div>
        <!-- end collapsible -->
      <?php
      }, 500 );
      
      add_action( 'wcfm_vendor_settings_update', function( $vendor_id, $wcfm_settings_form ) {
        global $WCFM, $WCFMmp;
        if( isset( $wcfm_settings_form['wcfm_vendor_brendovi_options'] ) ) {
          $wcfm_vendor_brendovi = $wcfm_settings_form['wcfm_vendor_brendovi_options'];
          update_user_meta( $vendor_id, 'wcfm_vendor_brendovi', $wcfm_vendor_brendovi );
        }
      }, 500, 2 );

      Thanks.

    • #91311
      Sinisa Bujan
      Participant
      This reply has been marked as private.
Viewing 6 reply threads
  • The topic ‘New Tab at Store Page’ is closed to new replies.