There is this code, how correct and it works or not, it must be placed on the last page of the order.
Hello, tell me please did you integrate with affiliate programs?We are currently working with an affiliate program actionpay.net and we can't implement integration with a pixel that captures user action.
There is this code, how correct and it works or not, it must be placed on the last page of the order.<?phpif (isset($_COOKIE["actionpay"]) && $_COOKIE["utm_source"]=="actionpay"){echo '<img src="<a data-ipb='nomediaparse' href='https://apypx.com/ok/id.png?actionpay=%27.$_COOKIE%5B'>https://apypx.com/ok/id.png?actionpay='.$_COOKIE["actionpay"].'&apid='.$order_id.'&price='.$total.'"height="1px" width="1px" />';}?>We tried to put it through {literal} in /templates/views/checkout/checkout.tplbut the when part is displayed on the design page. Just tried to create a separate php file and make it include, the situation is similar.The pixel was written based on the instructions:Can please tell me how to put it and check its correctness.Please tell me how to set the cookie lifetime of 30 days or they are normally active for 30 days.Thanks for supporting me. We are glad to cooperate with You.
Hello,
You can create app/addons/my_changes/controllers/frontend/checkout.post.php file and add such code:
if ($mode == 'complete') { if (isset($_COOKIE["actionpay"]) && $_COOKIE["utm_source"]=="actionpay"){ echo ''; } }
Hello,
You can create app/addons/my_changes/controllers/frontend/checkout.post.php file and add such code:
if ($mode == 'complete') { if (isset($_COOKIE["actionpay"]) && $_COOKIE["utm_source"]=="actionpay"){ echo ''; } }
ЗдравÑтвуйте, ÑпаÑибо за поддержку!
In the .tpl you can use
{if $smarty.cookie.actionpay && $smarty.cookie.utm_source == 'actionpay'} {/if}
Do not forget to correct src parameter
In the .tpl you can use
{if $smarty.cookie.actionpay && $smarty.cookie.utm_source == 'actionpay'} {/if}Do not forget to correct src parameter
The $order_info.promotions array contains all information about applied promotions
The $order_info.promotions array contains all information about applied promotions
The $order_info.promotions array contains all information about applied promotions
Please tell me how to set up cookies for 30 days.
We want to make a condition if a promotion is used, then one code was executed, if not used, then another. Please tell me how to check it?
Check content of the array with the following code
{$order_info.promotions|fn_print_r}
Please tell me how to set up cookies for 30 days.
What is the purpose of new cookie?
Check content of the array with the following code
{$order_info.promotions|fn_print_r}What is the purpose of new cookie?
OK. Please provide us with the code where actionpay cookie is set
OK. Please provide us with the code where actionpay cookie is set
Вы выполнили пункт "Сохранение значений параметров url в cookie"?
ЕÑли да, то можно иÑпользовать хук на целевой Ñтранице заказа
design/themes/TEMA/templates/views/checkout/complete.tpl
и показывать пикÑель Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ smarty
{if $smarty.cookies.actionpay && $smarty.cookies.utm_source == 'actionpay'}{/if}
Там же проверÑйте и маÑÑив promotions
ЗдравÑтвуйте, ÑпаÑибо за ответ.
Вы выполнили пункт "Сохранение значений параметров url в cookie"?
ЕÑли да, то можно иÑпользовать хук на целевой Ñтранице заказа
design/themes/TEMA/templates/views/checkout/complete.tpl
и показывать пикÑель Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ smarty
{if $smarty.cookie.actionpay && $smarty.cookie.utm_source == 'actionpay'}{/if}
Там же проверÑйте и маÑÑив promotions
Вы выполнили пункт "Сохранение значений параметров url в cookie"?
Ðет, подÑкажите пожалуйÑта, как Ñто Ñделать?
design/themes/TEMA/templates/views/checkout/complete.tpl
и показывать пикÑель Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ smarty
Мы вÑтавили данный код куда выÑказали
СпаÑибо за вашу поддержку.
ПоÑле вÑтавки кода в design/themes/TEMA/templates/views/checkout/complete.tpl
Вышла ошибка, поÑле Ð¾Ñ„Ð¾Ñ€Ð¼Ð»ÐµÐ½Ð¸Ñ Ð·Ð°ÐºÐ°Ð·:
Smarty Compiler: Syntax error in template "../design/themes/responsive/templates/views/checkout/complete.tpl" on line 84 "{if $smarty.cookie.actionpay && $smarty.cookie.utm_source == 'actionpay'}" $smarty.cookie is invalid -->
Да, должно быть cookies вмеÑто cookie. Свой поÑÑ‚ поправил
Ðет, подÑкажите пожалуйÑта, как Ñто Ñделать?
Ðапример, через контроллер init.post.php в модуле. Он будет вызыватьÑÑ Ð¿Ñ€Ð¸ поÑещении любой Ñтраницы витрины
СпаÑибо за ответ.
Да, должно быть cookies вмеÑто cookie. Свой поÑÑ‚ поправил
Ðапример, через контроллер init.post.php в модуле. Он будет вызыватьÑÑ Ð¿Ñ€Ð¸ поÑещении любой Ñтраницы витрины
Мы получаетÑÑ Ð´Ð¾Ð»Ð¶Ð½Ñ‹ поÑтавить код из инÑтрукции: https://docs.google.com/document/d/1UPnSi2cD5ICJt8R9WhQOUoGmQZgwfFu6n_cI2rZT4q0/edit#heading=h.3znysh7
if (isset($_GET["actionpay"])){ setcookie("actionpay", $_GET["actionpay"], time()+60*60*24*30); }
в конец файла init.php который находитÑÑ Ð² корней Ñайта? Такой файл не нашли init.post.php.
ЕÑть еще такой файл ../app/controllers/backend/init.php
Мы вÑтавили данный код, как вы и Ñказали, но он не отрабатывает:
../design/themes/responsive/templates/views/checkout/complete.tpl
{* place any code you wish to display on this page right after the order has been placed *} {hook name="checkout:order_confirmation"} {if $smarty.cookies.actionpay && $smarty.cookies.utm_source == 'actionpay'}{/if} {/hook}
design/themes/TEMA/templates/views/checkout/complete.tpl
и показывать пикÑель Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ smarty
{if $smarty.cookies.actionpay && $smarty.cookies.utm_source == 'actionpay'}{/if}
СпаÑибо за ответ.
Мы получаетÑÑ Ð´Ð¾Ð»Ð¶Ð½Ñ‹ поÑтавить код из инÑтрукции: https://docs.google.com/document/d/1UPnSi2cD5ICJt8R9WhQOUoGmQZgwfFu6n_cI2rZT4q0/edit#heading=h.3znysh7
if (isset($_GET["actionpay"])){ setcookie("actionpay", $_GET["actionpay"], time()+60*60*24*30); }в конец файла init.php который находитÑÑ Ð² корней Ñайта? Такой файл не нашли init.post.php.
ЕÑть еще такой файл ../app/controllers/backend/init.php
You can use My changes module and create the following file
app/addons/my_changes/controllers/frontend/init.pre.php
Мы вÑтавили данный код, как вы и Ñказали, но он не отрабатывает:
../design/themes/responsive/templates/views/checkout/complete.tpl
Right, because cookie is not set in the php file
You can use My changes module and create the following file
app/addons/my_changes/controllers/frontend/checkout.pre.php
Hello, we have inserted a cookie handler, as you said
if (isset($_GET["actionpay"])){ setcookie("actionpay", $_GET["actionpay"], time()+60*60*24*30); }
Right, because cookie is not set in the php file