start of tracking tag

This commit is contained in:
Marion Muszynski 2017-07-18 09:56:24 +02:00
parent ab2858cb9a
commit d868d563f5
2 changed files with 46 additions and 26 deletions

View File

@ -30,7 +30,19 @@ if(($sponsor = Tools::getValue('sponsor')) && strlen($sponsor) > 12) {
if(Tools::getIsset('lp')) {
$lp = Tools::getValue('lp');
}
Tools::redirectLink($link->getPageLink('authentication.php').'?create_account=1&sponsor='.rawurlencode($cipherTool->encrypt('1|'.$email.'|')).(isset($url['query'])? '&'.$url['query']: '').(isset($lp)? '&lp='.$lp: '').$gclid);
if(!class_exists('AntTrackingTag')){
include_once(_PS_MODULE_DIR_.'/ant_trackingtag/models/AntTrackingTag.php');
}
$tags = AntTrackingTag::getTags();
$url_tag ='';
foreach ($tags as $tag) {
if(Tools::getIsset($tag['tag'])) {
$value = Tools::getValue($tag['tag']);
$url_tag .='&'.$tag['tag'].'='.$value;
}
}
Tools::redirectLink($link->getPageLink('authentication.php').'?create_account=1&sponsor='.rawurlencode($cipherTool->encrypt('1|'.$email.'|')).(isset($url['query'])? '&'.$url['query']: '').(isset($lp)? '&lp='.$lp: '').$url_tag.$gclid);
// Tools::redirectLink($link->getPageLink('authentication.php').'?create_account=1&sponsor='.rawurlencode($cipherTool->encrypt('1|'.$email.'|')).(isset($url['query'])? '&'.$url['query']: ''));
}
}

View File

@ -40,6 +40,14 @@
});
</script>
<div class="hidden" style="display: none !important;">
{if isset($tracking_tags) && !empty($tracking_tags)}
{foreach from=$tracking_tags item=tracking_tag key=key}
<input type="hidden" name="trackingtags[{$key}]" value="{$tracking_tag}" />
{/foreach}
{/if}
</div>
<fieldset>
{if isset($newsletter) && $newsletter}
<p class="checkbox" >