Guest Posted January 22, 2013 Share Posted January 22, 2013 (edited) hi, i implement lyoness track code into prestashop 1.3 into file order-configuration.php in root and this works very well, on 100%,lyoness write me its okay. BUT NOW I TEST IMPLEMENT SAME TRACK CODE INTO MY SECOND ESHOP ON PRESTASHOP 1.5 and i have problem. in presta 1.5 when i add trackcode into root in file order-configuration.php lyoness write me -> not work so i copy backup this file orcer-configuration.php in root and i add trackcode into controllers\front\OrderConfirmationController.php but on this send me lyoness email that shows fatal error. Please anyone where is in prestashop 1.5 (1.5.2.0) same file for information as in presta 1.3 in root order-configuration.php? Thanks for reply. Edited January 22, 2013 by PepeCZ (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted January 22, 2013 Share Posted January 22, 2013 (edited) in prestashop i copy lyoness trackcode into website root in file order configuration.php and this php file have this: <?php /* SSL Management */ $useSSL = true; include(dirname(__FILE__).'/config/config.inc.php'); include(dirname(__FILE__).'/header.php'); $id_cart = intval(Tools::getValue('id_cart', 0)); $id_module = intval(Tools::getValue('id_module', 0)); $id_order = Order::getOrderByCartId(intval($id_cart)); $secure_key = Tools::getValue('key', false); if (!$id_order OR !$id_module OR !$secure_key OR empty($secure_key)) Tools::redirect('history.php'.(Tools::isSubmit('slowvalidation') ? '?slowvalidation' : '')); $order = new Order(intval($id_order)); if (!Validate::isLoadedObject($order) OR $order->id_customer != $cookie->id_customer OR $secure_key != $order->secure_key) Tools::redirect('history.php'); $module = Module::getInstanceById(intval($id_module)); if ($order->payment != $module->displayName) Tools::redirect('history.php'); $smarty->assign(array( 'HOOK_ORDER_CONFIRMATION' => Hook::orderConfirmation(intval($id_order)), 'HOOK_PAYMENT_RETURN' => Hook::paymentReturn(intval($id_order), intval($id_module)))); ?> and this works, lyoness write me that all is okay. but in presta 1.5 same file in root order-configuration.php have only this: <?php /* * 2007-2012 PrestaShop * * 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 PrestaShop SA <[email protected]> * @copyright 2007-2012 PrestaShop SA * @version Release: $Revision: 7104 $ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ /** * This file will be removed in 1.6 * You have to use index.php?controller=page_name instead of this page * * @deprecated 1.5.0 */ require(dirname(__FILE__).'/config/config.inc.php'); Tools::displayFileAsDeprecated(); Tools::redirect('index.php?controller=order-confirmation'.($_REQUEST ? '&'.http_build_query($_REQUEST, '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); and when I add/copy lyoness trackcode on the end of this file so lyoness wrote off that it does not work. PLEASE ANYONE HELP ME WITH THIS. Edited January 22, 2013 by PepeCZ (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted January 22, 2013 Share Posted January 22, 2013 otherwise lyoness trackcode looks like this: this code I put/copy into file in root prestashop 1.3 "order-coniguration.php" on end this php. and works it. <?php // Your organization ID // $organization = "xxxxxxx"; <-this is your unique number // Your checksum code // $checksumCode = "xxxxxxx"; <-this is your unique number // Value of the sale. // Leave as "0.00" if not applicable. // // cena jen za produkt, bez dph, bez postoveho a balneho: "$order->total_products" // cena bez dph, ale s postovným a balnym: "$order->total_products_wt" // cena s dph, a s postovnym a balnym: "$order->total_paid_real" // $orderValue = "$order->total_products"; // Currency of the sale. / // Leave as "EUR" if not applicable. // $currency = "EUR"; // Event ID // $event = "xxxxxxx"; <-this is your unique number // Event type: // true = Sale // false = Lead // $isSale = true; // Encrypted connection on this page: // true = Yes (https) // false = No (http) // $isSecure = false; // Here you must specify a unique identifier for the transaction. // For a sale, this is typically the order number. // $orderNumber = "$id_order"; // If you do not use the built-in session functionality in PHP, modify // the following expressions to work with your session handling routines. // $tduid = ""; if (!empty($_SESSION["TRADEDOUBLER"])) $tduid = $_SESSION["TRADEDOUBLER"]; // OPTIONAL: You may transmit a list of items ordered in the reportInfo // parameter. See the chapter reportInfo for details. // $reportInfo = ""; $reportInfo = urlencode($reportInfo); /***** IMPORTANT: *****/ /***** In most cases, you should not edit anything below this line. *****/ /***** Please consult with TradeDoubler before modifying the code. *****/ if (!empty($_COOKIE["TRADEDOUBLER"])) $tduid = $_COOKIE["TRADEDOUBLER"]; if ($isSale) { $domain = "tbs.tradedoubler.com"; $checkNumberName = "orderNumber"; } else { $domain = "tbl.tradedoubler.com"; $checkNumberName = "leadNumber"; $orderValue = "1"; } $checksum = "v04" . md5($checksumCode . $orderNumber . $orderValue); if ($isSecure) $scheme = "https"; else $scheme = "http"; $trackBackUrl = $scheme . "://" . $domain . "/report" . "?organization=" . $organization . "&event=" . $event . "&" . $checkNumberName . "=" . $orderNumber . "&checksum=" . $checksum . "&tduid=" . $tduid . "&reportInfo=" . $reportInfo; if ($isSale) { $trackBackUrl .= "&orderValue=" .$orderValue .= "¤cy=" .$currency; } echo "<img src=\"" . $trackBackUrl . "\" alt=\"\" style=\"border: none\" />"; ?> Link to comment Share on other sites More sharing options...
cjrent Posted September 23, 2014 Share Posted September 23, 2014 Were you able to figure this out? I am too looking into using Lyoness Thank you Link to comment Share on other sites More sharing options...
Recommended Posts