Hi Xavier,
Just wondering,
- The e-mail that I need to edit for the notification of shipping, is called order status notification right?
prntscr.com/409r9g
- I made the following shipping methods:
- I added 1 custom field, tracking_number under the Order table. See screenshot:
The code will work this way? So now when the shipping method is PostNL <10KG, it will get the postnl url right?
- Another thing is that, the zip_code is a variable too, could that be asked for too with the code? the user must have that filled in during the order. and it is needed for the postnl track and trace?
I believe you need address_post_code for that?
Could you please add that?
<?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 == 'PostNL Pakket < 10KG'){
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;
}
?>