Hi,
Using paypal module as an example, if i edit the .tpl directly like this:
<img src="https://test.com?order_id={$order.id_order|intval}&amount={$price|replace:'$ ':''}" />
The URL on frontpage would become:
<img src="https://test.com?offer_id=1234&amount=0.01">
which is destroying the URL by escaping the ampersand symbol.
I have tried multiple ways doing it, including:
Controller:
$this->context->smarty->assign('ampHtml', rawurlencode("&"));
.tpl:
{$ampHtml|escape:'html':'UTF-8'|htmlspecialchars_decode:3}
- and all sorts of encoding and decoding I can find on Google (e.g. tools::encode in Controller & tools::decode in .tpl) but it is still escaping the & symbol!
How can I create a proper URL with GET parameters in .tpl or in controller? Appreciate the assistance, been figuring this for the past 2 hours but futile.
I am using PS 1.6.1.24 and working on paypal module