Shortcode for Vendor's About, Review and Policy content

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!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Feature Request Shortcode for Vendor's About, Review and Policy content

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #108459
      1101blueli
      Participant

      Hello, I’m using elementor to create a custom look for the vendor store page and the product page.

      #1 I would like to put all those information (Vendor’s About, Review and Policy content) to the Store page by adding a shortcode instead of using the tab widget to show this information in separated pages.

      #2 It would be nice if those shortcode also able to be used on the product page.

      #3 And is it possible the pull more fields by ACF from the vendor to their product page?

      thanks

    • #108880

      Hello,

      #1 I would like to put all those information (Vendor’s About, Review and Policy content) to the Store page by adding a shortcode instead of using the tab widget to show this information in separated pages.
      >>Unfortunately by-default we don’t have any shortcode for this. Regarding Vendor’s review, you can display vendor’s ratings.
      For vendor’s About use this shortcode – [wcfm_store_info data="store_about"]
      For vendor’s Policy use this shortcode – [wcfm_store_info data="store_policy"]
      For vendor’s rating use this shortcode – [wcfm_store_info data="store_rating"]
      And Add below 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/

      add_filter('wcfmmp_additional_store_info','vendor_store_othersinfo_wcfmmp_additional_store_info',15,3);
      function vendor_store_othersinfo_wcfmmp_additional_store_info($data_value, $data_info, $store_id) {
      	global $WCFM, $WCFMmp, $post;
      	$store_user  = wcfmmp_get_store( $store_id );
      	$store_info  = $store_user->get_shop_info();
      	if($data_info == 'store_policy') {		
      
      		$wcfm_policy_vendor_options = $store_user->get_store_policies();
      
      		$wcfm_policy_options = wcfm_get_option( 'wcfm_policy_options', array() );
      
      		$shipping_policy = isset( $wcfm_policy_vendor_options['shipping_policy'] ) ? $wcfm_policy_vendor_options['shipping_policy'] : '';
      		$_wcfm_shipping_policy = isset( $wcfm_policy_options['shipping_policy'] ) ? $wcfm_policy_options['shipping_policy'] : '';
      		if( wcfm_empty($shipping_policy) ) $shipping_policy = $_wcfm_shipping_policy;
      				
      		$refund_policy = isset( $wcfm_policy_vendor_options['refund_policy'] ) ? $wcfm_policy_vendor_options['refund_policy'] : '';
      		$_wcfm_refund_policy = isset( $wcfm_policy_options['refund_policy'] ) ? $wcfm_policy_options['refund_policy'] : '';
      		if( wcfm_empty($refund_policy) ) $refund_policy = $_wcfm_refund_policy;
      				
      		$cancellation_policy = isset( $wcfm_policy_vendor_options['cancellation_policy'] ) ? $wcfm_policy_vendor_options['cancellation_policy'] : '';
      		$_wcfm_cancellation_policy = isset( $wcfm_policy_options['cancellation_policy'] ) ? $wcfm_policy_options['cancellation_policy'] : '';
      		ob_start();
      		if( wcfm_empty($cancellation_policy) ) $cancellation_policy = $_wcfm_cancellation_policy;
      	?>
      		<div class="_area" id="policy">
      			<div class="wcfmmp-store-policies">			 
      			  <?php do_action( 'wcfmmp_store_before_policies', $store_user->get_id() ); ?>			
      				<?php if( !wcfm_empty($shipping_policy) ) { ?>
      					<div class="policies_area wcfm-shipping-policies">
      						<h2 class="wcfm_policies_heading"><?php echo apply_filters('wcfm_shipping_policies_heading', __('Shipping Policy', 'wc-frontend-manager')); ?></h2>
      						<div class="wcfm_policies_description" ><?php echo $shipping_policy; ?></div>
      					</div>
      				<?php } if( !wcfm_empty( $refund_policy ) ){ ?>
      					<div class="policies_area wcfm-refund-policies">
      						<h2 class="wcfm_policies_heading"><?php echo apply_filters('wcfm_refund_policies_heading', __('Refund Policy', 'wc-frontend-manager')); ?></h2>
      						<div class="wcfm_policies_description" ><?php echo $refund_policy; ?></div>
      					</div>
      				<?php } if( !wcfm_empty( $cancellation_policy ) ){ ?>
      					<div class="policies_area wcfm-cancellation-policies">
      						<h2 class="wcfm_policies_heading"><?php echo apply_filters('wcfm_cancellation_policies_heading', __('Cancellation / Return / Exchange Policy', 'wc-frontend-manager')); ?></h2>
      						<div class="wcfm_policies_description" ><?php echo $cancellation_policy; ?></div>
      					</div>
      				<?php } ?>				
      				<?php do_action( 'wcfmmp_store_after_policies', $store_user->get_id() ); ?>				
      			</div>
      		</div>
      	<?php
      	}	else if($data_info == 'store_about') {
      		$wcfm_shop_description = apply_filters( 'wcfmmp_store_about', apply_filters( 'woocommerce_short_description', $store_user->get_shop_description() ), $store_user->get_shop_description() );
      		ob_start();
      		?>
      		<div class="_area" id="wcfmmp_store_about">
      			<div class="wcfmmp-store-description">
      			 
      			  <?php do_action( 'wcfmmp_store_before_about', $store_user->get_id() ); ?>
      			
      				<?php if( $wcfm_shop_description ) { ?>
      					<div class="wcfm-store-about">
      						<div class="wcfm_store_description" ><?php echo $wcfm_shop_description; ?></div>
      					</div>
      				<?php } ?>
      				
      				<?php do_action( 'wcfmmp_store_after_about', $store_user->get_id() ); ?>
      				
      			</div>
      		</div>
      		<?php
      	}
      	$data_value = ob_get_clean();
      	return $data_value;
      }

      #2 It would be nice if those shortcode also able to be used on the product page.
      >>You can use those shortcode in your product page.

      #3 And is it possible the pull more fields by ACF from the vendor to their product page?
      >> Unfortunately we don’t have support for this. For adding custom field please check : https://wclovers.com/knowledgebase/wcfm-custom-fields/

      Thanks.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.