Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › New Tab at Store Page
Tagged: new tab
- This topic has 9 replies, 3 voices, and was last updated 5 years ago by Sarmistha Chakraborty.
- AuthorPosts
- October 24, 2019 at 3:58 pm #88818Sinisa BujanParticipant
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?
- November 5, 2019 at 6:18 pm #90821WCFM ForumMember
Vendor will see a new setting tab under their setting panel.
- November 6, 2019 at 12:30 pm #91047Sinisa BujanParticipant
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
- November 6, 2019 at 5:31 pm #91135Sarmistha ChakrabortyMember
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.
- November 6, 2019 at 6:13 pm #91143Sinisa BujanParticipant
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
- November 6, 2019 at 6:18 pm #91147Sarmistha ChakrabortyMember
Hi,
Can you please explain it with screenshot.
Thanks.
- November 7, 2019 at 12:07 pm #91261Sinisa BujanParticipantThis reply has been marked as private.
- November 7, 2019 at 4:46 pm #91288Sarmistha ChakrabortyMember
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.
- November 7, 2019 at 7:25 pm #91311Sinisa BujanParticipantThis reply has been marked as private.
- November 8, 2019 at 11:19 am #91401Sarmistha ChakrabortyMemberThis reply has been marked as private.
- AuthorPosts
- The topic ‘New Tab at Store Page’ is closed to new replies.