Dokan plugin – Notification email to multiple sellers BIG PROBLEM! PLEASE HELP!

  • Home
  • Forums
  • Dokan
  • Dokan plugin – Notification email to multiple sellers BIG PROBLEM! PLEASE HELP!
This topic contains 10 reply and 4 voices, and was last updated by Anas Basalamah 10 years, 1 month ago
Viewing 10 Posts - 1 through 10 (of 10 total)
Author Posts
September 22, 2014 at 10:22 pm 27230
Anas Basalamah Hello! Run te Dokan plugin only and when setting up and testing the site I found a big problem/bug... When customer is buying from just one seller the notification email is sent correctly but when a buyer is buying from two different sellers no mail is sent at all. Just the admin gets the notification mail.. I use the woocommerce "Cash on delivery payment" option only. Please help me with this problem.. Cheers / O
September 23, 2014 at 1:43 am 27253
Tareq Hasan Tareq Hasan

Could you please open /includes/order-functions.php and delete the line 158 which has this code: dokan_disable_order_emails(); and see if it resolves the issue?

September 23, 2014 at 1:53 am 27257
Olof Olof

Hello =)

Cant find that at all… This is from lines 135 – 206.

/**
* Update the child order status when a parent order status is changed
*
* @global object $wpdb
* @param int $order_id
* @param string $old_status
* @param string $new_status
*/
function dokan_on_order_status_change( $order_id, $old_status, $new_status ) {
global $wpdb;

// make sure order status contains “wc-” prefix
if ( stripos( $new_status, ‘wc-‘ ) === false ) {
$new_status = ‘wc-‘ . $new_status;
}

// insert on dokan sync table
$wpdb->update( $wpdb->prefix . ‘dokan_orders’,
array( ‘order_status’ => $new_status ),
array( ‘order_id’ => $order_id ),
array( ‘%s’ ),
array( ‘%d’ )
);

// if any child orders found, change the orders as well
$sub_orders = get_children( array( ‘post_parent’ => $order_id, ‘post_type’ => ‘shop_order’ ) );
if ( $sub_orders ) {
foreach ($sub_orders as $order_post) {
$order = new WC_Order( $order_post->ID );
$order->update_status( $new_status );
}
}
}

add_action( ‘woocommerce_order_status_changed’, ‘dokan_on_order_status_change’, 10, 3 );

/**
* Mark the parent order as complete when all the child order are completed
*
* @param int $order_id
* @param string $old_status
* @param string $new_status
* @return void
*/
function dokan_on_child_order_status_change( $order_id, $old_status, $new_status ) {
$order_post = get_post( $order_id );

// we are monitoring only child orders
if ( $order_post->post_parent === 0 ) {
return;
}

// get all the child orders and monitor the status
$parent_order_id = $order_post->post_parent;
$sub_orders = get_children( array( ‘post_parent’ => $parent_order_id, ‘post_type’ => ‘shop_order’ ) );

// return if any child order is not completed
$all_complete = true;

if ( $sub_orders ) {
foreach ($sub_orders as $sub) {
$order = new WC_Order( $sub->ID );

if ( $order->post_status != ‘wc-completed’ ) {
$all_complete = false;
}
}
}

// seems like all the child orders are completed

September 23, 2014 at 2:30 am 27260
Tareq Hasan Tareq Hasan

Seems like you are using the plugin, not the theme. So there shouldn’t be any problem like this you say.

September 23, 2014 at 2:32 am 27261
Olof Olof

Tried several times and not get any notification emails when order from 2 different sellers.

Help?

Cheers / O

September 23, 2014 at 6:20 am 27282
Mahi Mahi

can you please confirm first you are using theme or plugin? cause, we are confused here .

September 23, 2014 at 9:33 am 27289
Olof Olof

Running Dokan plugin

September 24, 2014 at 4:42 am 27355
Olof Olof

Hello?

September 24, 2014 at 4:49 am 27358
Mahi Mahi

I assigned this support topic to dev team. Please wait for their reply.

September 24, 2014 at 5:02 am 27360
Olof Olof

Sure Mahi, ty.

September 24, 2014 at 6:01 am 27365
Anas Basalamah Anas Basalamah

this is the same problem

http://wedevs.com/support/topic/notification-emails-not-working/

They didn’t fix it

Viewing 10 Posts - 1 through 10 (of 10 total)