• hello, sorry to bother.

    follow this to the letter: https://wclovers.com/forums/topic/new-tab-at-store-page/

    I see everything except the text that the seller writes in his panel, that is, the content is not displayed in the store page tab.

    If you need more information I will provide you.

    can you help me?

    Once I see what the seller writes is shown, I will change the field to show images that sellers upload in that tab.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WC Lovers

    (@wclovers)

    Show me screenshots – how vendors creating content for this tab and how that is displayed under the tab. Show me code screenshots.

    Thread Starter ashop1

    (@ashop1)

    Thanks for answering, here I show you how I saw in your forum answer for the brendovi tab.

    Could it be that nothing is shown because there is no template formed? I am a beginner, I apologize for the inconvenience.

    https://ibb.co/8XJ8sLn

    https://ibb.co/Vtpcs0P

    Thread Starter ashop1

    (@ashop1)

    https://ibb.co/6gnhTS5

    ……………………

    el codigo en functions:

    add_action( 'wcfmmp_rewrite_rules_loaded', function( $wcfm_store_url ) {
    add_rewrite_rule( $wcfm_store_url.'/([^/]+)/art_works?$', 'index.php?'.$wcfm_store_url.'=$matches[1]&art_works=true', 'top' );
    add_rewrite_rule( $wcfm_store_url.'/([^/]+)/art_works/page/?([0-9]{1,})/?$', 'index.php?'.$wcfm_store_url.'=$matches[1]&paged=$matches[2]&art_works=true', 'top' );
    }, 50 );
    add_filter( 'query_vars', function( $vars ) {
    $vars[] = 'art_works';
    return $vars;
    }, 50 );
    add_filter( 'wcfmmp_store_tabs', function( $store_tabs, $store_id ) {
    $store_tabs['art_works'] = 'Art Works';
    return $store_tabs;
    }, 50, 2 );
    add_filter( 'wcfmp_store_tabs_url', function( $store_tab_url, $tab ) {
    if( $tab == 'art_works' ) {
    $store_tab_url .= 'art_works';
    }
    return $store_tab_url;
    }, 50, 2 );
    add_filter( 'wcfmp_store_default_query_vars', function( $query_var ) {
    global $WCFM, $WCFMmp;
    if ( get_query_var( 'art_works' ) ) {
    $query_var = 'art_works';
    }
    return $query_var;
    }, 50 );
    
    add_action( 'end_wcfm_vendor_settings', function( $vendor_id ) {
      global $WCFM, $WCFMmp;
      $wcfm_vendor_art_works = get_user_meta( $vendor_id, 'wcfm_vendor_art_works', true );
      ?>
      <!-- collapsible -->
      <div class="page_collapsible" id="wcfm_settings_form_min_order_amount_head">
        <label class="wcfmfa fa-cart-plus"></label>
          <?php _e('art works', '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_art_works_options" => array('label' => __('art works', '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_art_works ),
          ) );
          ?>
          </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_art_works_options'] ) ) {
        $wcfm_vendor_art_works = $wcfm_settings_form['wcfm_vendor_art_works_options'];
        update_user_meta( $vendor_id, 'wcfm_vendor_art_works', $wcfm_vendor_art_works );
      }
    }, 500, 2 );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘tab on store page’ is closed to new replies.