- Posts: 17
- Thank you received: 0
add variable from custom field in shipping e-mail
10 years 4 months ago #243608
by Bram
add variable from custom field in shipping e-mail was created by Bram
-- 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:
and this code in the pre load part
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
-- 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:
Code:
$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>';
}
Code:
'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.
10 years 4 months ago #243617
by nicolas
Replied by nicolas on topic add variable from custom field in shipping e-mail
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;
$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.049 seconds