Add tracking numbers to "shipped" order status

  • Posts: 57
  • Thank you received: 2
9 years 5 months ago #181724

Hey I have tried doing this, but the code that was provided, does not get me any data, the imported data fields for the tracking number stay empty.

Please Log in or Create an account to join the conversation.

  • Posts: 26034
  • Thank you received: 4006
  • MODERATOR
9 years 5 months ago #181912

Hi,

Can you please be more precise ?
Which code are you talking about exactly ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 719
  • Thank you received: 3
9 years 5 months ago #182781

Hi,
i find very interesting this topic.
So i was wondering:
if it is possible to create a new custom field "Tracking".
Then when I send the email of order shipped write the "Tracking" on the email
And automatically to have the "tracking" on the custom field.
I mean, I'd like to write the tracking number on the email and then, when i check the order, have the tracking number on the order.
Thanks


my site with Hikashop
www.lacasettabio.it
Last edit: 9 years 5 months ago by lacasetta.

Please Log in or Create an account to join the conversation.

  • Posts: 2143
  • Thank you received: 747
9 years 5 months ago #182786

lacasetta,

As stated here and in numerous other threads here in the forum (i.e. use the search to look for "tracking number"), it's fairly simple by creating an "order" custom field.

See this post for further explanations , for example.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

Please Log in or Create an account to join the conversation.

  • Posts: 719
  • Thank you received: 3
9 years 5 months ago #182838

Hi,
if i was not wrong the method is:
First of all you have to create a custom field. And this is ok for me too.

Then for each order you have to open the order in your backend and add the tracking number.
Then you have to modify the status order to shipped, set the "send mail to user" and confirm.

What i ask or better i'd like is just modify the status order to shipped, set the" send mail to user" and on the email write the tracking number on the email and confirm.
STOP
I mean that the system, before o after has sent the mail, puts the tracking number on the custom field automatically.
On this way it is speedier and faster; isn't it?


my site with Hikashop
www.lacasettabio.it

Please Log in or Create an account to join the conversation.

  • Posts: 719
  • Thank you received: 3
9 years 5 months ago #182846

Maybe there is a solution that i don't know!
On the ORDER > ADDITIONAL INFORMATION if i click on the "pensil", Hikashop open a pop up where i can set my custom field.
That's ok for me.
If i click on "SAVE" i have the custom field setted.
But what is "SAVE AND NOTIFY" button?
Maybe it have to notified the changement to the user by an email?
i ask that because from my end it has the same function of "SAVE" button.
Could someone explain me the differences from SAVE ad SAVE AND NOTIFY?
Thanks


my site with Hikashop
www.lacasettabio.it

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #183023

Hi,

To summarise, you want to give a tracking number in an email when changing the order status to shipped, right ?
If it is, in the order listing, you can directly change the order status with the dropdown, then a popup is displayed to save, before saving you can enable "notify customer" this way an email will be sent, the content of this email is in the popup and is editable so you can directly add your tracking number here.

Hope this is what you were looking for.

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
  • Hikashop Business
9 years 5 months ago #183033

Question to this topic:

when I have more shipping methods / names - do I add them subsequently in the code?

The example the screenshot shows two Post NL shipping methods - how are they added both in the code?

Please Log in or Create an account to join the conversation.

  • Posts: 719
  • Thank you received: 3
9 years 5 months ago #183039

Hi Xavier,
thanks for your help.
What you said is what i did until some week ago. And it works fine.
Now, i'd like to leave a track on the user account. So i created a custom field with the tracking information.
I set the tracking information via Orders > order number > additional information.
But after i set the tracking information if i click on "Save and notify" Hikashop does not send the email, it just only save the information.
Is that normal or there is something wrong?
I'd like with one single operation set the tracking and send the email.


my site with Hikashop
www.lacasettabio.it

Please Log in or Create an account to join the conversation.

  • Posts: 57
  • Thank you received: 2
9 years 5 months ago #183042

Hello here again!

Everyone, I would suggest that Hikashop adds this feature as a default feature, in the send customer notification thing.
Many other webshop ecommerce software offers a way to implent the tracking number without all this coding hassle.

I hired a guy that made me pay over 100 $ to make this happen and it still doesn't work as good as I want it to work.
Therefor I am not satisfied by Hikashop not providing support on this / supporting tracking numbers out of the box.

I am very displeased by it, and even though the code support is great, I just wish they could implement / give us a hotfix that we can upload, and it would be done. :/
But no, we have to add custom code which is horrible.

But okay I guess that Hikashop may someday support tracking numbers out of the box. :(

Please Log in or Create an account to join the conversation.

  • Posts: 2143
  • Thank you received: 747
9 years 5 months ago #183046

I'm also "just a user", and sure I love more cool "out of the box" features, but honestly, I think this whole matter is being made bigger than it's worth. With typing the tracking info right into the email as suggested by Xavier, and custom order fields, there are at least two practical solutions.
Okay, the availability of custom order fields requires the Business Edition, but that's hardly more than the $100 that iwally got ripped off with instead (sorry for that), and it comes with a ton more stuff - out of the box, indeed.

Keep in mind that it's usually not only the tracking number only you'll want to pass on to the customer, but in many cases it's also a freight forwarder's name (at least for "nameless" manual shipping methods, a web link for tracking, and possibly even the forwarder's contact number. Which is why I dedicated no less than 4 custom fields for it.

Was it complicated to be put in place? Not at all.
Is it many steps to fill in per order/shipment, or more than if it were an "out of the box" feature? Nope.

Does it work? Absolutely yes. :)


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

Please Log in or Create an account to join the conversation.

  • Posts: 57
  • Thank you received: 2
9 years 5 months ago #184074

Dear Xavier, I have tried your code,
but the output is null, the tracking number does not appear in the e-mail.

It stays empty, also the if and then, always returns the then condition even when the if criteria match.
Can you please look and test this code? I have tested it and it does not work! :huh: :( :( :( :(

Xavier wrote: Hi,

You can use code like:

<?php
$shippingClass = hikashop_get('class.shipping');
$shipping_name = '';
if(!is_numeric($data->cart->order_shipping_id)){
	$shipping_name=$shippingClass->getShippingName($data->cart->order_shipping_method,$data->cart->order_shipping_id);
}
if($shipping_name == 'SHIPPING_METHOD_NAME'){
	echo '<a href="http://www.postnlpakketten.nl/klantenservice/tracktrace/basicsearch.aspx?lang=nl&B='.$data->order->tracking_number.'&P='.$data->order->zip_code.'" target="_blank"><strong>'.$data->order->tracking_number.'</strong></a>';
}else{
	echo 'You can track your shipment with 17track, by clicking this url http://www.17track.net/en/result/post.shtml?nums='.$data->order->tracking_number.'<br/>Your tracking number is '.$data->order->tracking_number;
}
?>

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #184147

Hi,

Are you sure that you have a custom order field with the Column name equal to "tracking_number" and that this value is filled in the order ?

If you do "var_dump($shipping_name);" before the if condition, do you have the desired value returned ?

Please Log in or Create an account to join the conversation.

Time to create page: 0.115 seconds
Powered by Kunena Forum