WC Lovers

WooCommerce Frontend Manager - Multivendor marketplace vendor dashboard

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!

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: List of all vendor with info in functions file #139437
    kadsyy
    Participant

    Hi,

    Letting u know that i successfully created the custom shortcode. thank you so much for pointing out the ‘class-wcfmmp-shortcode.php(function name : wcfmmp_stores_shortcode)’ file. It’s really helped a lot. I cant thank you enough i wish i can give u a hug. Thanks again and u have a great day ahead!

    in reply to: List of all vendor with info in functions file #138983
    kadsyy
    Participant

    Because i want to make several customizations on the listing. i know i can copy the template file from’views/store-list/’ folder and put in my theme but it will affect to all “[wcfm_stores]” shortcode right?

    i believe i can add another css style and define it in the template file but what if i want to change the layout which involve changing some divs etc?

    is there a way i can make another theme/template for “[wcfm_stores]” shortcode? this is basically my purpose for the shortcode i written.

    Thanks.

    in reply to: List of all vendor with info in functions file #138435
    kadsyy
    Participant

    Hi, thanks for your reply. I have adjust my code, this is what i get so far

    <?php
    
    function vendor_list_function()
    {
    	global $WCFM, $WCFMmp, $post;
    
    	$store_user      = wcfmmp_get_store($store_id);
    	$store_info      = $store_user->get_shop_info();
    	$store_name      = isset($store_info['store_name']) ? esc_html($store_info['store_name']) : __('N/A', 'wc-multivendor-marketplace');
    	$store_name      = apply_filters('wcfmmp_store_title', $store_name, $store_id);
    	$store_url       = wcfmmp_get_store_url($store_id);
    	$store_description = $store_user->get_shop_description();
    	$wcfm_shop_description = apply_filters('wcfmmp_store_about', apply_filters('woocommerce_short_description', $store_user->get_shop_description()), $store_user->get_shop_description());
    
    ?>
    	<div class="wcfmmp-stores-content-holder">
    		<div class="wcfmmp-stores-content">
    
    			list vendor with info
    			<ul class="wcfmmp-store-wrap">
    				<?php
    				foreach ($store_user as $store_id) {
    					$args['store_id'] = $store_id;
    					echo '<li> name: '. $store_name . '</li>';
    					echo '<li> address: '. $store_address . '</li>';
    					echo '<li> url: '. $store_url. '</li>';
    					echo '<li> description: '. $wcfm_shop_description  . '</li>';
    					echo '=================';
    				}
    				?>
    				<div class="wcfm-clearfix"></div>
    			</ul>
    		</div>
    	</div>
    
    <?php }
    add_shortcode('vendor_list_test', 'vendor_list_function');

    unfortunately the loop give incorrect and empty data. i know this code got a lot of problems since im totally newbie in php. i hope u dont mind walk me thru this. thanks again.

Viewing 3 posts - 1 through 3 (of 3 total)