Jump to content

Recommended Posts

Bonjour,

 

Je suis en charge de mettre en place un script de tracking post commande sur un site.

 

Nous utilisons Netaffiliation.

 

Je n'arrive pas à faire afficher les infos dans le tpl order-confirmation.tpl :

 

le prix de la transaction HT + sans FDP

l'id de la commande

et le mode de paiement

 

...

 

Si vous avez des astuces pour faire afficher ceci, pouvez m'aiguiller cela serait chic :D

 

PS : je suis sur une version 1.4.7

 

Cordialement,

Ronan

Edited by bolduq (see edit history)
Link to comment
Share on other sites

  • 11 months later...

Bonjour,

 

Alors ces tags ne sont pas vraiment faciles à poser (c'est un avis personnel).

 

De notre côté on a :

- modifié le template footer.tpl (qui permet de gérer certains tags en testant le $page_name)

- overridé OrderConfirmationController.php pour assigner l'objet Order au template order-confirmation

- Ajouter 1 hook sur actionObjectCustomerAddAfter (pour identifier la création d'un compte avec Mailing à oui) et overridé myacount pour avoir l'email dans my-account.tpl

 

Voici le bout de code pour footer.tpl :

{*** les tags de netaffiliation ***}
        {if $page_name == 'index'}
            <script type="text/javascript" src="http://img.metaffiliation.com/xxxxx.js?zone=accueil"></script>
        {elseif $page_name == 'category'}
            
            {assign var='IDCATEGORIE' value=$category->id}
            {assign var='LISTEIDS' value=''}
            {foreach from=$products item='product'}
                {assign var='LISTEIDS' value=$LISTEIDS|cat:$product.id_product|cat:','}
            {/foreach}
            {assign var='LISTEIDS' value=$LISTEIDS|regex_replace:"/,$/":""}
            
            <script type="text/javascript" src="http://img.metaffiliation.com/xxxxx.js?zone=categorie&idcategorie={$IDCATEGORIE}&listeids={$LISTEIDS}"></script>
            
        {elseif (($page_name == 'order-confirmation')||($page_name == 'module-bankwire-payment'))}
            
            {*** le code pour le retour du paiement ne peut pas être a cet endroit, il doit être dans chaque tpl de paiement**}
            
        {elseif $page_name == 'order' && strpos($template, '"cart_title"') !== FALSE }
            {* C'est moche mais ça permet de regrouper plus de codes *}
            
            {assign var='MONTANT' value=$total_price|replace:',':'.'}
            {assign var='LISTEIDS' value=''}
            {foreach from=$products item='product'}
                {assign var='LISTEIDS' value=$LISTEIDS|cat:$product.id_product|cat:','}
            {/foreach}
            {assign var='LISTEIDS' value=$LISTEIDS|regex_replace:"/,$/":""}
            <script type="text/javascript" src="http://img.metaffiliation.com/xxxxxx.js?zone=panier&montant={$MONTANT}&listeids={$LISTEIDS}"></script>
            
        {elseif $page_name == 'product'}
            
            {assign var='IDPRODUIT' value=$product->id}
            {assign var='IDCATEGORIE' value=$product->id_category_default}
            
            <script type="text/javascript" src="http://img.metaffiliation.com/xxxxxx.js?zone=produit&idproduit={$IDPRODUIT}&idcategorie={$IDCATEGORIE}"></script>
        {/if}
Edited by pliciweb_stephane (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...