Store Gallery

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!

Viewing 11 reply threads
  • Author
    Posts
    • #128299
      Eden Brownlee
      Participant

      Hello Good day! Is there anyway I could let my store vendors upload images of the store. I would like to add the images then on the about store page. Thanks

    • #128747

      Hello,

      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/

      
      //Add Store Gallery option vendor settings page
      add_filter('wcfm_marketplace_settings_fields_general', 'wcfm_marketplace_settings_fields_general_custom0905', 50, 2 );
      function wcfm_marketplace_settings_fields_general_custom0905($general_fields,$vendor_id) {
      	$vendor_data = get_user_meta( $vendor_id, 'wcfmmp_profile_settings', true );	
      	$store_gallery     = isset( $vendor_data['store_gallery'] ) ? $vendor_data['store_gallery'] : array();	
      	if(isset($general_fields['shop_description'])) {
      		$general_fields['store_gallery']=  array( 'label' => __('Store Gallery', 'wc-frontend-manager'), 'type' => 'multiinput', 'class' => 'wcfm-text wcfm_ele gallery_type_upload gallery_type_field gallery_type_slider wcfm_non_sortable', 'label_class' => 'wcfm_title gallery_type_field gallery_type_slider', 'value' => $store_gallery, 'options' => array(
      																																																																										"image" => array( 'type' => 'upload', 'class' => 'wcfm_gallery_upload gallery_type_upload wcfm-banner-uploads', 'prwidth' => 75),
      																																																																										"link"  => array( 'type' => 'text', 'class' => 'wcfm-text gallery_type_slilder_link', 'placeholder' => __( 'Gallery Hyperlink', 'wc-frontend-manager' ) ),
      																																																																									) );
      	}
      	return $general_fields;
      }
      
      add_action( 'wcfm_wcfmmp_settings_update','fn_wcfm_vendor_settings_storetype_update0905', 50, 2);
      add_action( 'wcfm_vendor_settings_update','fn_wcfm_vendor_settings_storetype_update0905', 50, 2);
      function fn_wcfm_vendor_settings_storetype_update0905($user_id, $wcfm_settings_form ){	
      	$wcfm_settings_form_data_new = array();
      	parse_str($_POST['wcfm_settings_form'], $wcfm_settings_form_data_new);	
      	$wcfm_settings_form_data_storetype = array();
      	if(isset($wcfm_settings_form_data_new['store_gallery']) && !empty($wcfm_settings_form_data_new['store_gallery'])) {
      		$wcfm_settings_form_data_storetype['store_gallery'] = $wcfm_settings_form_data_new['store_gallery'];
      	}
      	
      	$wcfm_settings_form = array_merge( $wcfm_settings_form, $wcfm_settings_form_data_storetype );
      	update_user_meta( $user_id, 'wcfmmp_profile_settings', $wcfm_settings_form );
      }
      //get and display gallery images in about page
      add_action('wcfmmp_store_after_about','add_shop_gallery_wcfmmp_store_after_about',10);
      function add_shop_gallery_wcfmmp_store_after_about($vendor_id){
      	$vendor_data = get_user_meta( $vendor_id, 'wcfmmp_profile_settings', true );	
      	$store_gallery     = isset( $vendor_data['store_gallery'] ) ? $vendor_data['store_gallery'] : array();	
      	foreach ($store_gallery as $store_gallery_img) {
      		if($store_gallery_img['image'] != '') {
      			$img_url = wcfm_get_attachment_url($store_gallery_img['image']);
      		} else {
      			$img_url = $store_gallery_img['link'];
      		}
      		echo '<img src="'.$img_url.'" />'; //replace with your required HTML to display gallery 
      	}
      }
      

      Thanks.

    • #130152
      Eden Brownlee
      Participant

      Where do the vendors upload the gallery images? TY

    • #130154
      Eden Brownlee
      Participant

      Found it, it seems like this snippet only allows one product to be added in the gallery though.

    • #130162
      Eden Brownlee
      Participant

      By the way I created custom fields on registration but in the vendor dashboard it seems to not be showing anywhere… I want the vendors to have access on it too that way they can update it when needed in the future.

    • #130361

      Hello,

      Found it, it seems like this snippet only allows one product to be added in the gallery though.
      >>

      
      //Add Store Gallery option vendor settings page
      add_filter('wcfm_marketplace_settings_fields_general', 'wcfm_marketplace_settings_fields_general_custom0905', 50, 2 );
      function wcfm_marketplace_settings_fields_general_custom0905($general_fields,$vendor_id) {
      
      	$vendor_data = get_user_meta( $vendor_id, 'wcfmmp_profile_settings', true );	
      	$store_gallery     = isset( $vendor_data['store_gallery'] ) ? $vendor_data['store_gallery'] : array();
      	
      	if(isset($general_fields['store_name'])) {
      		$general_fields['store_gallery']=  array( 'label' => __('Store Gallery', 'wc-frontend-manager'), 'type' => 'multiinput', 'class' => 'wcfm-text wcfm_ele gallery_type_upload gallery_type_field gallery_type_slider wcfm_non_sortable', 'label_class' => 'wcfm_title gallery_type_field gallery_type_slider', 'value' => $store_gallery, 'options' => array(
      																																																																										"image" => array( 'type' => 'upload', 'class' => 'wcfm_gallery_upload gallery_type_upload wcfm-banner-uploads', 'prwidth' => 75),
      																																																																										"link"  => array( 'type' => 'text', 'class' => 'wcfm-text gallery_type_slilder_link', 'placeholder' => __( 'Gallery Hyperlink', 'wc-frontend-manager' ) ),
      																																																																									) );
      	}
      	return $general_fields;
      }
      
      add_action( 'wcfm_wcfmmp_settings_update','fn_wcfm_vendor_settings_storetype_update0905', 50, 2);
      add_action( 'wcfm_vendor_settings_update','fn_wcfm_vendor_settings_storetype_update0905', 50, 2);
      function fn_wcfm_vendor_settings_storetype_update0905($user_id, $wcfm_settings_form ){	
      	$wcfm_settings_form_data_new = array();
      	parse_str($_POST['wcfm_settings_form'], $wcfm_settings_form_data_new);	
      	$wcfm_settings_form_data_storetype = array();
      	if(isset($wcfm_settings_form_data_new['store_gallery']) && !empty($wcfm_settings_form_data_new['store_gallery'])) {
      		$wcfm_settings_form_data_storetype['store_gallery'] = $wcfm_settings_form_data_new['store_gallery'];
      	}
      	
      	$wcfm_settings_form = array_merge( $wcfm_settings_form, $wcfm_settings_form_data_storetype );
      	update_user_meta( $user_id, 'wcfmmp_profile_settings', $wcfm_settings_form );
      }
      //get and display gallery images in about page
      add_action('wcfmmp_store_after_about','add_shop_gallery_wcfmmp_store_after_about',10);
      function add_shop_gallery_wcfmmp_store_after_about($vendor_id){
      	$vendor_data = get_user_meta( $vendor_id, 'wcfmmp_profile_settings', true );	
      	$store_gallery     = isset( $vendor_data['store_gallery'] ) ? $vendor_data['store_gallery'] : array();	
      	foreach ($store_gallery as $store_gallery_img) {
      		if($store_gallery_img['image'] != '') {
      			$img_url = wcfm_get_attachment_url($store_gallery_img['image']);
      		} else {
      			$img_url = $store_gallery_img['link'];
      		}
      		echo '<img src="'.$img_url.'" />'; //replace with your required HTML to display gallery 
      	}
      }

      Adding this code(previously mentioned) you will find “Store Gallery” field in vendor’s settings page and these images will show vendor’s about tab(as per your previous requirement). PFA

      By the way I created custom fields on registration but in the vendor dashboard it seems to not be showing anywhere… I want the vendors to have access on it too that way they can update it when needed in the future.
      >>You will fnd the custom fields vendor’s profile manager(pfa)

      Thanks.

      Attachments:
      You must be logged in to view attached files.
    • #130534
      Eden Brownlee
      Participant

      Cool! This is working now but the problem is it is only visible in the admin store manager area and not in the vendors side

    • #130545

      Hi,

      Can you check this properly(after clear cache), because “wcfm_marketplace_settings_fields_general” filter used for admin and as well vendors settings page.
      If it’s still not showing in vendor’s settings page, then you can provide us your site access with site url, then we can check your site. (Set as private reply)

      Thanks

    • #130752
      Eden Brownlee
      Participant
      This reply has been marked as private.
    • #132866
      Eden Brownlee
      Participant

      Hello Thanks, I am reaching again for another inquiry. Is there any shortcode that can give m the top vendors with a custom field filter. The custom field was added in the registration process. Please let me know, I have asked for this for countless times but nobody responded so I am asking it in this thread again.

    • #133039

      Hello,

      No, as of now we don’t have this feature. But if you have added custom field from Admin WCFM dashboard -> settings -> vendor registration, then you will find “store list meta filter” widget filter for store list page.

      Please for different issues create a different thread or related thread.

      Thanks.

    • #133360
      Eden Brownlee
      Participant

      Could we request this feature? If so how much will we be charged? I already have created a new thread but no one did respond.
      https://wclovers.com/forums/topic/shortcode/

      • #133497

        Hi,

        You can post here your request – https://wclovers.com/forums/forum/wcfm-feature-request/

        I already have created a new thread but no one did respond.
        Okay! We understand.
        It requires serious custom development.
        Due to COVID-19 we are getting 400-500 more support tickets each day. So we aren’t taking any customizations at this moment. It will be better to find someone who is accustom to WP development. Any problem if you face any difficulty at the time of development we will guide you accordingly.

        Thanks.

Viewing 11 reply threads
  • You must be logged in to reply to this topic.