add variable from custom field in shipping e-mail

  • Posts: 17
  • Thank you received: 0
8 years 5 months ago #243608

-- url of the page with the problem -- : www.hiphey.be
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.5

Hello,

I would like your help again.
I have created a custom field in the back-end where the admin can enter a tracking number.

I can get the tracking number to show itself on the e-mail by using {VAR:order.tracking}

Now i want it to be in a clickable link. The code to display it on the e-mail works.
But i wanted to add the link to the post company so that the customer only would have to click the link to see the tracking info directly.

I have been able to show the link itself using this code in the preload part:

$url_Tracking = $data->order_tracking ->$data->cart->order_tracking;
if(!empty($customer->user_cms_id) && (int)$customer->user_cms_id != 0) {
	$url_Tracking = '<a style= "color: #FFFFFF; " href="http://track.bpost.be/etr/light/performSearch.do?oss_language=NL&searchByItemCode=true&itemCodes='.$url_Tracking.'">Tracking code:'.$url_Tracking.'</a>';
}
and this code in the pre load part
'TRACKING_CODE' => JText::sprintf($url_Tracking),

What i see on the mail is the url but whit out the variable tracking number that the admin can enter in the backend.

The tracking code field was created using the custom fields in the hikashop menu.

Can anybode tell me how to display the tracking number inside of the link.

Kind regards

Bram

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
8 years 5 months ago #243617

That line is wrong:
$url_Tracking = $data->order_tracking ->$data->cart->order_tracking;

If the tag {VAR:order.tracking} works, then the code should be:
$url_Tracking = $data->cart->tracking;

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

Time to create page: 0.053 seconds
Powered by Kunena Forum