Send vendor information by mail to the customer

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 Send vendor information by mail to the customer

Viewing 4 reply threads
  • Author
    Posts
    • #121860
      pebi44
      Participant

      Hello, is this possible to do?
      1 – I need the vendor’s contact information to be sent in the email “processing order”.
      2 – Show vendor’s contact information at finish checkout.
      Thank.

    • #121946
      Craig
      Participant

      I’m looking for a solution to add this information to the processing order email as well. So that the customer can contact the vendor directly….rather than “replying to the email”.

      • #122582
        pebi44
        Participant

        Hi, do you have any news?

        I forgot to say, I have limited the cart to purchases from a single Vendor.

    • #123908
      pebi44
      Participant

      This code works for me:
      add_action( ‘woocommerce_email_order_meta’, ‘add_sellerinfo_to_buyer_email’,50,4 );
      function add_sellerinfo_to_buyer_email( $order, $sent_to_admin, $plain_text, $email ) {
      global $WCFM;
      if ( !in_array( $email->id, array( ‘new_order’,’store-new-order’) )){
      $items = $order->get_items();
      echo ‘<p>INFORMACION DEL VENDEDOR -</p>’;
      foreach ( $items as $item ) {
      $product_id = $item->get_product_id();
      $vendor_id = wcfm_get_vendor_id_by_post( $product_id );
      if( apply_filters( ‘wcfmmp_is_allow_sold_by_linked’, true ) ) {
      $store_name = $WCFM->wcfm_vendor_support->wcfm_get_vendor_store_by_vendor( absint($vendor_id) );
      } else {
      $store_name = $WCFM->wcfm_vendor_support->wcfm_get_vendor_store_name_by_vendor( absint($vendor_id) );
      }
      $store_user = wcfmmp_get_store( $vendor_id );
      $email = $store_user->get_email();
      $phone = $store_user->get_phone();
      $address = $store_user->get_address_string();
      echo $store_name.'(‘.$item->get_name().’) :’.$email.’ ‘.$phone.'<br><br/>’;
      }
      }
      }

    • #123983
      Craig
      Participant

      pebi44 what does that code do? and where do you put in? in Functions.php?

      • #124454
        pebi44
        Participant

        Yes you put it in function.php
        This code does is add the seller’s information (email and phone number) in the email that reaches the customer when making the purchase.

    • #124475
      Craig
      Participant

      Thanks for that info and clarification pebi44

      I received an error on my site when I added that code to my functions.php so I will have to have a closer look at it later on.

      Thanks for sharing this code.

      • #124633
        pebi44
        Participant
        add_action( 'woocommerce_email_order_meta', 'add_sellerinfo_to_buyer_email',50,4 );
        function add_sellerinfo_to_buyer_email( $order, $sent_to_admin, $plain_text, $email ) {
        	global $WCFM;
        	if ( !in_array( $email->id, array( 'new_order','store-new-order') )){ 
        		$items = $order->get_items();
        		echo '<p>INFORMACION DEL VENDEDOR -</p>';
        		foreach ( $items as $item ) {
        			$product_id = $item->get_product_id();
        			$vendor_id   = wcfm_get_vendor_id_by_post( $product_id );
        			if( apply_filters( 'wcfmmp_is_allow_sold_by_linked', true ) ) {
        				$store_name = $WCFM->wcfm_vendor_support->wcfm_get_vendor_store_by_vendor( absint($vendor_id) );
        			} else {
        				$store_name = $WCFM->wcfm_vendor_support->wcfm_get_vendor_store_name_by_vendor( absint($vendor_id) );
        			}
        			$store_user  = wcfmmp_get_store( $vendor_id );
        			$email    = $store_user->get_email();
        			$phone    = $store_user->get_phone(); 
        			$address  = $store_user->get_address_string(); 
        			echo $store_name.'('.$item->get_name().') :'.$email.' '.$phone.'<br><br/>';
        		}
        	}
        }
Viewing 4 reply threads
  • You must be logged in to reply to this topic.