Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Divan

    (@divan-web-devine)

    We managed to solve point 1), but are still struggling with point 2) and 3).
    There’s another query from the client though, with which we require your assistance please (lets call it point 4):
    4) Users that are becoming a vendor can register on https://ietsieouliks.co.za/verskaffer-registrasie/
    >> They fill in the form at https://ietsieouliks.co.za/verskaffer-registrasie/ (it is then sent to admin)
    >> After payment, which is a manual process and has nothing to do with the website, admin will refer that vendor/store to a Portfolio Manager (Shop Manager: https://ietsieouliks.co.za/store-manager/managers/) assign.
    >> So far, the provider’s info has not yet been uploaded to the website.
    >> The Portfolio Manager will contact his new vendor/store to get all the necessary info and photos.
    >> The Portfolio Manager will then load the provider (my client does not want providers to upload or edit their own profile at all but only view it).
    >> My client then wants, as the last step (after the provider’s profile is loaded and all the necessary info is there), that provider must be approved before their listing goes live and can be viewed on the front-end.
    >> So, if the Portfolio Manager has uploaded the vendor’s profile, admin should get an email saying there is a new provider waiting for approval.
    >> Then he can confirm for one last time that any outstanding costs have been paid and that all the info is correct.
    >> He will then physically approve the supplier and only then will it be visible.

    Plugin Author WC Lovers

    (@wclovers)

    Use this snippet for the purpose-

    add_filter( 'wcfm_marketplace_settings_fields_general', function( $setting_fields, $vendor_id ) {
    	$wcfm_vendor_website     = get_user_meta( $vendor_id, 'wcfm_vendor_website', true );
    	if( isset( $setting_fields['store_name'] ) ) {
    		if( isset( $_GET['store-setup'] ) ) {
    			$wcfm_vendor_website_field = array(
    																					"wcfm_vendor_website" => array( 'label' => __( 'Website', 'wc-multivendor-marketplace'), 'in_table' => 'yes', 'name' => 'wcfm_vendor_website', 'type' => 'text', 'class' => 'wcfm-text wcfm_ele', 'label_class' => 'wcfm_title wcfm_ele', 'value' => $wcfm_vendor_website ),
    																				 );
    		} else {
    			$wcfm_vendor_website_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 ),
    																				 );
    		}
    	}
    	$setting_fields = array_merge( $wcfm_vendor_website_field, $setting_fields );
    	return $setting_fields;
    }, 50, 2 );
    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_action( 'wcfmmp_store_list_after_store_info', function( $vendor_id, $store_info ) {
    	global $WCFM;
    	$site_url = get_user_meta( $vendor_id, 'wcfm_vendor_website', true );
      if( $site_url ) {
        $site_url_href = $site_url;
    	  if (strpos( $site_url_href, 'http') === false) {
    	  	$site_url_href = "https://" . $site_url_href;
    	  }
    		?>
    		<p class="store-phone">
    			<i class="wcfmfa fa-globe" aria-hidden="true"></i>
    			&nbsp;<a href="<?php echo $site_url_href; ?>"><?php echo $site_url; ?></a>
    		</p>
    		<?php
    	}
    }, 10, 2 );
    add_action( 'after_wcfmmp_store_header_info', function( $vendor_id ) {
    	global $WCFM;
    	$site_url = get_user_meta( $vendor_id, 'wcfm_vendor_website', true );
      if( $site_url ) {
        $site_url_href = $site_url;
    	  if (strpos( $site_url_href, 'http') === false) {
    	  	$site_url_href = "https://" . $site_url_href;
    	  }
    		?>
    		<div class="store_info_parallal">
    			<i class="wcfmfa fa-globe" aria-hidden="true"></i>
    			<span>
    				<a href="<?php echo $site_url_href; ?>"><?php echo $site_url; ?></a>
    			</span>
    		</div>
    		<div class="spacer"></div>  
    		<?php
    	}
    }, 10 );

    It will add website field under vendor’s setting panel.

    Add custom code(s) to your child theme’s functions.php
    In case you do not have child theme then add those using this plugin –?https://www.ads-software.com/plugins/code-snippets/

    Thread Starter Divan

    (@divan-web-devine)

    Hi there,

    Thank you for your feedback.

    We managed to solve point 1), but the following two points are still an issue:
    1) If you click on a single product page, i.e. https://ietsieouliks.co.za/product/horlosie/, there must be two buttons/links below the price of the product; one that links to the vendor’s store page and another button that links to the store’s website, Facebook page or whichever platform they enter via on the product’s edit page
    >> We tried to do this at https://ietsieouliks.co.za/store-manager/settings/#wcfm_settings_form_marketplace_head > Product Custom Field tab, but it’s not allowing us to enter the vendor’s store and/or website’s (or social media platform’s) URL
    >> We also checked the “Sold By” option at https://ietsieouliks.co.za/store-manager/settings/ > Marketplace Settings, but it’s not showing on https://ietsieouliks.co.za/product/horlosie/ (this was just to at least show the link to the store’s page on the website).

    2) Users that are becoming a vendor can register on https://ietsieouliks.co.za/verskaffer-registrasie/
    >> They fill in the form at https://ietsieouliks.co.za/verskaffer-registrasie/ (it is then sent to admin)
    >> After payment, which is a manual process and has nothing to do with the website, admin will refer that vendor/store to a Portfolio Manager (Shop Manager: https://ietsieouliks.co.za/store-manager/managers/) assign.
    >> So far, the provider’s info has not yet been uploaded to the website.
    >> The Portfolio Manager will contact his new vendor/store to get all the necessary info and photos.
    >> The Portfolio Manager will then load the provider (my client does not want providers to upload or edit their own profile at all but only view it).
    >> My client then wants, as the last step (after the provider’s profile is loaded and all the necessary info is there), that provider must be approved before their listing goes live and can be viewed on the front-end.
    >> So, if the Portfolio Manager has uploaded the vendor’s profile, admin should get an email saying there is a new provider waiting for approval.
    >> Then he can confirm for one last time that any outstanding costs have been paid and that all the info is correct.
    >> He will then physically approve the supplier and only then will it be visible.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multiple Queries’ is closed to new replies.