Different Email Addresses for WCMp Catalog Enquiry

WCMp Catalog Enquiry

Different Email Addresses for WCMp Catalog Enquiry Resolved

Tagged: 

Viewing 12 reply threads
  • Author
    Posts
    • #68874
      KurtB
      Participant

      Hi – I’m wondering if it is possible to send the enquiry message to different email addresses based on the product. For example my online catalog has products from 2 different physical locations (East and West) and right now the enquiries are going to both email addresses (info@domain-east.com and info@domain-west.com) as set up in the plug-in.

      The client would like to change this so that only the location that has the actual product will get the email and not both email addresses. Each product already has the correct email associated with it via an “email” attribute in WooCommerce. Is it possible to send the enquiry ONLY to this email programmatically based on that attribute?

      Thanks in advance for your assistance. – KurtB

    • #69023

      Hi @KurtB, thanks for getting in touch with us.

      Can you please share the plugin link, that you are using to add email field for each product. So, we can help you out further.

    • #69048
      KurtB
      Participant

      It is a standard WooCommerce attribute on the product page and not a separate plugin. The name of the attribute is “Email” and the slug is “email”. I’ve attached a screenshot to show you how it looks on the product page. My hope was to take the value from the email attribute and use that as the To: address on the enquiry form. Thanks.

    • #69050

      @kurtb, so you are adding a attribute called email manually? Or is this attribute is getting added automatically?

      Also, the email id you are passing here, this is also receiving the enquiry email, right!

    • #69055
      KurtB
      Participant

      Correct – the user is entering it manually for each product they add to the site (East or West). I have the same 2 email addresses set up to receive the emails under the “Enquiry Mail Override” settings.

      Since you are already adding the product name in the subject I was thinking it might be possible to do the same with the “To:” address for each product.

    • #69144

      @KurtB, our enquiry plugin is sending the query email to both email id, because you have set them via WC Catalog Enquiry settings.

      Now, our plugin doesn’t check what email attribute you have set for each product. So, in order to add this support i.e. send email to the id assigned for that product, you have to do custom code.

      If you need any reference of hook/filter, let us know.

    • #69757
      KurtB
      Participant

      If you have an reference materials for doing the custom code please let me know. I can see that the Title of the product is entered into the form as the Subject so if I can pre-select the To address the same way I’d like to give it a try. Thanks

    • #69827

      @KurtB, you need to use this filter for this –

      add_filter( 'woocommerce_email_recipient_wcce_send_email', 'recipient_added_for_enquiry' ,10 , 3 );
      Copy
    • #70881
      KurtB
      Participant

      I added the filter but how would I get it to display on the wc_catalog_enquiry_admin.php page – for example if I wanted to replace the Product URL in the table at the top of the admin message with the email associated with the product?

      <th scope=”col”><?php _e( ‘Product Url’, ‘woocommerce-catalog-enquiry’ ); ?></th>

      I guess I’m not sure what to do with the filter to get it to appear somewhere on the email message or does your example send it to the email in the data? – Kurt

    • #72830

      @KurtB, Can you please share the image of the email and explain which field you want to replace so we can help you out accordingly.

    • #72887
      KurtB
      Participant

      So if I can’t send the emails dynamically based on a WooCommerce as an attribute (called Email see attached Screen Shot) then I would just want to include the location information on the admin email so when an enquiry comes in to both emails they know what store has the product.

      They have 2 stores (one in Michigan and one in California) and the website has products from both on the website (used to be 2 separate sites) with Location and Email as attributes for each product in the database.

      At this point I would settle for just having the Location appear as text on the admin email as Address so they can tell what store the product is located at without clicking through the link and looking at it (see mockup-1 below).

      I hope this helps. Since we’re already pulling the product Title as “User Subject” on the email I figured it must be possible to display one of the attributes as well. Let me know how this could be accomplished and if you need further details.

    • #72900

      @kurtb, for this flow, you just need to override the email template (i.e. the email template you are using for your site) and pass the attribute be fetching that from that product using

      $product->get_attributes();
      Copy
    • #75319
      MOUMITA Haldar
      Participant

      Hi @kurtb,

      I presume that your issue is resolved, since, we haven’t heard back from you.

      We are marking this thread as resolved.

      Kindly open a new thread if you face any further query.

Viewing 12 reply threads

The topic ‘Different Email Addresses for WCMp Catalog Enquiry’ is closed to new replies.

COVID-19 Outbreak: WCMp team is supporting business affected by coronavirus

Read the Message Buy at Slashed Price