cristianfpg Posted January 30, 2016 Share Posted January 30, 2016 hi friends, i need to add a conversion pixel after my checkout but i dont find this slide in the template or what is the correct from in the backoffice? Link to comment Share on other sites More sharing options...
yaniv14 Posted January 30, 2016 Share Posted January 30, 2016 If you mean the page after payment accepted its call order-confirmation and it can be either the main order-confirmation.tpl in your theme folder or most likely an override of the used payment method. So you should probably look for the order confirmation tpl file inside the payment module. Link to comment Share on other sites More sharing options...
cristianfpg Posted January 31, 2016 Author Share Posted January 31, 2016 my code is located in this .tlp i dont understand why not working Link to comment Share on other sites More sharing options...
yaniv14 Posted January 31, 2016 Share Posted January 31, 2016 What do you mean by this .tlp? Link to comment Share on other sites More sharing options...
cristianfpg Posted February 1, 2016 Author Share Posted February 1, 2016 the conversion code is located in order-confirmation.tpl into theme directory Link to comment Share on other sites More sharing options...
yaniv14 Posted February 1, 2016 Share Posted February 1, 2016 What payment module are you using? It looks like the tpl file that load on the order confirmation page is from the module and not from the main theme file. Link to comment Share on other sites More sharing options...
cristianfpg Posted February 1, 2016 Author Share Posted February 1, 2016 look my shop: http://juan.com.co/shop/en/ my payment forms are payu and paypal but i dont find any directory from this modules Link to comment Share on other sites More sharing options...
yaniv14 Posted February 1, 2016 Share Posted February 1, 2016 I am not familiar with payu but Paypal should be inside your root folder modules/paypal And you should look for order-confirmation.tpl inside views/templates/front Link to comment Share on other sites More sharing options...
cristianfpg Posted February 2, 2016 Author Share Posted February 2, 2016 ok, i found the directories in paypalusa/views/templates/front: - errors-messages.tpl - express-checkout-messages.tpl * - index.php in payulatam/views/templates/front: - error.tpl - index.php - redirect.tpl - response.tpl * - validation.tpl - warning.tpl i think that the code should be in the * files Link to comment Share on other sites More sharing options...
yaniv14 Posted February 2, 2016 Share Posted February 2, 2016 Try to compare the text you are getting on the order confirmation page with one of the tpl files. You can also look inside hook folder not only front. How do you know that the pixel is not loading on the order confirmation page? Did you check the page source to see? maybe it's loading ok but you have different issue with the tracking code? Link to comment Share on other sites More sharing options...
cristianfpg Posted February 2, 2016 Author Share Posted February 2, 2016 the chrome extension dont show the pixel Link to comment Share on other sites More sharing options...
yaniv14 Posted February 3, 2016 Share Posted February 3, 2016 What do you mean by chrome extension? Open the page source with google chrome (ctrl + u) and see if you find the script Link to comment Share on other sites More sharing options...
cristianfpg Posted February 4, 2016 Author Share Posted February 4, 2016 (edited) i found the tpl, you were right, my code works in the module directory (response.tpl in payu) i have another problem... the conversion works as rejected like approved and display both cases like a approved purchase (you understand me? sorry my english) Edited February 4, 2016 by cristianfpg (see edit history) Link to comment Share on other sites More sharing options...
yaniv14 Posted February 4, 2016 Share Posted February 4, 2016 Paste the content of the tpl file here so I can take a look Link to comment Share on other sites More sharing options...
cristianfpg Posted February 4, 2016 Author Share Posted February 4, 2016 {* * 2014 PAYU LATAM * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PAYU LATAM <[email protected]> * @copyright 2014 PAYU LATAM * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) *} <link rel="stylesheet" href="{$css_dir}global.css" type="text/css" media="all"> <link href="{$css|escape:'htmlall':'UTF-8'}payu.css" rel="stylesheet" type="text/css"> {if $valid} <center> <table class="table-response"> <tr align="center"> <th colspan="2"><h1 class="md-h1">{l s='Purchase Data' mod='payulatam'}</h1></th> </tr> <tr align="left"> <td>{l s='Transaction State' mod='payulatam'}</td> <td>{$estadoTx|escape:'htmlall':'UTF-8'}</td> </tr> <tr align="left"> <td>{l s='Transaction ID' mod='payulatam'}</td> <td>{$transactionId|escape:'htmlall':'UTF-8'}</td> </tr> <tr align="left"> <td>{l s='Purchase Reference' mod='payulatam'}</td> <td>{$reference_pol|escape:'htmlall':'UTF-8'}</td> </tr> <tr align="left"> <td>{l s='Transaction Reference' mod='payulatam'}</td> <td>{$referenceCode|escape:'htmlall':'UTF-8'}</td> </tr> {if $pseBank!=null} <tr align="left"> <td>CUS</td> <td>{$cus|escape:'htmlall':'UTF-8'}</td> </tr> <tr align="left"> <td>{l s='Bank' mod='payulatam'}</td> <td>{$pseBank|escape:'htmlall':'UTF-8'}</td> </tr> {/if} <tr align="left"> <td>{l s='Total Value' mod='payulatam'}</td> <td>${$value|escape:'htmlall':'UTF-8'}</td> </tr> <tr align="left"> <td>{l s='Currency' mod='payulatam'}</td> <td>{$currency|escape:'htmlall':'UTF-8'}</td> </tr> <tr align="left"> <td>{l s='Description' mod='payulatam'}</td> <td>{$description|escape:'htmlall':'UTF-8'}</td> </tr> <tr align="left"> <td>{l s='Entity' mod='payulatam'}</td> <td>{$lapPaymentMethod|escape:'htmlall':'UTF-8'}</td> </tr> </table> <p/> <h1>{$messageApproved|escape:'htmlall':'UTF-8'}</h1> </center> {else} <h1><center>{l s='The request is incorrect! There is an error in the digital signature.' mod='payulatam'}</center></h1> {/if} {literal} <!-- Facebook Pixel Code --> <script> !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','//connect.facebook.net/en_US/fbevents.js'); fbq('init', '155791794779885'); fbq('track', "PageView"); fbq('track', 'Purchase', {value: '0.00', currency: 'COP'}); </script> <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=155791794779885&ev=PageView&noscript=1" /></noscript> <!-- End Facebook Pixel Code --> {/literal} Link to comment Share on other sites More sharing options...
yaniv14 Posted February 4, 2016 Share Posted February 4, 2016 Look for {if $valid) and {else}, this part will load if the order is approved so you should put the pixel code between {if $valid} and {else} to tell the pixel that the order is confirm. Between {else} and {/if} is when the order has failed so if you want to trigger a different pixel for unapproved orders you can place a different pixel in that area. Link to comment Share on other sites More sharing options...
cristianfpg Posted February 4, 2016 Author Share Posted February 4, 2016 see the code, i think to put a condition for $estadoTx variable {if $estadoTx == 'approved'} // conversion code approved {else} // conversion code pending or error {/if} do you think about that? Link to comment Share on other sites More sharing options...
yaniv14 Posted February 4, 2016 Share Posted February 4, 2016 You can try if you want but you won't get any conversion code for payment not approved if the variable $valid will return false from the server (php file). Because you can only place your code inside the $valid statement Link to comment Share on other sites More sharing options...
cristianfpg Posted February 23, 2016 Author Share Posted February 23, 2016 thanks for your time, solved is in the module folder outside the theme Link to comment Share on other sites More sharing options...
vekia Posted August 23, 2016 Share Posted August 23, 2016 i wrote guide about fb conversion pixel - you can read here how to add it with html box pro module, it will replace dynamic variables like value of order or currency Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now