Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards!

Customer emails

WCMp Core

Resolved
Viewing 18 reply threads
  • Author
    Posts
    • #137810
      fyftofg-9488
      Participant

      Hi.
      Problem iam facing is with order, sub-order numbers and customer, vendors emails.
      On my store the customer pays directly to vendor, not to admin.
      Now when order is placed the customer gets an email with main order number, vendors recieve emails with suborder numbers. When customer pays he include main order number, but the vendor dont know that number because he recieved suborder number in previous email.

      Is there an possibility to enable suborder customer emails, that customer will get separate emails with all the suborders numbers? In this case customer gets suborder number , vendor gets it also and payment is correct.

      I was searching for solution but everywhere i see only “DISABLE suborder emails” but i want to enable them.

    • #137816

      Hi @fyftofg-9488, thanks for the query.

      The new order mail of the customer is sent by WooCommerce. That is why they will only show the main order number.

      So if you want, we can display the sub order number under the vendor name : https://prnt.sc/GakCudLuwA10

      Please confirm the flow, so our team can assist you accordingly.

    • #137832
      fyftofg-9488
      Participant

      Hi. Thank you for fast reply.
      Lets consider that flow with suborder number under the vendor name:
      1. Main order number from email have to be deleted (customer dont need to know that number , check point 2.)
      2. I am using your code to show vendor bank details for customers

      function order_vendor_bank_details($item_id, $item, $order){
      if(‘bacs’ !== $order->get_payment_method()) return;
      $vendor = get_wcmp_product_vendors($item[‘product_id’]);
      if(!$vendor) return;
      // Vendor BACS account fields shown on emails.
      $account_fields = array(
      ‘bank_name’ => array(
      ‘label’ => __( ‘Bank’, ‘woocommerce’ ),
      ‘value’ => $vendor->bank_name,
      ),
      ‘account_number’ => array(
      ‘label’ => __( ‘Account number’, ‘woocommerce’ ),
      ‘value’ => $vendor->bank_account_number,
      ),
      ‘sort_code’ => array(
      ‘label’ => __( ‘Bank code’, ‘woocommerce’ ),
      ‘value’ => $vendor->aba_routing_number,
      ),
      ‘iban’ => array(
      ‘label’ => __( ‘IBAN’, ‘woocommerce’ ),
      ‘value’ => $vendor->iban,
      )
      );
      $account_html = ‘‘.$vendor->page_title.’

        ‘;
        foreach ( $account_fields as $field_key => $field ) {
        if ( ! empty( $field[‘value’] ) ) {
        $account_html .= ‘<li class=”‘ . esc_attr( $field_key ) . ‘”>’ . wp_kses_post( $field[‘label’] ) . ‘: ‘ . wp_kses_post( wptexturize( $field[‘value’] ) ) . ‘‘ . PHP_EOL;
        }
        }

        $account_html .= ‘

      ‘;
      echo $account_html;
      }
      add_action(‘woocommerce_order_item_meta_end’, ‘order_vendor_bank_details’, 99, 3);

      It is already showing vendor details after every product on thank you page and customer email.
      Scenario : vendor A. vendor B. Customer purchase 2 or more products from vendor A, and 2 or more products from vendor B.
      It is showing bank details multiple times , and now if we will add suborder number , it will show that numbers also multiple times.
      For purchase single product from each vendor its good solution , but when customer purchase multiple products it can make kind of confusion.

      Is it possible to “sort out” that things? That it will sort suborders and show suborder number and vendor bank details only once even if customer will purchase muliple products from one vendor?
      3. That is why i thought about suborder emails (found a lot of posts at this forum about disabling them , but i want to enable that). In this case customer will recive email for every suborder made. The same which woocommerce sends but for suborder not main order. In that email will be suborder number and also vendor bank details, total cost and shipping cost of that suborder (on my website customer pays everything to vendor)
      Scenario the same as above : customer recieve 2 emails about orders made , he knows exactly the suborder number, vendor details etc etc , and vendor after payment is made, can easily connect payment to order (because customer used suborder number while making bank transfer)

      I hope i explained everything good

    • #137848

      Hi,

      Our replies are below:
      1. Main order number from email have to be deleted (customer don’t need to know that number , check point 2.)
      >> To remove the order id you have to override all email templates. Like customer-completed-order.php, customer-on-hold-order.php and also email-order-details.php then remove the order number.

      2. I am using your code to show vendor bank details for customers
      >> As per your requirement you need to modify the above code you shared. so this will stop if 2nd product is from the same buyers. Otherwise you have to change the position to vendor details portion.

      Regards,

    • #140518
      fyftofg-9488
      Participant
      This reply has been marked as private.
    • #140521
      fyftofg-9488
      Participant
      This reply has been marked as private.
    • #140583
      This reply has been marked as private.
    • #142479
      fyftofg-9488
      Participant
      This reply has been marked as private.
    • #142626
      This reply has been marked as private.
      • #142639
        fyftofg-9488
        Participant
        This reply has been marked as private.
    • #142716

      Hi,
      add below code to your function.php and test

      add_filter('wcmp_prevent_vendor_order_emails_trigger', 'wcmp_email_disable_remove');
      function wcmp_email_disable_remove($emails) {
          $prevent_vendor_order_emails = array(
                  'recipient' => array(
                      'cancelled_order',
                      ),
                  'enabled' => array(
                      'customer_on_hold_order', 
                      'customer_processing_order', 
                      'customer_refunded_order', 
                      'customer_partially_refunded_order', 
                      'customer_completed_order',
      
                      'customer_on_hold_order',
                      'customer_processing_order',
                      ),
                  'disabled' => array(
                      'new_order',
                  )
              );
          return $prevent_vendor_order_emails;
      }
      Copy

      Regards,

    • #142722
      fyftofg-9488
      Participant
      This reply has been marked as private.
    • #142734

      HI,
      First of all let me know where do you want to add data in order page and email. Please share screenshot and mark the area.

      then we will share hook and filters.

      Regards,

    • #142756
      fyftofg-9488
      Participant
      This reply has been marked as private.
    • #142759
      Natan Mercedes
      Participant

      Hello, I am trying to use multivendor x but it gives me an error: MVX Pro is not active. Activate MVX Core first to activate MVX Pro.

      I have deactivated the plugin and all previous plugins and the error continues, please help me

      Thanks!

    • #142788

      Hi,

      kindly use below hook to add data in order page

      do_action( 'woocommerce_order_details_after_order_table', $order );
      Copy

      regards,

      • #142797
        fyftofg-9488
        Participant
        This reply has been marked as private.
        • #142816

          Hi,
          You can also get the vendor from the order(if this is vendor order)

          $vendor_id = get_post_meta($order_id, '_vendor_id', true);
          $vendor = get_wcmp_product_vendors($vendor_id);
          Copy

          Regards,

    • #142789
      Natan Mercedes
      Participant

      Hello, The problem is that I cannot activate the pro version, what is the solution?
      Error: MVX Pro is not active. Activate MVX Core first to activate MVX Pro.

      Thanks!

    • #142790

      @Natan Mercedes, our team has replied you over the mail. Please check.

    • #142791
      Natan Mercedes
      Participant

      Yes, thanks, I already sent the accesses, I just hope you can help me, thanks!

    • #142794

      Team will get back to you there @Natan Mercedes

Viewing 18 reply threads

The topic ‘Customer emails’ is closed to new replies.