motion2082 Posted May 4, 2016 Share Posted May 4, 2016 (edited) Hey guys, When I change my order from "processing" to "shipped" using the "shipped" template the "shipping_number" is not being sent. The only way to force it is to re-enter it into the order then hit send. When I do this, the "shipped" and "in_Transit" templates are sent, one has the "shipping_number" and the other does not What the hell is going on here? Edited May 4, 2016 by motion2082 (see edit history) Link to comment Share on other sites More sharing options...
shokinro Posted May 4, 2016 Share Posted May 4, 2016 In PrestaShop, the order status change and shipping tracking number is a separated operation. When you changed the order status, there is no place you are able to enter tracking number, it is just a order status change, the email is just a notification of order status change. You have enter the tracking number by edit the shipping carrier at Shipping section of Order Details page, so that the shipping tracking number will be sent separately. Link to comment Share on other sites More sharing options...
motion2082 Posted May 4, 2016 Author Share Posted May 4, 2016 In PrestaShop, the order status change and shipping tracking number is a separated operation. When you changed the order status, there is no place you are able to enter tracking number, it is just a order status change, the email is just a notification of order status change. You have enter the tracking number by edit the shipping carrier at Shipping section of Order Details page, so that the shipping tracking number will be sent separately. Hi Shokino, So even though the tracking number is already entered, you need to re-enter it everytime you change the status to "shipped" ? Also do you know how come 2 notification emails are sent out? Regards, Motion Link to comment Share on other sites More sharing options...
shokinro Posted May 4, 2016 Share Posted May 4, 2016 So even though the tracking number is already entered, you need to re-enter it everytime you change the status to "shipped" ? Not sure, when and where you entered, it has to be saved the shipping info of that order that you can see it at back office Order Details - Shipping section. If that is the case, then the email should be sent when you entered the shipping tracking number. Also do you know how come 2 notification emails are sent out? Are the t 2 mails you referring to exactly the same? or different ones (one for order status, one for shipping tracking number notification) So even though the tracking number is already entered, you need to re-enter it everytime you change the status to "shipped" ? Also do you know how come 2 notification emails are sent out? Link to comment Share on other sites More sharing options...
motion2082 Posted May 4, 2016 Author Share Posted May 4, 2016 Not sure, when and where you entered, it has to be saved the shipping info of that order that you can see it at back office Order Details - Shipping section. If that is the case, then the email should be sent when you entered the shipping tracking number. The Tracking number has been entered in the ORDER > Shipping Tab If I hit "resend" email this tracking number displays in the email as {shipping_number} To force it to be sent I have to click "edit" then add it again then hit "resend" Changing the status from "processing" to "shipped" = as long as tracking number is entered first 2x emails are sent, one with tracking number and one without. Both have different subject headings. Subject 1 = Package Shipped Subject 2 = Shipped Link to comment Share on other sites More sharing options...
motion2082 Posted May 4, 2016 Author Share Posted May 4, 2016 Currently using the "in_transit.html" template to send out on "shipped" with following settings The result is 2x emails in inbox Hope this makes a little more sense Package Shipped = Shipping number comes through Shipped = {shipping_number} is displayed Happy the Package Shipped is working but not sure why the 2nd email is coming through and from where. Could have something to do with the attachments? Link to comment Share on other sites More sharing options...
shokinro Posted May 4, 2016 Share Posted May 4, 2016 I think "Shipped" is the email sent for the order status change, and "Package shipped" is sent for tracking number. It could be a bug that when send the first email, the tracking number was not replaced with true data. Link to comment Share on other sites More sharing options...
shokinro Posted May 4, 2016 Share Posted May 4, 2016 Just checked the default email template for "Shipped". it was as following. There is no shipping carrier related information (of course there is no tracking number). Even you modified template add keyword {shipping_number}, it will not be replaced, because the variable has to be prepared and passed to Mail classes so that it will be replaced. Otherwise it will be remain as is. So I think it is not a bug, it is by design. HI {FIRSTNAME} {LASTNAME},YOUR ORDER HAS BEEN SHIPPED ORDER {ORDER_NAME} - SHIPPED Your order with the reference {order_name} has been shipped. Thank you for shopping with {shop_name}! You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. {shop_name} powered by PrestaShop™ 1 Link to comment Share on other sites More sharing options...
motion2082 Posted May 4, 2016 Author Share Posted May 4, 2016 (edited) Just checked the default email template for "Shipped". it was as following. There is no shipping carrier related information (of course there is no tracking number). Even you modified template add keyword {shipping_number}, it will not be replaced, because the variable has to be prepared and passed to Mail classes so that it will be replaced. Otherwise it will be remain as is. So I think it is not a bug, it is by design. HI {FIRSTNAME} {LASTNAME},YOUR ORDER HAS BEEN SHIPPED ORDER {ORDER_NAME} - SHIPPED Your order with the reference {order_name} has been shipped.Thank you for shopping with {shop_name}! You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. {shop_name} powered by PrestaShop™ Hi Shokino, That's a interesting observation. I believe you're correct. I tried using the "in-transit.html" template and it is exactly the same too. So definitely not a bug, just how it is by design. I wonder if it would be possible to force the {shipping_number} data to be TRUE Somehow I don't think it would be possible. Regards, Motion Edited May 4, 2016 by motion2082 (see edit history) Link to comment Share on other sites More sharing options...
motion2082 Posted May 4, 2016 Author Share Posted May 4, 2016 (edited) So have edited the {shipping_number} out of the in_transit.html email This means that it will get sent in the shipped.html / shipped status but not in the in_transit.html template I attempted to force the variable by editing /admin/controller/AdminOrdersController.php like so Unfortunately it made no difference I guess having it on the "shipped.html" but not the "in_transit.html" will do for now Thank you for pointing out all those points above, much appreciated if ($history->id_order_state == Configuration::get('PS_OS_SHIPPING') && $order->shipping_number) { $templateVars = array('{followup}' => str_replace('@', $order->shipping_number, $carrier->url), '{shipping_number}' => $order->shipping_number); } Edited May 4, 2016 by motion2082 (see edit history) Link to comment Share on other sites More sharing options...
shokinro Posted May 4, 2016 Share Posted May 4, 2016 I think you are on right direction. hope you can find out a solution soon. Link to comment Share on other sites More sharing options...
TiaNex Shopping Posted December 4, 2016 Share Posted December 4, 2016 i don't know why the code like this,need replace the @ to tracking number,so we should add a @ at the end of carrier url? or it maybe contact the url $carrier->url.$order->shipping_number if ($history->id_order_state == Configuration::get('PS_OS_SHIPPING') && $order->shipping_number) {$templateVars = array('{followup}' => $carrier->url.$order->shipping_number, '{shipping_number}' => $order->shipping_number);} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now