Track n Trace in email
-
It seems that track n trace codes are not send to the customer in the order shipment email. Do I need to do something specific to do that?
The page I need help with: [log in to see the link]
-
Hi @darkallman,
Which version of the WooCommerce and MyParcel plugin do you have? For both plugins, it must be the latest version.
- This reply was modified 6 years, 5 months ago by Richard Perdaan.
Woocommerce 4.9.6 + Myparcel 2.5.2
If you want I can sent you full status page, but not publically.Ok, I think I understand what’s happening.
My shipment emails are sent on a custom status change, not on status slug: wc-completedWith what code can I add the track n trace to a custom email message?
My shipment emails are sent on status with slug: ‘sent’, ‘sent-invoice1’ and ‘sent-invoice-2’
Therefor, myparcel function:
public function track_trace_email( $order, $sent_to_admin ) { if ( $sent_to_admin ) return; if ( WCX_Order::get_status( $order ) != 'completed') return; $order_id = WCX_Order::get_id( $order ); $tracktrace_links = WooCommerce_MyParcel()->admin->get_tracktrace_links ( $order_id ); if ( !empty($tracktrace_links) ) { $email_text = __( 'You can track your order with the following PostNL track&trace code:', 'woocommerce-myparcel' ); $email_text = apply_filters( 'wcmyparcel_email_text', $email_text, $order ); ?> <p><?php echo $email_text.' '.implode(', ', $tracktrace_links); ?></p> <?php } }
never adds the track n trace information to these emails.
Could you add an option to select to which emails/slugs a track n trace is added?
For now going to test with this:
if ( WCX_Order::get_status( $order ) != 'completed' && WCX_Order::get_status( $order ) != 'sent' && WCX_Order::get_status( $order ) != 'sent-onvoice-1' && WCX_Order::get_status( $order ) != 'sent-onvoice-2' ) return;
to see if it’s working.
- This reply was modified 6 years, 5 months ago by darkallman.
Tested, but no track n trace was added…. Not sure on how to proceed…..
Is there a shortcode to use to get tracking link/information?
Is there anyone here still providing support?
Hi @darkallman,
Sorry for my late response, because in the past 2 weeks I was very busy making a new checkout for all MyParcel plugins. This will also change some points in the WooCommerce plugin.
If I understand your explanation, you use a custom email / status and want to add the MyParcel track & trace inside the mail.
In your code I see that you use ‘sent-onvoice-1’ and ‘sent-onvoice-2’. Maybe you need to use ‘sent-invoice-1’ and ‘sent-invoice-2’?
Unfortunately there is no short code to retrieve the track & trace data. I think this is a good addition and will discuss this with my supervisor.
Perhaps it is more convenient to have mail contact with each other. Would you like to send an email to [email protected]
- This reply was modified 6 years, 5 months ago by Richard Perdaan.
- This reply was modified 6 years, 5 months ago by Richard Perdaan.
Hi @darkallman,
Sorry for my late response, because in the past 2 weeks I was very busy making a new checkout for all MyParcel plugins. This will also change some points in the WooCommerce plugin.
If I understand your explanation, you use a custom email / status and want to add the MyParcel track & trace inside the mail.
In your code I see that you use ‘sent-onvoice-1’ and ‘sent-onvoice-2’. Maybe you need to use ‘sent-invoice-1’ and ‘sent-invoice-2’?
Unfortunately there is no short code to retrieve the track & trace data. I think this is a good addition and will discuss this with my supervisor.
Perhaps it is more convenient to have mail contact with each other. Would you like to send an email to [email protected]
I sent you an email ??
When is the release scheduled?
Holy crap!
“In your code I see that you use ‘sent-onvoice-1’ and ‘sent-onvoice-2’. Maybe you need to use ‘sent-invoice-1’ and ‘sent-invoice-2’?”
That was it! Now it works…
So maybe an option to select SLUGS where to add the My Parcel Data?I am currently building it in Magento 1 and I will continue with WooCommerce. After this everything must be tested. It can take a month before there is a stable version. The release is depends of the bugs they come from the test results.
Holy crap!
“In your code I see that you use ‘sent-onvoice-1’ and ‘sent-onvoice-2’. Maybe you need to use ‘sent-invoice-1’ and ‘sent-invoice-2’?”
I spoke too soon I think. Testing a little bit more…….
I do not seem to be able to replicate this again….What will the changes be?
Will it include picking nearby drop locations for the customer?The biggest change is that there is chosen for a different design. One of the problems was that the iframe caused many problems. So this was the number one reason that we need a new checkout. With the new checkout the iframe is not longer used.
An Other point was that programming techniques were written with CoffeeScript. Now we are using only html/jquery, and that is making it easier to add new features.
- The topic ‘Track n Trace in email’ is closed to new replies.