I've created a link that should look like this:
www.mystore.com/yourorder?order_id=12345678&[email protected]
The user will be taken to an order tracking page.
But the url ends up looking like this:
http://www.mystore.com/yourorder?order_id=%7b%7bvar%20order.increment_id/&email=youremail%40hotmail.com%27%7d%7d
The template code looks like this:
<a href="{{store url='yourorder?order_id={{var order.increment_id}}&email={{var order.getCustomerEmail()}}'}}">here</a>
The {{var order.increment_id}}
is getting mangled there, but works fine in the email subject and elsewhere in the body. But the email address is turning out sort of ok (except for those trailing strange characters).
I had double quotes around the url value at first and thought single quotes inside might help with parsing, but single quotes made no difference.
Solution:
- Fixed unnecessary nesting of variables. (Thanks to Peter O'Callaghan's answer)
Changed
{{store url='yourorder'}}
to{{config path='web/secure/base_url'}}
. Otherwise,http
redirected tohttps
and (for some reason) lost the url parameters I was trying to pass.<a href="{{config path='web/secure/base_url'}}yourorder?order_id={{var order.increment_id}}&email={{var order.getCustomerEmail()}}">here</a>