Email to Vendor when add Product

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 WC Marketplace Email to Vendor when add Product

Viewing 10 reply threads
  • Author
    Posts
    • #70497
      thiemann.k
      Participant

      Hey Community,

      what do i have to do (for example with a snippet) that all sellers get an email when a product in category (cat-id=228) has been added?

      Members can submit a “Product Inquiry”. These all come in a single category. I would like to inform the sellers if a new product has been created here.

      Best regards!
      Karsten

    • #70931
      WCFM Forum
      Keymaster

      HI,

      what do i have to do (for example with a snippet) that all sellers get an email when a product in category (cat-id=228) has been added?

      – You mean, if Admin add a product in this category then all vendors will be notified?

      Members can submit a “Product Inquiry”. These all come in a single category.

      – Sorry, not getting this clearly.

      Thank You

    • #71769
      thiemann.k
      Participant

      – You mean, if Admin add a product in this category then all vendors will be notified?

      – no…

      I have a category where product inquiries come in. if a seller has this product, or can create, then he can respond to it.
      Now I would like all Vendors to always receive an email or a notification when a product is added in category “228”.

      is that possible?

      Thanks

    • #72255
      WCFM Forum
      Keymaster

      Hi,

      Well, vendors are by default notified if any inquiry comes for their products!

      Do you want to disable this and only allow notification for this particular category products?

      Thank You

    • #72733
      thiemann.k
      Participant

      no, I do not want to =)

      So:

      I have a category where users can create “product requests”.
      A customer is looking for a product that is not yet available in the shop, this can create its own product (Add User Product)
      The user product automatically comes in a specified category (cat-id = “228”)
      Now I would like an email / referrals (preferably both) to be sent to all sellers when a new product is created in this category.

    • #72943
      WCFM Forum
      Keymaster

      HI,

      Thanks for the details. I understand your concept.

      A customer is looking for a product that is not yet available in the shop, this can create its own product (Add User Product)

      – Do you have implemented this yet!

      Thank You

    • #72974
      thiemann.k
      Participant

      hey =)
      yes, I have already implemented that.
      there are some plugins that implement that … which I like the most is the Add product frontend by NSThemes.

      Maybe you can offer something like that in the future? I think that is a good thing.

      A customer is looking for a product that is not yet available in the shop, this can create its own product (Add User Product)
      YES !
      And now, when a customer has create his own product, than all vendors should be an notification/or email (maybe both).
      but how does it continue?
      a snippet should certainly implement this.
      but how?

    • #73085
      WCFM Forum
      Keymaster

      Hi,

      And now, when a customer has create his own product, than all vendors should be an notification/or email (maybe both).
      but how does it continue?

      – Well, that can be implemented easily.

      Do you have any idea about this plugin’s coding?

      Actually, I want to know, is there any hook after completing the product creating by this form!

      Thank You

    • #73104
      thiemann.k
      Participant

      not yet. is that necessary?

      Thanks!

    • #73149
      WCFM Forum
      Keymaster

      HI,

      Yeah, as we have to write custom code to send out emails based on that hook.

      Otherwise, we have to edit that plugin, and this is not good at any situation!

      Can you please share your site access with me here – https://wclovers.com/woocommerce-multivendor-customization/
      I will take a look at this.

      Thank You

    • #74830
      WCFM Forum
      Keymaster

      Hi,

      Here is your code for the purpose –

      add_action( 'wp_insert_post', function( $post_ID, $post, $update ) {
      	global $WCFM;
      	if( isset( $_POST["ns-product-name"] ) ) {
      		$wcfm_messages = 'New product added to the site - <a href="' . get_permalink( $post_ID ) . '">' . get_the_title( $post_ID ) . '</a>';
      		$all_vendors = $WCFM->wcfm_vendor_support->wcfm_get_vendor_list( true, '', '', '', '', false );
      		if( !empty( $all_vendors ) ) {
      			foreach( $all_vendors as $vendor_id => $all_vendor ) {
      				if( $vendor_id ) {
      					$WCFM->wcfm_notification->wcfm_send_direct_message( -1, $vendor_id, 1, 0, $wcfm_messages, 'new_product', true );
      				}
      			}
      		}
      	}
      }, 50, 3 );

      Thank You

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