Website in social area for vendors

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
    • #93628
      xximinabandxx
      Participant

      Can we add a link for vendors to list their website in the social area of their profile?

    • #94034
      WCFM Forum
      Keymaster

      Hi,

      Please add this code to your site for the purpose-

      add_action( 'end_wcfm_vendor_settings', function( $vendor_id ) {
      	global $WCFM;
      	$wcfm_vendor_website = get_user_meta( $vendor_id, 'wcfm_vendor_website', true );	
      	
      	?>                                
      	<!-- collapsible -->
      	<div class="page_collapsible" id="wcfm_settings_form_additional_head">
      		<label class="fa fa-certificate"></label>
      		<?php _e('Additional Info', 'wc-multivendor-marketplace'); ?><span></span>
      	</div>
      	<div class="wcfm-container">
      		<div id="wcfm_settings_form_additional_expander" class="wcfm-content">
      			<h2><?php _e('Additional Setting', 'wc-multivendor-marketplace'); ?></h2>
      			<div class="wcfm_clearfix"></div>
      			
      			<?php
      				$WCFM->wcfm_fields->wcfm_generate_form_field( array(
      																														"wcfm_vendor_website" => array( 'label' => __( 'Website', 'wc-multivendor-marketplace'), 'name' => 'wcfm_vendor_website', 'type' => 'text', 'class' => 'wcfm-text wcfm_ele', 'label_class' => 'wcfm_title wcfm_ele', 'value' => $wcfm_vendor_website ),
      																													 ) );
      			?>
      		</div>
      	</div>
      	<!-- end collapsible -->
      	<?php
      }, 50, 1 );
      
      add_action( 'wcfm_vendor_settings_update', function( $vendor_id, $wcfm_settings_form ) {
      	global $WCFM, $_POST;
      	if( isset( $wcfm_settings_form['wcfm_vendor_website'] ) ) {
      		update_user_meta( $vendor_id, 'wcfm_vendor_website', $wcfm_settings_form['wcfm_vendor_website'] );
      	}
      }, 50, 2 );

      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/

      Thank You

    • #94049
      xximinabandxx
      Participant
      This reply has been marked as private.
    • #96522
      WCFM Forum
      Keymaster

      Well, it added a new setting tab “Additional Info” and added this field there.

      Use this short code to show this – [wcfm_store_info data="wcfm_vendor_website"]

      Thank You

    • #97049
      Ivan Black
      Participant

      Hello,

      1) How can I automatically output the website on product pages alongside the vendors telephone and email with an icon. That is in the store info section. Using the shortcode [wcfm_store_info data=”store_website”] means the link is not clickable.

      2) Instead of showing this in a separate collapsible section called “additional info”, how can it be moved to vendors >> /store-manager/settings/ under the ‘store phone’ field?

      3) Using this code adds the website field for vendors >> /store-manager/settings/ but not admin edit vendors screen. How can it be added for admin also to see / edit?

      Thank you

    • #97244
      WCFM Forum
      Keymaster

      HI,

      1) How can I automatically output the website on product pages alongside the vendors telephone and email with an icon. That is in the store info section. Using the shortcode [wcfm_store_info data=”store_website”] means the link is not clickable.

      – Add this code to your site for the purpose-

      add_action( 'wcfmmp_store_after_phone', function( $store_id ) {
      	$site_url = get_user_meta( $store_id, 'wcfm_vendor_website', true );
        if( $site_url ) {
          $site_url_href = $site_url;
      	  if (strpos( $site_url_href, 'http') === false) {
      	  	$site_url_href = "http://" . $site_url_href;
      	  }
      	  ?>
      	  <div class="store_info_parallal" style="margin-right: 10px;"><i class="wcfmfa fa-globe" aria-hidden="true"></i><span><a href="<?php echo $site_url_href; ?>"><?php echo $site_url; ?></a></span></div>
      	  <?php
        }
      });

      Thank You

    • #98216
      Ivan Black
      Participant

      Hello,

      1) The previous code outputs the website on the vendor store page but NOT product pages. I would like to display the website on product pages in the Store tab alongside the email and telephone.

      2) For vendors, instead of showing the website field in a separate collapsible section called “additional info”, how can it be moved to vendors >> /store-manager/settings/ under the ‘store phone’ field? Having it in a separate tab is completely unnecessary and confusing for vendors.

      Thank you.

Viewing 6 reply threads
  • The topic ‘Website in social area for vendors’ is closed to new replies.