<?php

require dirname(__FILE__) . '/../../config/config.inc.php';
require_once _PS_MODULE_DIR_ . "/tntcarrier/classes/TntWebService.php";
//$erreur = '';
global $smarty, $cookie;
$cookie->id_lang = '2';
try {
    $tntWebService = new TntWebService();
    $follow[] = $tntWebService->followPackage($_GET['code']);
} catch (SoapFault $e) {
    $erreur = $e->faultstring;
    echo $erreur;
} catch (Exception $e) {
    $erreur = "Problem : follow failed";
}
$config['date'] = '%d/%m/%y';
$config['time'] = '%I:%M %p';
//$smarty->assign('erreur', $erreur);
$smarty->assign('config', $config);
$smarty->assign('follow', $follow);
$smarty->display(dirname(__FILE__) . '/tpl/follow.tpl');
Beispiel #2
0
* to license@prestashop.com 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 <*****@*****.**>
*  @copyright  2007-2014 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*/
require dirname(__FILE__) . '/../../config/config.inc.php';
require_once _PS_MODULE_DIR_ . "/tntcarrier/classes/TntWebService.php";
global $smarty, $cookie;
$cookie->id_lang = (int) Language::getIdByIso('fr');
try {
    $tntWebService = new TntWebService();
    $follow[] = $tntWebService->followPackage(Tools::getValue('code'));
} catch (SoapFault $e) {
    $error = $e->faultstring;
    echo $error;
} catch (Exception $e) {
    $error = "Problem : follow failed";
}
$config['date'] = '%d/%m/%y';
$config['time'] = '%I:%M %p';
$smarty->assign('config', $config);
$smarty->assign('follow', $follow);
$smarty->display(dirname(__FILE__) . '/tpl/follow.tpl');