// Merge -> 10309
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10333 b9a71923-0436-4b27-9f14-aed3839534dd
|
After Width: | Height: | Size: 9.7 KiB |
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
class OrderInfoTnt
|
||||
{
|
||||
private $_idOrder;
|
||||
|
||||
public function __construct($id_order)
|
||||
{
|
||||
$this->_idOrder = $id_order;
|
||||
}
|
||||
|
||||
public function getInfo()
|
||||
{
|
||||
$info = Db::getInstance()->ExecuteS('SELECT o.shipping_number, a.lastname, a.firstname, a.address1, a.address2, a.postcode, a.city, a.phone, c.email, c.id_customer, a.company
|
||||
FROM `'._DB_PREFIX_.'orders` as o, `'._DB_PREFIX_.'address` as a, `'._DB_PREFIX_.'customer` as c
|
||||
WHERE o.id_order = "'.$this->_idOrder.'" AND a.id_address = o.id_address_delivery AND c.id_customer = o.id_customer');
|
||||
if (!$info)
|
||||
return false;
|
||||
$weight = Db::getInstance()->ExecuteS('SELECT p.weight, o.product_quantity
|
||||
FROM `'._DB_PREFIX_.'order_detail` as o, `'._DB_PREFIX_.'product` as p
|
||||
WHERE o.id_order = "'.$this->_idOrder.'" AND p.id_product = o.product_id');
|
||||
$option = Db::getInstance()->ExecuteS('SELECT t.option
|
||||
FROM `'._DB_PREFIX_.'tnt_carrier_option` as t , `'._DB_PREFIX_.'orders` as o
|
||||
WHERE t.id_carrier = o.id_carrier AND o.id_order = "'.$this->_idOrder.'"');
|
||||
if ($option != null && strpos($option[0]['option'], "D") !== false)
|
||||
$dropOff = Db::getInstance()->ExecuteS('SELECT d.code, d.name, d.address, d.zipcode, d.city
|
||||
FROM `'._DB_PREFIX_.'tnt_carrier_drop_off` as d , `'._DB_PREFIX_.'orders` as o
|
||||
WHERE d.id_cart = o.id_cart AND o.id_order = "'.$this->_idOrder.'"');
|
||||
$w = 0;
|
||||
$tooBig = false;
|
||||
foreach ($weight as $key => $val)
|
||||
{
|
||||
while ($val['product_quantity'] > 0)
|
||||
{
|
||||
if ((int)($val['weight']) > 20)
|
||||
return "Un ou plusieurs articles sont supérieurs à 20 Kg<br/>Vous devez contacter votre commercial TNT";
|
||||
if ($w + $val['weight'] > 20)
|
||||
{
|
||||
$info[1]['weight'][] = (string)($w);
|
||||
$w = $val['weight'];
|
||||
}
|
||||
else
|
||||
$w += $val['weight'];
|
||||
$val['product_quantity']--;
|
||||
}
|
||||
}
|
||||
$info[1]['weight'][] = (string)($w);
|
||||
|
||||
if (date("N") == 5)
|
||||
$next_day = date("Y-m-d", mktime(0, 0, 0, date("m") , date("d")+3, date("Y")));
|
||||
elseif (date("N") == 6)
|
||||
$next_day = date("Y-m-d", mktime(0, 0, 0, date("m") , date("d")+2, date("Y")));
|
||||
else
|
||||
$next_day = date("Y-m-d", mktime(0, 0, 0, date("m") , date("d")+1, date("Y")));
|
||||
$newDate = Tools::getValue('dateErrorOrder');
|
||||
$info[2] = array('delivery_date' => ($newDate != '' ? $newDate : $next_day));
|
||||
if ($option)
|
||||
$info[3] = array('option' => $option[0]['option']);
|
||||
if (isset($dropOff))
|
||||
$info[4] = $dropOff[0];
|
||||
else
|
||||
$info[4] = null;
|
||||
return $info;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
class PackageTnt
|
||||
{
|
||||
private $_idOrder;
|
||||
private $_order;
|
||||
|
||||
public function __construct($id_order)
|
||||
{
|
||||
$this->_idOrder = $id_order;
|
||||
$this->_order = new Order((int)($this->_idOrder));
|
||||
}
|
||||
|
||||
public function setShippingNumber($number)
|
||||
{
|
||||
if ($this->_order->shipping_number == '')
|
||||
{
|
||||
$this->_order->shipping_number = $number;
|
||||
$this->_order->update();
|
||||
}
|
||||
$this->insertSql($number);
|
||||
}
|
||||
|
||||
public function getShippingNumber()
|
||||
{
|
||||
$tab = Db::getInstance()->ExecuteS('SELECT `shipping_number` FROM `'._DB_PREFIX_.'tnt_carrier_shipping_number` WHERE `id_order` = "'.(int)($this->_idOrder).'"');
|
||||
return ($tab);
|
||||
}
|
||||
|
||||
public function insertSql($number)
|
||||
{
|
||||
Db::getInstance()->ExecuteS('INSERT INTO `'._DB_PREFIX_.'tnt_carrier_shipping_number` (`id_order`, `shipping_number`)
|
||||
VALUES ("'.(int)($this->_idOrder).'", "'.$number.'")');
|
||||
}
|
||||
|
||||
public function getOrder()
|
||||
{
|
||||
return ($this->_order);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,238 @@
|
||||
<?php
|
||||
class TntWebService
|
||||
{
|
||||
private $_login;
|
||||
private $_password;
|
||||
private $_account;
|
||||
private $authheader;
|
||||
private $authvars;
|
||||
private $header;
|
||||
private $file;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->_login = Configuration::get('TNT_CARRIER_LOGIN');
|
||||
$this->_password = Configuration::get('TNT_CARRIER_PASSWORD');
|
||||
$this->_account = Configuration::get('TNT_CARRIER_NUMBER_ACCOUNT');
|
||||
|
||||
$this->_authheader = $this->genAuth();
|
||||
$this->_authvars = new SoapVar($this->_authheader, XSD_ANYXML);
|
||||
$this->_header = new SoapHeader("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "Security", $this->_authvars);
|
||||
$this->_file = "http://www.tnt.fr/service/?wsdl";
|
||||
}
|
||||
|
||||
public function genAuth()
|
||||
{
|
||||
return sprintf('
|
||||
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
|
||||
<wsse:UsernameToken>
|
||||
<wsse:Username>%s</wsse:Username>
|
||||
<wsse:Password>%s</wsse:Password>
|
||||
</wsse:UsernameToken>
|
||||
</wsse:Security>', htmlspecialchars($this->_login), htmlspecialchars($this->_password));
|
||||
}
|
||||
|
||||
public function faisabilite($dateExpedition, $codePostalDepart, $communeDepart, $codePostalArrivee, $communeArrivee, $typeDestinataire)
|
||||
{
|
||||
$soapclient = new SoapClient($this->_file, array('trace'=>1));
|
||||
$soapclient->__setSOAPHeaders(array($this->_header));
|
||||
|
||||
$sender = array("zipCode" => $codePostalDepart, "city" => $communeDepart);
|
||||
$receiver = array("zipCode" => $codePostalArrivee, "city" => $communeArrivee, "type" => $typeDestinataire);
|
||||
$parameters = array("accountNumber" => $this->_account, "shippingDate" => $dateExpedition, "sender" => $sender, "receiver" => $receiver);
|
||||
$services = $soapclient->feasibility(array('parameters' => $parameters));
|
||||
return ($services);
|
||||
}
|
||||
|
||||
public function putCityInNormeTnt($city)
|
||||
{
|
||||
$city = iconv("utf-8", 'ASCII//TRANSLIT', $city);
|
||||
$city = mb_strtoupper($city, 'utf-8');
|
||||
$table = array('`' => '','\''=> '', '^' => '','À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',
|
||||
'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O',
|
||||
'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B');
|
||||
$city = strtr($city, $table);
|
||||
$old = array("SAINT", "-");
|
||||
$new = array("ST", " ");
|
||||
return (str_replace($old, $new, $city));
|
||||
}
|
||||
|
||||
public function getPackage($info)
|
||||
{
|
||||
$soapclient = new SoapClient($this->_file, array('trace'=>1));
|
||||
$soapclient->__setSOAPHeaders(array($this->_header));
|
||||
|
||||
$sender = array(
|
||||
'type' => (Configuration::get('TNT_CARRIER_SHIPPING_COLLECT') ? "ENTERPRISE" : "DEPOT"), //ENTREPRISE OR DEPOT
|
||||
'typeId' => (Configuration::get('TNT_CARRIER_SHIPPING_COLLECT') ? "" : Configuration::get('TNT_CARRIER_SHIPPING_PEX')) , // code PEX if DEPOT is ON
|
||||
'name' => Configuration::get('TNT_CARRIER_SHIPPING_COMPANY'), // raison social
|
||||
'address1' => Configuration::get('TNT_CARRIER_SHIPPING_ADDRESS1'),
|
||||
'address2' => Configuration::get('TNT_CARRIER_SHIPPING_ADDRESS2'),
|
||||
'zipCode' => Configuration::get('TNT_CARRIER_SHIPPING_ZIPCODE'),
|
||||
'city' => $this->putCityInNormeTnt(Configuration::get('TNT_CARRIER_SHIPPING_CITY')),
|
||||
'contactLastName' => Configuration::get('TNT_CARRIER_SHIPPING_LASTNAME'),
|
||||
'contactFirstName' => Configuration::get('TNT_CARRIER_SHIPPING_FIRSTNAME'),
|
||||
'emailAddress' => Configuration::get('TNT_CARRIER_SHIPPING_EMAIL'),
|
||||
'phoneNumber' => Configuration::get('TNT_CARRIER_SHIPPING_PHONE'),
|
||||
'faxNumber' => '' //may be later
|
||||
);
|
||||
|
||||
if ($info[4] == null)
|
||||
$receiver = array(
|
||||
'type' => ($info[0]['company'] != '' ? "ENTERPRISE" : 'INDIVIDUAL'), // ENTREPRISE DEPOT DROPOFFPOINT INDIVIDUAL
|
||||
'typeId' => '', // IF DEPOT => code PEX else if DROPOFFPOINT => XETT
|
||||
'name' => ($info[0]['company'] != '' ? $info[0]['company'] : ''),
|
||||
'address1' => $info[0]['address1'],
|
||||
'address2' => $info[0]['address2'],
|
||||
'zipCode' => $info[0]['postcode'],
|
||||
'city' => $this->putCityInNormeTnt($info[0]['city']),
|
||||
'instructions' => '',
|
||||
'contactLastName' => $info[0]['lastname'],
|
||||
'contactFirstName' => $info[0]['firstname'],
|
||||
'emailAddress' => $info[0]['email'],
|
||||
'phoneNumber' => $info[0]['phone'],
|
||||
'accessCode' => '',
|
||||
'floorNumber' => '',
|
||||
'buildingId' => '',
|
||||
'sendNotification' => ''
|
||||
);
|
||||
else
|
||||
$receiver = array(
|
||||
'type' => 'DROPOFFPOINT', // ENTREPRISE DEPOT DROPOFFPOINT INDIVIDUAL
|
||||
'typeId' => $info[4]['code'], // IF DEPOT => code PEX else if DROPOFFPOINT => XETT
|
||||
'name' => $info[4]['name'],
|
||||
'address1' => $info[4]['address'],
|
||||
'address2' => '',
|
||||
'zipCode' => $info[4]['zipcode'],
|
||||
'city' => $info[4]['city'],
|
||||
'instructions' => '',
|
||||
'contactLastName' => $info[0]['lastname'],
|
||||
'contactFirstName' => $info[0]['firstname'],
|
||||
'emailAddress' => $info[0]['email'],
|
||||
'phoneNumber' => $info[0]['phone'],
|
||||
'accessCode' => '',
|
||||
'floorNumber' => '',
|
||||
'buildingId' => '',
|
||||
'sendNotification' => ''
|
||||
);
|
||||
|
||||
foreach ($info[1]['weight'] as $k => $v)
|
||||
{
|
||||
$parcelRequest[$k] = array(
|
||||
'sequenceNumber' => $k + 1, // package number, there's only one at this moment
|
||||
'customerReference' => $info[0]['id_customer'], // customer ref
|
||||
'weight' => $v,
|
||||
'insuranceAmount' => '',
|
||||
'priorityGuarantee' => '',
|
||||
'comment' => ''
|
||||
);
|
||||
}
|
||||
|
||||
$parcelsRequest = array('parcelRequest' => $parcelRequest);
|
||||
|
||||
$pickUpRequest = array(
|
||||
'media' => "EMAIL",
|
||||
'faxNumber' => "",
|
||||
'emailAddress' => Configuration::get('TNT_CARRIER_SHIPPING_EMAIL'),
|
||||
'notifySuccess' => "1",
|
||||
'service' => "",
|
||||
'lastName' => "",
|
||||
'firstName' => "",
|
||||
'phoneNumber' => Configuration::get('TNT_CARRIER_SHIPPING_PHONE'),
|
||||
'closingTime' => Configuration::get('TNT_CARRIER_SHIPPING_CLOSING'),
|
||||
'instructions' => ""
|
||||
);
|
||||
|
||||
if (Configuration::get('TNT_CARRIER_SHIPPING_COLLECT') == 1)
|
||||
{
|
||||
$paremeters = array(
|
||||
'pickUpRequest' => $pickUpRequest,
|
||||
'shippingDate' => $info[2]['delivery_date'],
|
||||
'accountNumber' => Configuration::get('TNT_CARRIER_NUMBER_ACCOUNT'),
|
||||
'sender' => $sender,
|
||||
'receiver' => $receiver,
|
||||
'serviceCode' => $info[3]['option'],
|
||||
'quantity' => count($info[1]['weight']), //number of package; count($parcelsRequest)
|
||||
'parcelsRequest' => $parcelsRequest,
|
||||
'saturdayDelivery' => '0',//Configuration::get('TNT_CARRIER_SHIPPING_DELIVERY'),
|
||||
//'paybackInfo' => $paybackInfo,
|
||||
'labelFormat' => (!Configuration::get('TNT_CARRIER_PRINT_STICKER') ? "STDA4" : Configuration::get('TNT_CARRIER_PRINT_STICKER'))
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$paremeters = array(
|
||||
'shippingDate' => $info[2]['delivery_date'],
|
||||
'accountNumber' => Configuration::get('TNT_CARRIER_NUMBER_ACCOUNT'),
|
||||
'sender' => $sender,
|
||||
'receiver' => $receiver,
|
||||
'serviceCode' => $info[3]['option'],
|
||||
'quantity' => count($info[1]['weight']), //number of package; count($parcelsRequest)
|
||||
'parcelsRequest' => $parcelsRequest,
|
||||
'saturdayDelivery' => '0',//Configuration::get('TNT_CARRIER_SHIPPING_DELIVERY'),
|
||||
//'paybackInfo' => $paybackInfo,
|
||||
'labelFormat' => (!Configuration::get('TNT_CARRIER_PRINT_STICKER') ? "STDA4" : Configuration::get('TNT_CARRIER_PRINT_STICKER'))
|
||||
);
|
||||
}
|
||||
$package = $soapclient->expeditionCreation(array('parameters' => $paremeters));
|
||||
return $package;
|
||||
}
|
||||
|
||||
public function followPackage($transport)
|
||||
{
|
||||
$soapclient = new SoapClient($this->_file, array('trace'=>1));
|
||||
$soapclient->__setSOAPHeaders(array($this->_header));
|
||||
|
||||
$reponse = $soapclient->trackingByConsignment(array('parcelNumber' => $transport));
|
||||
|
||||
if (isset($reponse->Parcel) && $reponse->Parcel)
|
||||
{
|
||||
$colis = $reponse->Parcel;
|
||||
$expediteur = $colis->sender;
|
||||
$destinataire = $colis->receiver;
|
||||
$evenements = $colis->events;
|
||||
|
||||
$requestDate = new DateTime($evenements->requestDate);
|
||||
$processDate = new DateTime($evenements->processDate);
|
||||
$arrivalDate = new DateTime($evenements->arrivalDate);
|
||||
$deliveryDepartureDate = new DateTime($evenements->deliveryDepartureDate);
|
||||
$deliveryDate = new DateTime($evenements->deliveryDate);
|
||||
}
|
||||
|
||||
$packageParam = array(
|
||||
'number' => (isset($colis->consignmentNumber) ? $colis->consignmentNumber : ''),
|
||||
'status' => (isset($colis->shortStatus) ? $colis->shortStatus : ''),
|
||||
'account_number' => (isset($colis->accountNumber) ? $colis->accountNumber : ''),
|
||||
'service' => (isset($colis->service) ? $colis->service : ''),
|
||||
'reference' => (isset($colis->reference) ? $colis->reference : ''),
|
||||
'weight' => (isset($colis->weight) ? $colis->weight : ''),
|
||||
'expediteur_name' => (isset($expediteur->name) ? $expediteur->name : ''),
|
||||
'expediteur_addr1' => (isset($expediteur->address1) ? $expediteur->address1 : ''),
|
||||
'expediteur_addr2' => (isset($expediteur->address2) ? $expediteur->address2 : ''),
|
||||
'expediteur_zipcode' => (isset($expediteur->zipCode) ? $expediteur->zipCode : ''),
|
||||
'expediteur_city' => (isset($expediteur->city) ? $expediteur->city : ''),
|
||||
'destinataire_name' => (isset($destinataire->name) ? $destinataire->name : ''),
|
||||
'destinataire_addr1' => (isset($destinataire->address1) ? $destinataire->address1 : ''),
|
||||
'destinataire_addr2' => (isset($destinataire->address2) ? $destinataire->address2 : ''),
|
||||
'destinataire_zipcode' => (isset($destinataire->zipCode) ? $destinataire->zipCode : ''),
|
||||
'destinataire_city' => (isset($destinataire->city) ? $destinataire->city : ''),
|
||||
'request' => (isset($evenements->requestDate) ? $evenements->requestDate : ''),
|
||||
'requestDate' => (isset($requestDate) && isset($evenements->requestDate) ? $requestDate : ''),
|
||||
'process' => (isset($evenements->processDate) ? $evenements->processDate : ''),
|
||||
'process_date' => (isset($processDate) && isset($evenements->processDate) ? $processDate : ''),
|
||||
'process_center' => (isset($evenements->processCenter) ? $evenements->processCenter : ''),
|
||||
'arrival' => (isset($evenements->arrivalDepartureDate) ? $evenements->arrivalDepartureDate : ''),
|
||||
'arrival_date' => (isset($arrivalDate) ? $arrivalDate : ''),
|
||||
'arrival_center' => (isset($evenements->arrivalCenter) ? $evenements->arrivalCenter : ''),
|
||||
'delivery_departure' => (isset($evenements->deliveryDepartureDate) ? $evenements->deliveryDepartureDate : ''),
|
||||
'delivery_departure_date' => (isset($deliveryDepartureDate) ? $deliveryDepartureDate : ''),
|
||||
'delivery_departure_center' => (isset($evenements->deliveryDepartureCenter) ? $evenements->deliveryDepartureCenter : ''),
|
||||
'delivery' => (isset($evenements->deliveryDate) ? $evenements->deliveryDate : ''),
|
||||
'delivery_date' => (isset($deliveryDate) ? $deliveryDate : ''),
|
||||
'long_status' => (isset($colis->longStatus) ? $colis->longStatus : ''),
|
||||
'linkPicture' => (isset($colis->primaryPODUrl) ? $colis->primaryPODUrl : '')
|
||||
);
|
||||
return $packageParam;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 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/afl-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 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 <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 6594 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../../../");
|
||||
exit;
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
class serviceCache
|
||||
{
|
||||
private $_dateBefore;
|
||||
private $_dateNow;
|
||||
private $_idCard;
|
||||
private $_zipCode;
|
||||
|
||||
public function __construct($id_card, $zipcode)
|
||||
{
|
||||
$this->_dateBefore = date("Y-m-d H:i:s", mktime(date("H"), date("i") - 15, date("s"), date("m") , date("d"), date("Y")));
|
||||
$this->_dateNow = date('Y-m-d H:i:s');
|
||||
$this->_idCard = $id_card;
|
||||
$this->_zipCode = $zipcode;
|
||||
}
|
||||
|
||||
public function getFaisabilityAtThisTime()
|
||||
{
|
||||
if (Db::getInstance()->getValue('SELECT * FROM `'._DB_PREFIX_.'tnt_carrier_cache_service` WHERE `date` >= "'.$this->_dateBefore.'" AND `date` <= "'.$this->_dateNow.'" AND id_card = "'.(int)($this->_idCard).'" AND zipcode = "'.$this->_zipCode.'"'))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public function deletePreviousServices()
|
||||
{
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'tnt_carrier_cache_service` WHERE `id_card` = "'.(int)($this->_idCard).'"');
|
||||
}
|
||||
|
||||
public static function deleteServices($idCard)
|
||||
{
|
||||
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'tnt_carrier_cache_service` WHERE `id_card` = "'.(int)($idCard).'"');
|
||||
}
|
||||
|
||||
public function putInCache($service, $serviceRelais)
|
||||
{
|
||||
if (isset($service))
|
||||
{
|
||||
if (is_array($service->Service))
|
||||
foreach ($service->Service as $k => $v)
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'tnt_carrier_cache_service` (`id_card`, `code`, `date`, `zipcode`) VALUES ("'.(int)($this->_idCard).'", "'.$v->serviceCode.'","'.$this->_dateNow.'", "'.$this->_zipCode.'")');
|
||||
else
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'tnt_carrier_cache_service` (`id_card`, `code`, `date`, `zipcode`) VALUES ("'.(int)($this->_idCard).'", "'.$service->Service->serviceCode.'","'.$this->_dateNow.'", "'.$this->_zipCode.'")');
|
||||
}
|
||||
if (isset($serviceRelais))
|
||||
{
|
||||
foreach ($serviceRelais as $v)
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'tnt_carrier_cache_service` (`id_card`, `code`, `date`, `zipcode`) VALUES ("'.(int)($this->_idCard).'", "'.$v->serviceCode.'","'.$this->_dateNow.'", "'.$this->_zipCode.'")');
|
||||
}
|
||||
}
|
||||
|
||||
public function getServices()
|
||||
{
|
||||
return (Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'tnt_carrier_cache_service` WHERE id_card = "'.(int)($this->_idCard).'"'));
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>tntcarrier</name>
|
||||
<displayName><![CDATA[TNT Express]]></displayName>
|
||||
<version><![CDATA[1.0]]></version>
|
||||
<description><![CDATA[Offer your customers, different delivery methods with TNT]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[shipping_logistics]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>1</need_instance>
|
||||
<limited_countries>fr</limited_countries>
|
||||
</module>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 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/afl-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 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 <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 6594 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../../../");
|
||||
exit;
|
||||
@@ -0,0 +1,371 @@
|
||||
.tntRCHeader {
|
||||
background-color: #ffffff;
|
||||
background-image: url(../img/logo_24_relaiscolis.jpg);
|
||||
background-position: 10px center;
|
||||
background-repeat: no-repeat;
|
||||
border-color: gray;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
color: #a0a0a0;
|
||||
display: bloc;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 30pt;
|
||||
font-style: italic;
|
||||
height: 75px;
|
||||
padding-right: 10px;
|
||||
padding-top: 25px;
|
||||
text-align: right;
|
||||
width: 490px;
|
||||
}
|
||||
|
||||
#tntRCdetailRelaisEntete .tntRCHeader
|
||||
{
|
||||
width:590px;
|
||||
}
|
||||
|
||||
.tntRCSubHeader {
|
||||
background-color: #ffffff;
|
||||
border-width: 0px;
|
||||
color: #a0a0a0;
|
||||
display: bloc;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 16pt;
|
||||
font-weight: bold;
|
||||
padding-bottom: 3px;
|
||||
padding-top: 3px;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
.tntRCBody {
|
||||
background-color: #ffffff;
|
||||
border-color: gray;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
color: #000000;
|
||||
display: bloc;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 12pt;
|
||||
padding-bottom: 10px;
|
||||
padding-left: 10px;
|
||||
padding-top: 10px;
|
||||
width: 490px;
|
||||
}
|
||||
|
||||
.tntRCBodySearch {
|
||||
background-color: #ffffff;
|
||||
border-color: gray;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
color: #a0a0a0;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 10pt;
|
||||
font-weight: bold;
|
||||
padding-left: 3px;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
width: 497px;
|
||||
}
|
||||
|
||||
.tntRCError {
|
||||
background-color: #ff6600;
|
||||
color: #ffffff;
|
||||
display: bloc;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 12pt;
|
||||
font-weight: bold;
|
||||
width: 480px;
|
||||
}
|
||||
|
||||
.tntRCGray {
|
||||
background-color: #a0a0a0;
|
||||
border-width: 0px;
|
||||
display: bloc;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 10pt;
|
||||
heigth: 12px;
|
||||
width: 480px;
|
||||
}
|
||||
|
||||
.tntRCInput {
|
||||
background-color: #ffffff;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 10pt;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.tntRCWhite {
|
||||
background-color: #ffffff;
|
||||
border-width: 0px;
|
||||
display: bloc;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 14pt;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
.tntRCrelaisColis {
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 10px;
|
||||
color: #000000;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #a0a0a0;
|
||||
border-bottom-width: 1px;
|
||||
background-color: #ffffff;
|
||||
padding-bottom: 3px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.tntRCtitreMode {
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 28px;
|
||||
color: #a0a0a0;
|
||||
font-style: italic;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.tntRCchoix {
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 14px;
|
||||
color: #a0a0a0;
|
||||
font-weight: bold;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.tntRCdetailGros {
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 14pt;
|
||||
color: #a0a0a0;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.tntRCnoirPetit {
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 12pt;
|
||||
color: #000000;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.tntRCdetailPetit {
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 12pt;
|
||||
color: #a0a0a0;
|
||||
background-color: #ffffff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tntRCentree {
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 12pt;
|
||||
color: #000000;
|
||||
background-color: #ffffff;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.tntRCgris {
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 10pt;
|
||||
color: #ffffff;
|
||||
background-color: #a0a0a0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table.tntRCHoraire td {
|
||||
border: 1px solid gray;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 10pt;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.tntRCHoraireJour{
|
||||
color: #a0a0a0;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
height: 36px;
|
||||
width: 79px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tntRCHoraireHeure {
|
||||
color: #000000;
|
||||
padding-left: 10px;
|
||||
width: 84px;
|
||||
}
|
||||
|
||||
.tntRCblanc {
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 12px;
|
||||
color: #000000;
|
||||
background-color: #ffffff;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
.tntRCblancpetit {
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 12px;
|
||||
color: #000000;
|
||||
background-color: #ffffff;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
.tntRCfermeture {
|
||||
padding-left: 585px;
|
||||
}
|
||||
|
||||
.tntRCBack2Communes {
|
||||
background-color: #ffffff;
|
||||
color: #a0a0a0;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-style: italic;
|
||||
font-size: 11pt;
|
||||
font-weight: bold;
|
||||
padding-top: 18px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tntRCBack2Communes a {
|
||||
color: #a0a0a0;
|
||||
text-decoration: none;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.tntRCBack2Communes a img{
|
||||
border: 0;
|
||||
padding-right: 5px;
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
.tntRCBoutonLoupe {
|
||||
background-color: #ffffff;
|
||||
border: 0px;
|
||||
color: #000000;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-size: 12px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 3px;
|
||||
text-decoration: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.jqmWindow {
|
||||
background-color: #FFF;
|
||||
border: 1px solid black;
|
||||
color: #333;
|
||||
display: none;
|
||||
padding: 12px;
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
margin-left: -300px;
|
||||
margin-top: -240px;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
div.tntRCfermeture .jqmClose em{display:none;}
|
||||
div.tntRCfermeture .jqmClose {
|
||||
background: transparent url(../modules/tntcarrier/img/close_icon_double.png) 0 0 no-repeat;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
div.tntRCfermeture a.jqmClose:hover{ background-position: 0 -20px; }
|
||||
|
||||
.jqmOverlay {
|
||||
background-color: #000;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
* html .jqmWindow {
|
||||
position: absolute;
|
||||
top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + 'px');
|
||||
}
|
||||
|
||||
img.tntRCButton {
|
||||
border: 0px;
|
||||
vertical-align: middle;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
sup.tntRCSup {
|
||||
|
||||
}
|
||||
|
||||
table.horairesRC td {
|
||||
width : 100%;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
table.horairesRCPopup {
|
||||
width : 100%;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
table.horairesRCPopup tr.selected td {
|
||||
background-color: #eeeeee;
|
||||
color: #ff6600;
|
||||
}
|
||||
|
||||
td.horaireRCPopup {
|
||||
width : 60%;
|
||||
}
|
||||
|
||||
td.horairesRCJourPopup {
|
||||
width : 40%;
|
||||
font-weight: bold;
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
td.horairesRCJour {
|
||||
font-weight: bold;
|
||||
color: #808080;
|
||||
}
|
||||
table.horairesRC tr.selected td {
|
||||
background-color: #eeeeee;
|
||||
color: #ff6600;
|
||||
}
|
||||
|
||||
div.ag {
|
||||
background-image: url(/img/google/agenceTnt.png);
|
||||
background-repeat: no-repeat;
|
||||
padding-left:60px;
|
||||
}
|
||||
|
||||
div.rc {
|
||||
background-image: url(/img/google/relaisColis.png);
|
||||
background-repeat: no-repeat;
|
||||
padding-left:50px;
|
||||
}
|
||||
|
||||
|
||||
#googleMapTnt .lien_reset {
|
||||
color : #ff6600;
|
||||
font-family: arial,helvetica,sans-serif;
|
||||
font-weight: bold;
|
||||
font-size : 15px;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
#googleMapTnt a {
|
||||
color: #f60;
|
||||
outline-color: #f60 !important;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#googleMapTnt a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#googleMapTnt .exemplePresentation {
|
||||
display: inline;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#tntB2CRelaisColis {
|
||||
width: 610px;
|
||||
}
|
||||
|
||||
.detailRelais
|
||||
{
|
||||
background: url("../img/ui-dialog/fcfdfd_40x100_textures_06_inset_hard_100.png") repeat-x scroll 0 bottom #FCFDFD;
|
||||
height:400px;
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
/*
|
||||
* jQuery UI screen structure and presentation
|
||||
* This CSS file was generated by ThemeRoller, a Filament Group Project for jQuery UI
|
||||
* Author: Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com
|
||||
* Visit ThemeRoller.com
|
||||
*/
|
||||
|
||||
/*
|
||||
* Note: If your ThemeRoller settings have a font size set in ems, your components will scale according to their parent element's font size.
|
||||
* As a rule of thumb, set your body's font size to 62.5% to make 1em = 10px.
|
||||
* body {font-size: 62.5%;}
|
||||
*/
|
||||
|
||||
|
||||
/*dialog*/
|
||||
#googleMapTnt .ui-dialog {
|
||||
/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
|
||||
font-family: Lucida Grande, Lucida Sans, Arial, sans-serif;
|
||||
font-size: 11px;
|
||||
background: #fcfdfd url(../img/ui-dialog/fcfdfd_40x100_textures_06_inset_hard_100.png) 0 bottom repeat-x;
|
||||
color: #222222;
|
||||
border: 3px solid #808080;
|
||||
position: relative;
|
||||
}
|
||||
#googleMapTnt .ui-resizable-handle {
|
||||
position: absolute;
|
||||
font-size: 0.1px;
|
||||
z-index: 99999;
|
||||
}
|
||||
#googleMapTnt .ui-resizable .ui-resizable-handle {
|
||||
display: block;
|
||||
}
|
||||
#googleMapTnt .ui-resizable-disabled .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
|
||||
#googleMapTnt .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
|
||||
#googleMapTnt .ui-resizable-n {
|
||||
cursor: n-resize;
|
||||
height: 7px;
|
||||
width: 100%;
|
||||
top: -5px;
|
||||
left: 0px;
|
||||
}
|
||||
#googleMapTnt .ui-resizable-s {
|
||||
cursor: s-resize;
|
||||
height: 7px;
|
||||
width: 100%;
|
||||
bottom: -5px;
|
||||
left: 0px;
|
||||
}
|
||||
#googleMapTnt .ui-resizable-e {
|
||||
cursor: e-resize;
|
||||
width: 7px;
|
||||
right: -5px;
|
||||
top: 0px;
|
||||
height: 100%;
|
||||
}
|
||||
#googleMapTnt .ui-resizable-w {
|
||||
cursor: w-resize;
|
||||
width: 7px;
|
||||
left: -5px;
|
||||
top: 0px;
|
||||
height: 100%;
|
||||
}
|
||||
#googleMapTnt .ui-resizable-se {
|
||||
cursor: se-resize;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
background: url(../img/ui-dialog/469bdd_11x11_icon_resize_se.gif) no-repeat 0 0;
|
||||
}
|
||||
#googleMapTnt .ui-resizable-sw {
|
||||
cursor: sw-resize;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
left: 0px;
|
||||
bottom: 0px;
|
||||
}
|
||||
#googleMapTnt .ui-resizable-nw {
|
||||
cursor: nw-resize;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
}
|
||||
#googleMapTnt .ui-resizable-ne {
|
||||
cursor: ne-resize;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
}
|
||||
#googleMapTnt .ui-dialog-titlebar {
|
||||
/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
|
||||
padding: 5px 15px 5px 10px;
|
||||
color: #2e6e9e;
|
||||
border-bottom: 1px solid #c5dbec;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
}
|
||||
#googleMapTnt .ui-dialog-title {}
|
||||
#googleMapTnt .ui-dialog-titlebar-close {
|
||||
/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
|
||||
background: url(../img/ui-dialog/6da8d5_11x11_icon_close.gif) 0 0 no-repeat;
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
top: 7px;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
z-index: 100;
|
||||
}
|
||||
#googleMapTnt .ui-dialog-titlebar-close-hover, .ui-dialog-titlebar-close:hover {
|
||||
background: url(../img/ui-dialog/217bc0_11x11_icon_close.gif) 0 0 no-repeat;
|
||||
}
|
||||
#googleMapTnt .ui-dialog-titlebar-close:active {
|
||||
background: url(../img/ui-dialog/f9bd01_11x11_icon_close.gif) 0 0 no-repeat;
|
||||
}
|
||||
#googleMapTnt .ui-dialog-titlebar-close span {
|
||||
display: none;
|
||||
}
|
||||
#googleMapTnt .ui-dialog-content {
|
||||
/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
|
||||
color: #222222;
|
||||
padding: 15px 17px;
|
||||
}
|
||||
#googleMapTnt .ui-dialog-buttonpane {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
border-top: 1px solid #a6c9e2;
|
||||
background: #fcfdfd;
|
||||
}
|
||||
#googleMapTnt .ui-dialog-buttonpane button {
|
||||
margin: 5px 0 5px 8px;
|
||||
color: #2e6e9e;
|
||||
background: #dfeffc url(../img/ui-dialog/dfeffc_40x100_textures_02_glass_85.png) 0 50% repeat-x;
|
||||
font-size: 1;
|
||||
border: 10px solid #c5dbec;
|
||||
cursor: pointer;
|
||||
padding: 2px 6px 3px 6px;
|
||||
line-height: 14px;
|
||||
}
|
||||
#googleMapTnt .ui-dialog-buttonpane button:hover {
|
||||
color: #1d5987;
|
||||
background: #d0e5f5 url(../img/ui-dialog/d0e5f5_40x100_textures_02_glass_75.png) 0 50% repeat-x;
|
||||
border: 1px solid #79b7e7;
|
||||
}
|
||||
#googleMapTnt .ui-dialog-buttonpane button:active {
|
||||
color: #e17009;
|
||||
background: #f5f8f9 url(../img/ui-dialog/f5f8f9_40x100_textures_06_inset_hard_100.png) 0 50% repeat-x;
|
||||
border: 1px solid #79b7e7;
|
||||
}
|
||||
/* This file skins dialog */
|
||||
#googleMapTnt .ui-dialog.ui-draggable .ui-dialog-titlebar,
|
||||
#googleMapTnt .ui-dialog.ui-draggable .ui-dialog-titlebar {
|
||||
cursor: move;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/*UI tabs*/
|
||||
.ui-tabs-nav {
|
||||
/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
|
||||
font-family: Lucida Grande, Lucida Sans, Arial, sans-serif;
|
||||
font-size: 10px;
|
||||
float: left;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
/*border-right: 1px solid #c5dbec;*/
|
||||
bottom: -1px;
|
||||
}
|
||||
.ui-tabs-nav ul {
|
||||
/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
|
||||
}
|
||||
|
||||
.ui-tabs-nav li {
|
||||
/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
|
||||
float: left;
|
||||
border: 1px solid #c5dbec;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.ui-tabs-nav li a {
|
||||
/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
|
||||
float: left;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
padding: .2em 1em;
|
||||
color: #2e6e9e;
|
||||
background: #dfeffc url(../img/ui-dialog/dfeffc_40x100_textures_02_glass_85.png) 0 50% repeat-x;
|
||||
}
|
||||
|
||||
.ui-tabs-nav li a:hover {
|
||||
background: #d0e5f5 url(../img/ui-dialog/d0e5f5_40x100_textures_02_glass_75.png) 0 50% repeat-x;
|
||||
color: #1d5987;
|
||||
}
|
||||
|
||||
.ui-tabs-nav li.ui-tabs-selected {
|
||||
border-bottom-color: #f5f8f9;
|
||||
}
|
||||
|
||||
.ui-tabs-nav li.ui-tabs-selected a, .ui-tabs-nav li.ui-tabs-selected a:hover {
|
||||
background: #f5f8f9 url(../img/ui-dialog/f5f8f9_40x100_textures_06_inset_hard_100.png) 0 50% repeat-x;
|
||||
color: #e17009;
|
||||
}
|
||||
|
||||
.ui-tabs-panel {
|
||||
/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; /*font-size: 100%;*/ list-style: none;
|
||||
/*font-family: Lucida Grande, Lucida Sans, Arial, sans-serif;*/
|
||||
clear:left;
|
||||
border: 1px solid #c5dbec;
|
||||
background: #fcfdfd url(../img/ui-dialog/fcfdfd_40x100_textures_06_inset_hard_100.png) 0 bottom repeat-x;
|
||||
/*color: #222222;*/
|
||||
padding: 1em 1em;
|
||||
width: 315px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.ui-tabs-hide {
|
||||
display: none;/* for accessible hiding: position: absolute; left: -99999999px*/;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
require('../../config/config.inc.php');
|
||||
require_once(_PS_MODULE_DIR_."/tntcarrier/classes/TntWebService.php");
|
||||
|
||||
global $smarty;
|
||||
|
||||
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('tpl/follow.tpl' );
|
||||
?>
|
||||
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_58ec6a48b4720ef0aa2adfded1ccf8a3'] = 'TNT Express';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_9b7637001f5d2bcb42efb4ab6b3e93da'] = 'Offre aux clients, différentes methodes de livraison';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_416900392875e9effb318da8648fbdcb'] = 'doit ou doivent etre configuré(s) pour utiliser le module correctement';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_632cae5cf3af08786414932a8e6f96a0'] = 'Pseudonyme TNT';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_3b4f51300711a1eb61770d1696702402'] = 'Mot de passe TNT';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_0e3b102c1a4938889716cea423a95001'] = 'Numéro de compte TNT';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_e81d9f25acf7fa457ab32527a882ed50'] = 'Transporteur TNT';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_d968787921c136e1cf9f766562aec8bc'] = 'Les paramètres suivants vous ont été fournis par TNT';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_af7c2efe81330e4c9089f2c90781282e'] = 'Si vous n\'êtes pas encore inscrit, cliquez sur';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_6c92285fa6d3e827b198d120ea3ac674'] = 'ici';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_8af703b2bf59cc9742883ae7f4cb0e5b'] = 'Paramètres du compte';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_927e079056c2709236d4167bbb96e799'] = 'Réglages d\'expédition';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_82fe86ee1a21af1c1db5c8c4c5e5a188'] = 'Paramètres du service';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_160f61d02d22b76b47b4305094bf36a6'] = 'Compte TNT';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_99dea78007133396a7b8ed70578ac6ae'] = 'Identifiant';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_dc647eb65e6711e155375218212b3964'] = 'Mot de passe';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_05e642d027a22d12780ccf91bf9d7d34'] = 'Numéro de compte';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_8005dfbbaf4c9333592f26e82ddfd0af'] = 'Remplissez le formulaire avec les données';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_ea9cf7e47ff33b2be14e6dd07cbcefc6'] = 'Expédition';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_4d8ff211a4a8a140e293736f92ac39d5'] = 'Aimeriez-vous que TNT ramasse votre colis ?';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_581bf6fa6cd6d4bf4b0bbe2cfe6e404c'] = 'Non (via un dépôt)';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_93cba07454f06a4a960172bbd6e2a435'] = 'Oui';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_f5234754269687df652c9f6f2f80cc10'] = 'Choisissez votre emplacement dépositaire';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_e7a7e191423e6a9ce3b59fd51ecbde87'] = 'Le code pex';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_e7b47c58815acf1d3afa59a84b5db7fb'] = 'Nom de l\'entreprise';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_8d3f5eff9c40ee315d452392bed5309b'] = 'Nom de famille';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_20db0bfeecd8fe60533206a2b5e9891a'] = 'Prénom';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_e9f79aa2b1f455a52497a126d9442582'] = 'Adresse ligne 1';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_3d4d4cac03e194ab20154382cd544e0f'] = 'Adresse ligne 2';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_d30f507473129e70c4b962ceccf175cf'] = 'Zip / Code Postal';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_d0585aac6bb77bb49423b2effca0e067'] = 'Votre ville';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_f775ad1fbb08939178d4df9c457601f2'] = 'Votre adresse email';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_67c19a5276428fb9e49c557b1a3526d5'] = 'Votre numéro de téléphone';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_6222760252f52bb4dc70835d238d5484'] = 'Votre heure de clôture';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_cf67059a7bd51c3543def1ee4bdc4fe1'] = 'Livraison le samedi';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Aucun';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_dc86b23a40568ae3ece2d3008ca61442'] = 'Format de l\'étiquette pour l\'impression (Cette étiquette doit être collée sur l\'emballage)';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_2976cd63d00184e3f0a45c1337cd31f0'] = 'Impression A4';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_2f95a5450ee306f7faca792e379ccb34'] = 'sans imprimer le logo de TNT';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_44fca4829aecbdf69a2200ea0a10a8aa'] = 'avec une impression inverse';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_a67ee8b3121d0ceb601e9f0600db9692'] = 'sans imprimer le logo TNT et avec une impression inverse';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_1c85ce46031e67c95be9aa05b859f955'] = 'Nouveau service';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_b718adec73e04ce3ec720dd11a06a308'] = 'ID';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_49ee3087348e8d44e1feda1917443987'] = 'Nom';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Description';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_ca0dbad92a874b2f69b549293387925e'] = 'Code';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_7ec0def44906b0cd2848459349eea638'] = 'Frais additionnels (€)';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_cb456215c3333db0551bd0788bc258c7'] = 'Activé';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_de95b43bceeb4b998aed4aed5cef1ae7'] = 'modifier';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_099af53f601532dbd31e0ea99ffdeb64'] = 'supprimer';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_7b9cf007806ed854cd12ab800c8a982b'] = 'Lieu';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_b06cdf3c0c75a1a58b82761f87f458e4'] = 'Etat du module transporteur TNT';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_4c7b2960da33c41e9bbea499696702ca'] = 'Le module transporteur TNT est configuré et en ligne';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_efce38300739e2fd6cef1acd9ce68a1c'] = 'Le module transporteur TNT n\'est pas encore configuré, s\'il vous plait :';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_a8341741d73ef0a3ca5e8a7facc9a738'] = 'Assurez vous d\'avoir un compte TNT';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_3dab1e2673a4acc557135ccf795d4e31'] = 'Assurez vous d\'avoir une adresse correcte d\'expedition';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_057c674e4d23b04c0cbe1bfe81a0bec1'] = 'Assurez vous que certains services sont actifs';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_9d5b24e0e3516fcef94916366fadae67'] = 'Nouvelle option Poids';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_02f6a536789c7b8399ddbd1652d85d9c'] = 'Poids Min';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_03b4258831663af9e7f48bc6bc574e6c'] = 'Poids Max';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_7dce122004969d56ae2e0245cb754d35'] = 'Modifier';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_0619bef93192e574f288fe2e55c3a7f7'] = 'Poids min';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_d8c74112ba3622be2e79d4d4dc24eaf4'] = 'Poids max';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_508ccf43328cac4c93d1de242d2ddffb'] = 'Frais additionnels';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_69d865b41dc0e6611be76776c4a9456d'] = 'Vous devez donner un nom au service';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_e71361626c48f42620b92cc81fd41ba2'] = 'Vous devez donner un code au service';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_d2f2575c30fa33e53905ae05bc02f281'] = 'Vous devez donner une description au service';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_4a015051e9e879952cf4215d344ec101'] = 'Service enregistré';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_74d87a5cbf64f95c490b2cf85710a4eb'] = 'Le(s) numéro(s) d\'expédition(s)';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_2fd7870126dd86cedc2be112e7e59ebc'] = 'L\'étiquette';
|
||||
$_MODULE['<{tntcarrier}prestashop>tntcarrier_d5aad80114d8aa47f31a6f5050ef6835'] = 'Expédition';
|
||||
$_MODULE['<{tntcarrier}prestashop>formerror_c3f15ecc6da0827a8da712cb43a0b596'] = 'information d\'expédition';
|
||||
$_MODULE['<{tntcarrier}prestashop>formerror_7f090bbab1cc7f9c08bf4e54d932d3c0'] = 'Modifier';
|
||||
$_MODULE['<{tntcarrier}prestashop>service_ca0dbad92a874b2f69b549293387925e'] = 'Code';
|
||||
$_MODULE['<{tntcarrier}prestashop>service_41350c4c9683f48b15d04adc3f76925b'] = '08h00 express';
|
||||
$_MODULE['<{tntcarrier}prestashop>service_4b0977efd9aa11417b7139f35ed777a0'] = '09h00 express';
|
||||
$_MODULE['<{tntcarrier}prestashop>service_9b75b9fc3e87626793da04f05b8388ac'] = '10:00 express';
|
||||
$_MODULE['<{tntcarrier}prestashop>service_5a3019af5fd97f13e43cb4d946b7c112'] = '12:00 express';
|
||||
$_MODULE['<{tntcarrier}prestashop>service_b144fa061545497bebee8c414efc99a9'] = 'Express';
|
||||
$_MODULE['<{tntcarrier}prestashop>service_7a93a32c1929f10098c9bc055dbe5555'] = 'Express (P)';
|
||||
$_MODULE['<{tntcarrier}prestashop>service_c24eb7cd3484f223c03e64f2728a61ae'] = 'Option code (facultatif)';
|
||||
$_MODULE['<{tntcarrier}prestashop>service_b5410e878f792a03b81e7803a626caaa'] = 'Colis relais';
|
||||
$_MODULE['<{tntcarrier}prestashop>service_6cefaa978ccec960693d10cefeb2c2bf'] = 'Livraison à domicile';
|
||||
$_MODULE['<{tntcarrier}prestashop>service_9582039a366d19cb0b957bd4220dd6f7'] = 'Service entreprise ';
|
||||
$_MODULE['<{tntcarrier}prestashop>shippingnumber_c3f15ecc6da0827a8da712cb43a0b596'] = 'L\'information d\'expédition';
|
||||
|
After Width: | Height: | Size: 894 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 961 B |
|
After Width: | Height: | Size: 978 B |
|
After Width: | Height: | Size: 912 B |
|
After Width: | Height: | Size: 436 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 954 B |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 713 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 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/afl-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 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 <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 6594 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../../../");
|
||||
exit;
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 1022 B |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 649 B |
|
After Width: | Height: | Size: 1021 B |
|
After Width: | Height: | Size: 403 B |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 58 B |
|
After Width: | Height: | Size: 56 B |
|
After Width: | Height: | Size: 62 B |
|
After Width: | Height: | Size: 64 B |
|
After Width: | Height: | Size: 61 B |
|
After Width: | Height: | Size: 61 B |
|
After Width: | Height: | Size: 56 B |
|
After Width: | Height: | Size: 61 B |
|
After Width: | Height: | Size: 52 B |
|
After Width: | Height: | Size: 53 B |
|
After Width: | Height: | Size: 53 B |
|
After Width: | Height: | Size: 52 B |
|
After Width: | Height: | Size: 58 B |
|
After Width: | Height: | Size: 56 B |
|
After Width: | Height: | Size: 64 B |
|
After Width: | Height: | Size: 56 B |
|
After Width: | Height: | Size: 61 B |
|
After Width: | Height: | Size: 61 B |
|
After Width: | Height: | Size: 52 B |
|
After Width: | Height: | Size: 53 B |
|
After Width: | Height: | Size: 53 B |
|
After Width: | Height: | Size: 52 B |
|
After Width: | Height: | Size: 58 B |
|
After Width: | Height: | Size: 56 B |
|
After Width: | Height: | Size: 62 B |
|
After Width: | Height: | Size: 64 B |
|
After Width: | Height: | Size: 61 B |
|
After Width: | Height: | Size: 61 B |
|
After Width: | Height: | Size: 56 B |
|
After Width: | Height: | Size: 61 B |
|
After Width: | Height: | Size: 52 B |
|
After Width: | Height: | Size: 53 B |
|
After Width: | Height: | Size: 53 B |
|
After Width: | Height: | Size: 52 B |
|
After Width: | Height: | Size: 235 B |
|
After Width: | Height: | Size: 325 B |
|
After Width: | Height: | Size: 308 B |
|
After Width: | Height: | Size: 58 B |
|
After Width: | Height: | Size: 56 B |
|
After Width: | Height: | Size: 62 B |
|
After Width: | Height: | Size: 64 B |
|
After Width: | Height: | Size: 61 B |
|
After Width: | Height: | Size: 61 B |
|
After Width: | Height: | Size: 56 B |
|
After Width: | Height: | Size: 61 B |
|
After Width: | Height: | Size: 52 B |
|
After Width: | Height: | Size: 53 B |
|
After Width: | Height: | Size: 53 B |
|
After Width: | Height: | Size: 52 B |
|
After Width: | Height: | Size: 202 B |
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 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 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 <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 7233 $
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 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/afl-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 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 <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 6594 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../../../");
|
||||
exit;
|
||||
@@ -0,0 +1,979 @@
|
||||
/** Javascript B2C Relais Colis - version 2.0 - 08/07/2010 **/
|
||||
|
||||
var pathToImages = "../modules/tntcarrier/img/";
|
||||
var tntDomain = "www.tnt.fr";
|
||||
|
||||
var tntRCcodePostal;
|
||||
var tntRCCommune;
|
||||
var tntRClisteRelais;
|
||||
var tntRCJsonCommunes;
|
||||
|
||||
var tntRCMsgHeaderTitle = "Mode de livraison";
|
||||
//var tntRCMsgSubHeaderTitle = "Choisissez le Relais Colis<sup class='tntRCSup'>®</sup> qui vous convient :";
|
||||
var tntRCMsgSubHeaderTitle = "Choisissez l'agence depot qui vous convient :";
|
||||
var tntRCMsgHeaderPopup = "Détail du Relais Colis<sup class='tntRCSup'>®</sup>";
|
||||
var tntRCMsgSubHeaderPopup = "Descriptif :";
|
||||
var tntRCMsgBodyLoading = "Chargement en cours...";
|
||||
var tntRCMsgBodyInput = "Département : ";
|
||||
var tntRCMsgBodyBack2Communes = "Revenir à la liste des communes";
|
||||
var tntRCMsgErrCodePostal = "Veuillez saisir un code postal sur 5 chiffres";
|
||||
var tntRCMsgErrLoadCommunes = "Aucun Relais Colis® disponible";
|
||||
var tntRCMsgErrLoadRelais = "Aucun Relais Colis® disponible";
|
||||
|
||||
var tntRCsize800 = "500px";
|
||||
var tntRCsize789 = "500px";
|
||||
var tntRCsize670 = "400px";
|
||||
var tntRCsize650 = "400px";
|
||||
var tntRCsize50 = "50px";
|
||||
var tntRCsize8 = "8px";
|
||||
var tntRCsize5 = "5px";
|
||||
var tntRCsize6 = "6px";
|
||||
var tntRCsize10 = "10px";
|
||||
var tntRCsize30 = "30px";
|
||||
var tntRCsize109 = "109px";
|
||||
var tntRCsize442 = "240px";
|
||||
var tntRCsize447 = "240px";
|
||||
var tntRCsize218 = "178px";
|
||||
var tntRCsize253 = "213px";
|
||||
var tntRCsize20 = "20px";
|
||||
var tntRCsize392 = "352px";
|
||||
var tntRCsize412 = "332px";
|
||||
|
||||
function getURLParam(name) {
|
||||
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
|
||||
var regexS = "[\\?&]" + name + "=([^&#]*)";
|
||||
var regex = new RegExp( regexS );
|
||||
var results = regex.exec( window.location.href );
|
||||
if( results == null ) return "";
|
||||
else return results[1];
|
||||
};
|
||||
|
||||
// Chargement de la liste de relais colis après le choix de la commune parmis plusieurs
|
||||
// communes correspondant au même code postal
|
||||
function tntRCgetRelaisColisJSON(commune)
|
||||
{
|
||||
if (!commune) {
|
||||
// La commune du code postal correspond à la sélection du radio bouton tntRCchoixComm
|
||||
tntRCCommune = $("input[@type=radio][@checked][@name=tntRCchoixComm]").val();
|
||||
}
|
||||
else {
|
||||
// Utilisation de la valeur fournie en paramètre
|
||||
tntRCCommune = commune
|
||||
}
|
||||
|
||||
// Affichage message "chargement en cours"
|
||||
tntRCsetChargementEnCours();
|
||||
|
||||
var ajaxUrl;
|
||||
var ajaxData;
|
||||
|
||||
ajaxUrl = "http://" + tntDomain + "/public/b2c/relaisColis/loadJson.do?cp=" + tntRCcodePostal + "&commune=" + tntRCCommune;
|
||||
ajaxData = "";
|
||||
|
||||
// Chargement de la liste de relais colis
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajaxUrl,
|
||||
data: ajaxData,
|
||||
dataType: "script"
|
||||
});
|
||||
};
|
||||
|
||||
// Affichage d'une liste de relais colis
|
||||
function tntRCafficheRelais(jData) {
|
||||
|
||||
var jMessage = $('#blocCodePostal');
|
||||
|
||||
var tntRCjTable = $("<table style='border:1px solid gray;' cellpadding='0' cellspacing='0' width='" + tntRCsize800 + "'></table>");
|
||||
|
||||
// Ligne blanche de séparation
|
||||
tntRCjTable.append(tntRCligneBlanche6Col());
|
||||
|
||||
// Entêtes de colonnes grise
|
||||
tntRCjTable.append(tntRCenteteGrise6Col());
|
||||
|
||||
//affiche le contenu du fichier dans le conteneur dédié
|
||||
jMessage.html("");
|
||||
|
||||
var i = 0;
|
||||
|
||||
tntRClisteRelais = jData;
|
||||
for(i = 0; i < jData.length; i++) {
|
||||
|
||||
var oRelais = jData[i];
|
||||
|
||||
// Les noeuds dans le fichier XML ne sont pas forcément ordonnés pour l'affichage, on va donc d'abord récupérer leur valeur
|
||||
var codeRelais = oRelais[0];
|
||||
var nomRelais = oRelais[1];
|
||||
var adresse = oRelais[4];
|
||||
var codePostal = oRelais[2];
|
||||
var commune = oRelais[3];
|
||||
var heureFermeture = oRelais[21];
|
||||
|
||||
var messages="";
|
||||
|
||||
var logo_point = "";
|
||||
if (messages != "") logo_point = "<img src='" + pathToImages + "exception.gif' alt='Informations complémentaires' width='16px' height='16px'>";
|
||||
|
||||
tntRCjTable.append(
|
||||
"<tr>"+
|
||||
"<td class='tntRCblanc' width='" + tntRCsize5 + "'></td>"+
|
||||
"<td class='tntRCblanc' width='" + tntRCsize50 + "'><img src='" + pathToImages + "logo-tnt-petit.jpg'> " + logo_point + "</td>"+
|
||||
"<td class='tntRCrelaisColis' width='" + tntRCsize650 + "'>" + nomRelais + " - " + adresse + " - " + codePostal + " - " + commune + "<BR> >> Ouvert jusqu'à " + heureFermeture + "</td>"+
|
||||
"<td class='tntRCrelaisColis' width='" + tntRCsize10 + "'> </td>"+
|
||||
"<td class='tntRCrelaisColis' valign='middle' align='center' width='" + tntRCsize109 + "'>"+
|
||||
"<a href='#' onclick='tntRCafficheDetail(" + i + ");'><img src='" + pathToImages + "loupe.gif' class='tntRCBoutonLoupe'></a> "+
|
||||
"<input type='radio' style='vertical-align: middle;' name='tntRCchoixRelais' value='" + codeRelais + "'" + ( i==0 ? "checked" : "") + " onclick='tntRCSetSelectedInfo(" + i + ")'/>"+
|
||||
"</td>"+
|
||||
"<td class='tntRCblanc' width='" + tntRCsize6 + "'></td>"+
|
||||
"</tr><tr id='tntRcDetail"+i+"' style='display:none'></tr>");
|
||||
}
|
||||
|
||||
// Mémorisation des infos du relais sélectionné par défaut (c'est le premier)
|
||||
tntRCSetSelectedInfo(0, true);
|
||||
|
||||
// Ajout du lien de retour sur la liste des communes si cette dernière a été mémorisée
|
||||
if (tntRCJsonCommunes != null) {
|
||||
tntRCjTable.append(
|
||||
"<tr>"+
|
||||
"<td colspan='5' class='tntRCBack2Communes'>"+
|
||||
"<a href='#' onclick='tntRCafficheCommunes(tntRCJsonCommunes);'>"+
|
||||
"<img src='" + pathToImages + "bt-Retour.gif'>"+
|
||||
tntRCMsgBodyBack2Communes +
|
||||
"</a>"+
|
||||
"</td>"+
|
||||
"<td />"+
|
||||
"</tr>");
|
||||
}
|
||||
|
||||
tntRCjTable.append(tntRCligneBlanche6Col());
|
||||
jMessage.append(tntRCjTable);
|
||||
|
||||
jMessage.append(tntRCchangerCodePostal());
|
||||
};
|
||||
|
||||
function tntB2CRelaisColisGetBodyMain() {
|
||||
return (
|
||||
"<div class='tntRCGray'> </div>"+
|
||||
"<div id='tntBodyContentSC'>" +
|
||||
"<table>"+
|
||||
"<tr>"+
|
||||
"<td>" + tntRCMsgBodyInput + "</td>"+
|
||||
"<td><input type='text' id='tntRCInputCP' class='tntRCInput' maxlength='5' size='5' value=''/></td>"+
|
||||
"<td><a href='#' onclick='tntRCgetDepot();'><img class='tntRCButton' src='" + pathToImages + "bt-OK-2.jpg' onmouseover='this.src=\"" + pathToImages + "bt-OK-1.jpg\"' onmouseout='this.src=\"" + pathToImages + "bt-OK-2.jpg\"'></a></td>" +
|
||||
"</tr>"+
|
||||
"</table>" +
|
||||
"</div>"+
|
||||
"<div id='tntRCLoading' style='display:none;'>" + tntRCMsgBodyLoading + "</div>"+
|
||||
"<div id='tntRCError' class='tntRCError' style='display:none;'></div>");
|
||||
}
|
||||
|
||||
function tntB2CRelaisColis() {
|
||||
|
||||
// Test si ID de référence existe, sinon on ne fait rien
|
||||
if (!document.getElementById("tntB2CRelaisColis")) {
|
||||
alert("ERREUR: Appel incorrect, objet [tntB2CRelaisColis] manquant !");
|
||||
return;
|
||||
}
|
||||
|
||||
tntRCCommune = '';
|
||||
|
||||
var tntRelaisColisB2C = $("#tntB2CRelaisColis");
|
||||
tntRelaisColisB2C.html(
|
||||
"<div id='tntRCblocEntete'>"+
|
||||
"<div class='tntRCHeader'>"+ tntRCMsgHeaderTitle + "</div>"+
|
||||
"<div class='tntRCSubHeader'>" + tntRCMsgSubHeaderTitle + "</div>"+
|
||||
"</div>"+
|
||||
"<div id='blocCodePostal' class='tntRCBody'>"+
|
||||
tntB2CRelaisColisGetBodyMain() +
|
||||
"</div>" +
|
||||
"<div class='dialog_box' id='tntRCDialog'>"+
|
||||
"<div id='tntRCdetailRelaisEntete'>"+
|
||||
"<div class='tntRCHeader'>"+ tntRCMsgHeaderPopup + "</div>"+
|
||||
"<div class='tntRCSubHeader'>" + tntRCMsgSubHeaderPopup + "</div>"+
|
||||
"</div>"+
|
||||
"<div id='tntRCdetailRelaisCorps'></div>"+
|
||||
"</div>");
|
||||
|
||||
// Forçage de la propriété "top", car elle est écrasée par la gestion de jqModal
|
||||
// si on la met dans la définition de la classe du div correspondant...
|
||||
$('#tntRCDialog').css("top", "50%");
|
||||
|
||||
// Ajout de la popup dans la gestion jqModal
|
||||
|
||||
$('#tntRCDialog').dialog({
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
width: 635,
|
||||
height: 500,
|
||||
position: ['middle','middle'],
|
||||
resizable: false,
|
||||
draggable: false,
|
||||
show: 'blind',
|
||||
close: function(event, ui) {
|
||||
$("html").css({overflow: "", 'overflow-x': "", 'overflow-y': ""});
|
||||
}
|
||||
});
|
||||
|
||||
// Récupérations des paramètres de l'URL
|
||||
var codePostal = getURLParam("codePostal");
|
||||
var commune = getURLParam("commune");
|
||||
|
||||
if (codePostal != "") {
|
||||
tntRCcodePostal = codePostal;
|
||||
if (commune != "") {
|
||||
// Couple code postal + commune fourni
|
||||
tntRCgetRelaisColisJSON(commune);
|
||||
}
|
||||
else {
|
||||
$('#tntRCInputCP').val(tntRCcodePostal);
|
||||
tntRCgetCommunesJSON();
|
||||
}
|
||||
}
|
||||
|
||||
// Initialisation de Map associée
|
||||
tntRCInitMap();
|
||||
};
|
||||
|
||||
function tntRCgetRelaisColis(libelleErreur) {
|
||||
|
||||
// RAZ des infos sélectionnées
|
||||
tntRCSetSelectedInfo();
|
||||
|
||||
tntRCCommune = '';
|
||||
|
||||
var blocCodePostal = $("#blocCodePostal");
|
||||
if(!blocCodePostal.hasClass("tntRCBody"))
|
||||
blocCodePostal.addClass("tntRCBody");
|
||||
blocCodePostal.html(tntB2CRelaisColisGetBodyMain());
|
||||
$('#tntRCInputCP').val(tntRCcodePostal);
|
||||
|
||||
if (libelleErreur) {
|
||||
var jDivErreur = $("#tntRCError");
|
||||
jDivErreur.html(libelleErreur);
|
||||
jDivErreur.show();
|
||||
}
|
||||
};
|
||||
|
||||
function tntRCafficheCommunes(jData) {
|
||||
|
||||
// RAZ des infos sélectionnées
|
||||
tntRCSetSelectedInfo();
|
||||
|
||||
if (mapDetected) resetMap();
|
||||
|
||||
var tntRCjTable = $("<table style='border:1px solid gray;' cellpadding='0' cellspacing='0' width='" + tntRCsize800 + "'></table>");
|
||||
|
||||
// Ligne blanche de séparation
|
||||
tntRCjTable.append(tntRCligneBlanche6Col());
|
||||
// Entêtes de colonnes grise
|
||||
tntRCjTable.append(tntRCenteteGrise6Col());
|
||||
|
||||
var blocCodePostal = $("#blocCodePostal");
|
||||
|
||||
var i = 1;
|
||||
//var jCommunes = jData.find("VILLE");
|
||||
for (var iIdx = 0; iIdx < jData.length; iIdx++) {
|
||||
|
||||
var commune = jData[iIdx];
|
||||
|
||||
//var jCommune = $(this);
|
||||
var nomVille = commune[1]; // IE vs FF
|
||||
|
||||
tntRCjTable.append(
|
||||
"<tr>"+
|
||||
"<td class='tntRCblanc' width='" + tntRCsize5 + "'></td>"+
|
||||
"<td class='tntRCblanc' width='" + tntRCsize50 + "'><img src='" + pathToImages + "logo-tnt-petit.jpg'></td>" +
|
||||
"<td class='tntRCrelaisColis' width='" + tntRCsize650 + "'> " + nomVille + " (" + tntRCcodePostal + ") </td>" +
|
||||
"<td class='tntRCrelaisColis' width='" + tntRCsize10 + "'> </td>"+
|
||||
"<td class='tntRCrelaisColis' align='center' width='" + tntRCsize109 + "'>"+
|
||||
"<input type='radio' name='tntRCchoixComm' value='" + nomVille + "' " + ( i ==1 ? "checked" : "") + ">"+
|
||||
"</td>"+
|
||||
"<td class='tntRCblanc' width='" + tntRCsize6 + "'></td>"+
|
||||
"</tr>");
|
||||
i = 2;
|
||||
}
|
||||
|
||||
tntRCjTable.append(
|
||||
tntRCligneBlanche6Col() +
|
||||
"<tr>"+
|
||||
"<td class='tntRCblanc' width='" + tntRCsize5 + "'></td>"+
|
||||
"<td class='tntRCblanc' colspan='2' width='" + tntRCsize670 + "'></td>"+
|
||||
"<td class='tntRCblanc' width='" + tntRCsize10 + "'></td>"+
|
||||
"<td class='tntRCblanc' align='center' width='" + tntRCsize109 + "'>"+
|
||||
"<a href='javascript:tntRCgetRelaisColisJSON();'><img class='tntRCButton' src='" + pathToImages + "bt-Continuer-2.jpg' onmouseover='this.src=\"" + pathToImages + "bt-Continuer-1.jpg\"' onmouseout='this.src=\"" + pathToImages + "bt-Continuer-2.jpg\"'></a>" +
|
||||
"</td>"+
|
||||
"<td class='tntRCblanc' width='" + tntRCsize6 + "'></td>"+
|
||||
"</tr>" +
|
||||
tntRCligneBlanche6Col());
|
||||
|
||||
blocCodePostal.html(tntRCjTable);
|
||||
|
||||
// Bloc de saisie d'un nouveau code postal
|
||||
blocCodePostal.append(tntRCchangerCodePostal());
|
||||
}
|
||||
|
||||
function tntRCgetCommunesJSON() {
|
||||
|
||||
$("#tntRCError").hide();
|
||||
tntRCcodePostal = $('#tntRCInputCP').val();
|
||||
|
||||
// Code postal non renseigné, on ne fait rien
|
||||
if (tntRCcodePostal=="") return;
|
||||
|
||||
if (mapDetected) resetMap();
|
||||
|
||||
// On ne fait rien si le code postal n'est pas un nombre de 5 chiffres
|
||||
if (isNaN(parseInt(tntRCcodePostal)) || tntRCcodePostal.length != 5) {
|
||||
tntRCgetRelaisColis(tntRCMsgErrCodePostal);
|
||||
return;
|
||||
}
|
||||
|
||||
tntRCsetChargementEnCours();
|
||||
|
||||
var ajaxUrl;
|
||||
var ajaxData;
|
||||
|
||||
ajaxUrl = "http://" + tntDomain + "/public/b2c/relaisColis/rechercheJson.do?code=" + tntRCcodePostal;
|
||||
ajaxData = "";
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajaxUrl,
|
||||
data: ajaxData,
|
||||
dataType: "script",
|
||||
error:function(msg){
|
||||
$("#blocCodePostal").html("Error !: " + msg );
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function tntRCsetChargementEnCours() {
|
||||
$("#tntRCLoading").show();
|
||||
};
|
||||
|
||||
function tntRCafficheDetail(i) {
|
||||
|
||||
var tntRCdetailRelais = $("#tntRcDetail"+i);
|
||||
|
||||
tntRCdetailRelais.html("");
|
||||
|
||||
var oRelais = tntRClisteRelais[i];
|
||||
|
||||
// Les noeuds dans le fichier JSON ne sont pas forcément ordonnés pour l'affichage, on va donc d'abord récupérer leur valeur
|
||||
var codeRelais = oRelais[0]
|
||||
var nomRelais = oRelais[1];
|
||||
var adresse = oRelais[4];
|
||||
var codePostal = oRelais[2];
|
||||
var commune = oRelais[3];
|
||||
var heureFermeture = oRelais[21];
|
||||
|
||||
var lundi_am = (oRelais[7] == "-")?"fermé":oRelais[7];
|
||||
var lundi_pm = (oRelais[8] == "-")?"fermé":oRelais[8];
|
||||
var mardi_am = (oRelais[9] == "-")?"fermé":oRelais[9];
|
||||
var mardi_pm = (oRelais[10] == "-")?"fermé":oRelais[10];
|
||||
var mercredi_am = (oRelais[11] == "-")?"fermé":oRelais[11];
|
||||
var mercredi_pm = (oRelais[12] == "-")?"fermé":oRelais[12];
|
||||
var jeudi_am = (oRelais[13] == "-")?"fermé":oRelais[13];
|
||||
var jeudi_pm = (oRelais[14] == "-")?"fermé":oRelais[14];
|
||||
var vendredi_am = (oRelais[15] == "-")?"fermé":oRelais[15];
|
||||
var vendredi_pm = (oRelais[16] == "-")?"fermé":oRelais[16];
|
||||
var samedi_am = (oRelais[17] == "-")?"fermé":oRelais[17];
|
||||
var samedi_pm = (oRelais[18] == "-")?"fermé":oRelais[18];
|
||||
var dimanche_am = (oRelais[19] == "-")?"fermé":oRelais[19];
|
||||
var dimanche_pm = (oRelais[20] == "-")?"fermé":oRelais[20];
|
||||
|
||||
var messages = "";
|
||||
for (j=0; j < oRelais[24].length; j++) {
|
||||
var ligne = oRelais[24][j];
|
||||
if (ligne != "") messages = messages + ligne + "<br/>";
|
||||
}
|
||||
|
||||
if (lundi_pm != "-") lundi_am = lundi_am + "<br/>" + lundi_pm;
|
||||
if (mardi_pm != "-") mardi_am = mardi_am + "<br/>" + mardi_pm;
|
||||
if (mercredi_pm != "-") mercredi_am = mercredi_am + "<br/>" + mercredi_pm;
|
||||
if (jeudi_pm != "-") jeudi_am = jeudi_am + "<br/>" + jeudi_pm;
|
||||
if (vendredi_pm != "-") vendredi_am = vendredi_am + "<br/>" + vendredi_pm;
|
||||
if (samedi_pm != "-") samedi_am = samedi_am + "<br/>" + samedi_pm;
|
||||
if (dimanche_pm != "-") dimanche_am = dimanche_am + "<br/>" + dimanche_pm;
|
||||
|
||||
var logo_point = "";
|
||||
if (messages != "") logo_point = "<img src='" + pathToImages + "exception.gif' alt='Picto Informations'>";
|
||||
|
||||
var tntRCjTableX = $(
|
||||
"<td class='detailRelais' colspan='6'><div class='ui-dialog-titlebar' style='text-align:right'>"
|
||||
+ "<span class='ui-dialog-title' onclick='document.getElementById(\"tntRcDetail"+i+"\").style.display=\"none\"'>X</span>"
|
||||
+ "</div>"
|
||||
+ "<input type='button' value='Choisir ce relais' onclick='callbackSelectionRelais();' />"
|
||||
+"<table style='border:1px solid gray;margin:20px;' cellpadding='0' cellspacing='0' width='" + tntRCsize447 + "'>"
|
||||
+ "<tr>"
|
||||
+ "<td width='" + tntRCsize447 + "' valign='top'>"
|
||||
+ "<table style='border:0px;' cellpadding='0' cellspacing='0' width='" + tntRCsize447 + "'>"
|
||||
+ "<tr>"
|
||||
+ "<td>"
|
||||
+ "<table style='border:0px;' cellpadding='0' cellspacing='0' >"
|
||||
+ "<tr height='" + tntRCsize8 + "'><td colspan='4'></td></tr>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCdetailGros' width='" + tntRCsize5 + "'> </td>"
|
||||
+ "<td class='tntRCdetailGros' width='" + tntRCsize442 + "' colspan='3'>Localisation : </td>"
|
||||
+ "</tr>"
|
||||
+ "<tr height='" + tntRCsize20 + "'><td colspan='4'></td></tr>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCdetailGros' width='"+ tntRCsize5 + "'> </td>"
|
||||
+ "<td class='tntRCdetailGros' width='"+ tntRCsize30 + "'> </td>"
|
||||
+ "<td class='tntRCnoirPetit' colspan ='2'><b>" + nomRelais + "</b></td>"
|
||||
+ "</tr>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCdetailGros' width='"+ tntRCsize5 + "'> </td>"
|
||||
+ "<td class='tntRCdetailGros' width='"+ tntRCsize30 + "'> </td>"
|
||||
+ "<td class='tntRCnoirPetit' colspan ='2'>" + adresse + "</td>"
|
||||
+ "</tr>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCdetailGros' width='"+ tntRCsize5 + "'> </td>"
|
||||
+ "<td class='tntRCdetailGros' width='"+ tntRCsize30 + "'> </td>"
|
||||
+ "<td class='tntRCnoirPetit' colspan ='2'>" + codePostal + " " + commune + "</td>"
|
||||
+ "</tr>"
|
||||
+ "<tr height='" + tntRCsize50 + "'><td colspan='4'></td></tr>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCdetailGros' width='" + tntRCsize5 + "'> </td>"
|
||||
+ "<td class='tntRCdetailGros' width='" + tntRCsize442 + "' colspan='3'>Informations : </td>"
|
||||
+ "</tr>"
|
||||
+ "<tr height='" + tntRCsize8 + "'><td colspan='4'></td></tr>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCdetailGros' width='"+ tntRCsize5 + "'></td>"
|
||||
+ "<td class='tntRCdetailGros' width='"+ tntRCsize30 + "'> " + logo_point + "</td>"
|
||||
+ "<td class='tntRCdetailPetit' colspan ='2'>" + messages + "</td>"
|
||||
+ "</tr>"
|
||||
+ "</table>"
|
||||
+ "</td>"
|
||||
+ "</tr>"
|
||||
+ "</table>"
|
||||
+ "</td>"
|
||||
+ "<td width='" + tntRCsize253 + "' valign='top'>"
|
||||
+ "<table style='border:0px;' cellpadding='0' cellspacing='0' width='" + tntRCsize253 + "'>"
|
||||
+ "<tr>"
|
||||
+ "<td>"
|
||||
+ "<table style='border:0px;' cellpadding='0' cellspacing='0'>"
|
||||
+ "<tr height='" + tntRCsize8 + "'>"
|
||||
+ "<td colspan='4'></td>"
|
||||
+ "</tr>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCdetailGros'><img src='" + pathToImages + "picto-delai.gif' alt='Picto delai'></td>"
|
||||
+ "<td class='tntRCdetailGros' colspan='3'>Horaires d'ouverture : </td>"
|
||||
+ "</tr>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCdetailGros' width='"+ tntRCsize30 + "'></td>"
|
||||
+ "<td>"
|
||||
+ "<table class='tntRCHoraire' cellpadding='0' cellspacing='0' rules='all' width='" + tntRCsize218 + "'>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCHoraireJour'>Lundi</td>"
|
||||
+ "<td class='tntRCHoraireHeure'>" + lundi_am + "</td>"
|
||||
+ "</tr>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCHoraireJour'>Mardi</td>"
|
||||
+ "<td class='tntRCHoraireHeure'>" + mardi_am + "</td>"
|
||||
+ "</tr>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCHoraireJour'>Mercredi</td>"
|
||||
+ "<td class='tntRCHoraireHeure'>" + mercredi_am + "</td>"
|
||||
+ "</tr>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCHoraireJour'>Jeudi</td>"
|
||||
+ "<td class='tntRCHoraireHeure'>" + jeudi_am + "</td>"
|
||||
+ "</tr>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCHoraireJour'>Vendredi</td>"
|
||||
+ "<td class='tntRCHoraireHeure'>" + vendredi_am + "</td>"
|
||||
+ "</tr>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCHoraireJour'>Samedi</td>"
|
||||
+ "<td class='tntRCHoraireHeure'>" + samedi_am + "</td>"
|
||||
+ "</tr>"
|
||||
+ "<tr>"
|
||||
+ "<td class='tntRCHoraireJour'>Dimanche</td>"
|
||||
+ "<td class='tntRCHoraireHeure'>" + dimanche_am + "</td>"
|
||||
+ "</tr>"
|
||||
+ "</table>"
|
||||
+ "</td>"
|
||||
+ "<td class='tntRCdetailGros' width='"+ tntRCsize5 + "'></td>"
|
||||
+ "</tr>"
|
||||
+ "</table>"
|
||||
+ "</td>"
|
||||
+ "</tr>"
|
||||
+ "</table>"
|
||||
+ "</td>"
|
||||
+ "</tr>"
|
||||
+ "<tr height='" + tntRCsize8 + "'></tr>"
|
||||
+ "</table></td>");
|
||||
|
||||
tntRCdetailRelais.append(tntRCjTableX);
|
||||
tntRCdetailRelais.show();
|
||||
//$('#tntRCDialog').dialog("open");
|
||||
//$('#tntRCDialog').css("width", "600px"); // Patch mauvais calcul jQueryUI
|
||||
// Masquage des barres de scrolling
|
||||
//$("html").css({overflow: "hidden", 'overflow-x': "hidden", 'overflow-y': "hidden"});
|
||||
};
|
||||
|
||||
function tntRCligneBlancheDetail(){
|
||||
return("<tr height='" + tntRCsize5 + "'><td colspan='8'> </td></tr>");
|
||||
};
|
||||
|
||||
function tntRCligneBlancheGauche(){
|
||||
return(
|
||||
"<tr height='" + tntRCsize8 + "'>"+
|
||||
"<td class='tntRCdetailGros' width='" + tntRCsize5 + "'></td>"+
|
||||
"<td class='tntRCdetailGros' width='" + tntRCsize30 + "'></td>"+
|
||||
"<td class='tntRCdetailGros' width='" + tntRCsize20 + "'></td>"+
|
||||
"<td class='tntRCdetailGros' width='" + tntRCsize392 + "'></td>"+
|
||||
"</tr>");
|
||||
};
|
||||
|
||||
// Table vide avec 3 colonnes pour sauter une ligne
|
||||
function tntRCligneBlanche3Col() {
|
||||
return("<tr height='" + tntRCsize8 + "'><td class='tntRCblanc' width='" + tntRCsize5 + "'></td><td class='tntRCblanc' width='" + tntRCsize789 + "'></td><td class='tntRCblanc' width='" + tntRCsize6 + "'></td></tr>");
|
||||
};
|
||||
|
||||
// Table vide avec 6 colonnes pour sauter une ligne
|
||||
function tntRCligneBlanche6Col() {
|
||||
return("<tr height='" + tntRCsize8 + "'><td class='tntRCblanc' colspan='6'></td></td></tr>");
|
||||
};
|
||||
|
||||
// Table vide avec 3 colonnes et entête en gris
|
||||
function tntRCligneGrise3Col() {
|
||||
return("<tr><td class='tntRCblanc' width='" + tntRCsize5 + "'></td><td class='tntRCgris' width='" + tntRCsize789 + "'><br/></td><td class='tntRCblanc' width='" + tntRCsize6 + "'></td></tr>");
|
||||
};
|
||||
|
||||
// Table entête de colonnes grises
|
||||
function tntRCenteteGrise6Col() {
|
||||
return("<tr><td class='tntRCblanc' width='" + tntRCsize5 + "'></td><td class='tntRCgris' colspan='2' width='" + tntRCsize670 + "'> Les différents Relais Colis®</td><td class='tntRCblanc' width='" + tntRCsize10 + "'></td><td class='tntRCgris' width='" + tntRCsize109 + "'> Mon choix</td><td class='tntRCblanc' width='" + tntRCsize6 + "'></td></tr>");
|
||||
};
|
||||
|
||||
// Zone de saisie d'un code postal nouveau
|
||||
function tntRCchangerCodePostal(){
|
||||
return(
|
||||
"<div class='tntRCWhite'> </div>"+
|
||||
"<div class='tntRCBodySearch'>"+
|
||||
"<table>"+
|
||||
"<tr>"+
|
||||
"<td width='300px'>Vous pouvez choisir un autre code postal de livraison :</td>"+
|
||||
"<td width='55px'><input type='text' id='tntRCInputCP' class='tntRCInput' maxlength='5' size='5' value='' /></td>"+
|
||||
"<td><a href='#' onclick='tntRCgetDepot();'><img class='tntRCButton' src='" + pathToImages + "bt-OK-2.jpg' onmouseover='this.src=\"" + pathToImages + "bt-OK-1.jpg\"' onmouseout='this.src=\"" + pathToImages + "bt-OK-2.jpg\"'></a></td>" +
|
||||
"</tr>"+
|
||||
"</table>"+
|
||||
"</div>");
|
||||
};
|
||||
|
||||
function tntRCSetSelectedInfo(selectedIdx, noMarkerInfo) {
|
||||
|
||||
if (!selectedIdx && selectedIdx != 0) {
|
||||
// RAZ des infos sélectionnées
|
||||
$("#tntRCSelectedCode").val("");
|
||||
$("#tntRCSelectedNom").val("");
|
||||
$("#tntRCSelectedAdresse").val("");
|
||||
$("#tntRCSelectedCodePostal").val("");
|
||||
$("#tntRCSelectedCommune").val("");
|
||||
return
|
||||
}
|
||||
|
||||
var oRelais = tntRClisteRelais[selectedIdx];
|
||||
|
||||
$("#tntRCSelectedCode").val(oRelais[0]);
|
||||
$("#tntRCSelectedNom").val(oRelais[1]);
|
||||
$("#tntRCSelectedAdresse").val(oRelais[4]);
|
||||
$("#tntRCSelectedCodePostal").val(oRelais[2]);
|
||||
$("#tntRCSelectedCommune").val(oRelais[3]);
|
||||
|
||||
if (mapDetected && !noMarkerInfo) {
|
||||
|
||||
// Les noeuds dans le fichier XML ne sont pas forcément ordonnés pour l'affichage, on va donc d'abord récupérer leur valeur
|
||||
var codeRelais = oRelais[0]
|
||||
var nomRelais = oRelais[1];
|
||||
var adresse = oRelais[4];
|
||||
var codePostal = oRelais[2];
|
||||
var commune = oRelais[3];
|
||||
var heureFermeture = oRelais[21];
|
||||
|
||||
var messages = "";
|
||||
var lundi_am = (oRelais[7] == "-")?",":oRelais[7]+",";
|
||||
var lundi_pm = oRelais[8];
|
||||
var mardi_am = (oRelais[9] == "-")?",":oRelais[9]+",";
|
||||
var mardi_pm = oRelais[10];
|
||||
var mercredi_am = (oRelais[11] == "-")?",":oRelais[11]+",";
|
||||
var mercredi_pm = oRelais[12];
|
||||
var jeudi_am = (oRelais[13] == "-")?",":oRelais[13]+",";
|
||||
var jeudi_pm = oRelais[14];
|
||||
var vendredi_am = (oRelais[15] == "-")?",":oRelais[15]+",";
|
||||
var vendredi_pm = oRelais[16];
|
||||
var samedi_am = (oRelais[17] == "-")?",":oRelais[17]+",";
|
||||
var samedi_pm = oRelais[18];
|
||||
var dimanche_am = (oRelais[19] == "-")?",":oRelais[19]+",";
|
||||
var dimanche_pm = oRelais[20];
|
||||
|
||||
if (lundi_pm != "-") lundi_am = lundi_am + lundi_pm;
|
||||
if (mardi_pm != "-") mardi_am = mardi_am + mardi_pm;
|
||||
if (mercredi_pm != "-") mercredi_am = mercredi_am + mercredi_pm;
|
||||
if (jeudi_pm != "-") jeudi_am = jeudi_am + jeudi_pm;
|
||||
if (vendredi_pm != "-") vendredi_am = vendredi_am + vendredi_pm;
|
||||
if (samedi_pm != "-") samedi_am = samedi_am + samedi_pm;
|
||||
if (dimanche_pm != "-") dimanche_am = dimanche_am + dimanche_pm;
|
||||
|
||||
var horaires = new Array();
|
||||
horaires['lundi'] = lundi_am + ",1";
|
||||
horaires['mardi'] = mardi_am + ",2";
|
||||
horaires['mercredi'] = mercredi_am + ",3";
|
||||
horaires['jeudi'] = jeudi_am + ",4";
|
||||
horaires['vendredi'] = vendredi_am + ",5";
|
||||
horaires['samedi'] = samedi_am + ",6";
|
||||
horaires['dimanche'] = dimanche_am + ",0";
|
||||
|
||||
var messages = "";
|
||||
for (j=0; j < oRelais[24].length; j++) {
|
||||
var ligne = oRelais[24][j];
|
||||
if (ligne != "") messages = messages + ligne + "<br/>";
|
||||
}
|
||||
|
||||
setInfoMarker(codeRelais, nomRelais, adresse, codePostal, commune, messages, selectedIdx, horaires, relaisMarkers[selectedIdx]);
|
||||
}
|
||||
}
|
||||
|
||||
function resetMap() {
|
||||
|
||||
if (map) {
|
||||
|
||||
map.getStreetView().setVisible(false);
|
||||
|
||||
for (var i = 0; i < relaisMarkers.length; i++) {
|
||||
relaisMarkers[i].setMap(null);
|
||||
relaisMarkers[i] = null;
|
||||
}
|
||||
relaisMarkers = new Array();
|
||||
if (infowindow) infowindow.close();
|
||||
map.setZoom(defaultZoom);
|
||||
map.setCenter(defaultCenter);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Fonction appellée en retour de la recherche des communes par rapport à un code postal
|
||||
* si plusieurs communes ont été trouvées
|
||||
*/
|
||||
|
||||
function listeCommunes(tabCommunes) {
|
||||
tntRCJsonCommunes = null;
|
||||
|
||||
// TEMP: car le contenu du div est entièrement reconstruit
|
||||
$("#blocCodePostal").removeClass("tntRCBody");
|
||||
|
||||
tntRCJsonCommunes = tabCommunes;
|
||||
tntRCafficheCommunes(tabCommunes);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fonction appellée en retour de la recherche des communes par rapport à un code postal
|
||||
* si une seule commune a été trouvée
|
||||
*/
|
||||
|
||||
function listeRelais(tabRelais) {
|
||||
|
||||
tntRClisteRelais = null;
|
||||
|
||||
// TEMP: car le contenu du div est entièrement reconstruit
|
||||
$("#blocCodePostal").removeClass("tntRCBody");
|
||||
|
||||
tntRCafficheRelais(tabRelais);
|
||||
if (mapDetected) init_marker(tabRelais);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fonction appellée en retour de la recherche des communes si aucune commune trouvée
|
||||
*/
|
||||
function erreurListeCommunes() {
|
||||
tntRCJsonCommunes = null;
|
||||
tntRCgetRelaisColis(tntRCMsgErrLoadCommunes);
|
||||
}
|
||||
|
||||
function erreurListeRelais() {
|
||||
tntRCgetRelaisColis(tntRCMsgErrLoadRelais);
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************************************
|
||||
* Partie Google Map
|
||||
***********************************************************************************************/
|
||||
|
||||
var map;
|
||||
var adresse_pointclic;
|
||||
var zone_chalandise;
|
||||
var zoomZoneChalandiseDefault;
|
||||
var centerZoneChalandiseDefault;
|
||||
var init_streetview = false;
|
||||
|
||||
var contentTo = [
|
||||
'<br/><div>',
|
||||
'Itinéraire : <b>Vers ce lieu</b> - <a href="javascript:fromhere(0)">A partir de ce lieu</a><br/>',
|
||||
'Lieu de départ<br/>',
|
||||
'<input type="text" id="saisie" name="saisie" value="" maxlength="500" size="30">',
|
||||
'<input type="hidden" id="mode" name="mode" value="toPoint">',
|
||||
'<input type="hidden" id="point_choisi" name="point_choisi" value="">',
|
||||
'<input type="submit" onclick="popup_roadmap();" value="Ok">',
|
||||
'<br/>Ex: 58 avenue Leclerc 69007 Lyon',
|
||||
'</div>'].join('');
|
||||
|
||||
var contentFrom = [
|
||||
'<br/><div>',
|
||||
'Itinéraire : <a href="javascript:tohere(0)">Vers ce lieu</a> - <b>A partir de ce lieu</b><br/>',
|
||||
'Lieu d\'arrivée<br/>',
|
||||
'<input type="text" id="saisie" name="saisie" value="" maxlength="500" size="30">',
|
||||
'<input type="hidden" id="mode" name="mode" value="fromPoint">',
|
||||
'<input type="hidden" id="point_choisi" name="point_choisi" value="">',
|
||||
'<input type="button" onclick="popup_roadmap();" value="Ok">',
|
||||
'<br/>Ex: 58 avenue Leclerc 69007 Lyon',
|
||||
'</div>'].join('');
|
||||
|
||||
var infowindow;
|
||||
|
||||
var relaisMarkers = [];
|
||||
var iconRelais = new google.maps.MarkerImage(
|
||||
"img/google/relaisColis.png",
|
||||
new google.maps.Size(40, 30),
|
||||
new google.maps.Point(0, 0),
|
||||
new google.maps.Point(20, 30))
|
||||
|
||||
//Limites de la France
|
||||
var allowedBounds = new google.maps.LatLngBounds(
|
||||
new google.maps.LatLng(39.56533418570851, -7.41426946590909),
|
||||
new google.maps.LatLng(52.88994181429149, 11.84176746590909));
|
||||
|
||||
var defaultCenter = new google.maps.LatLng(46.2276380, 2.2137490); // the center ???
|
||||
var defaultZoom = 5; // default zoom level
|
||||
var aberration = 0.2; // this value is a good choice for france (?!)
|
||||
var minMapScale = 5;
|
||||
//var maxMapScale = 20;
|
||||
|
||||
var mapDetected = false;
|
||||
var callbackLinkMarker = "";
|
||||
|
||||
// fonction appellé après saisie du code postal de recherche
|
||||
function init_marker(json) {
|
||||
|
||||
zone_chalandise = new google.maps.LatLngBounds();
|
||||
|
||||
for (var i = 0; i < relaisMarkers.length; i++) {
|
||||
relaisMarkers[i].setMap(null);
|
||||
relaisMarkers[i] = null;
|
||||
}
|
||||
relaisMarkers = new Array();
|
||||
|
||||
if (infowindow) infowindow.close();
|
||||
|
||||
var markers = json;
|
||||
|
||||
for (var i = 0; i < markers.length; i++) {
|
||||
createMarker(markers[i], i);
|
||||
}
|
||||
|
||||
zoomZoneChalandiseDefault = zone_chalandise.getCenter();
|
||||
centerZoneChalandiseDefault = zone_chalandise;
|
||||
|
||||
retourZoomChalandise();
|
||||
}
|
||||
|
||||
function setInfoMarker(codeRelais, nomRelais, adresse, codePostal, commune, messages, indice, horaires, marker) {
|
||||
|
||||
var htmlInfo = [
|
||||
"<div>",
|
||||
"<div class='rc'>",
|
||||
"<b>RELAIS COLIS N° ", codeRelais, "</b><br/>",
|
||||
"<b>", nomRelais, "</b><br/>",
|
||||
adresse, "<br/>",
|
||||
codePostal, " ", commune,
|
||||
"</div>",
|
||||
"<div><br/>", messages, "</div>",
|
||||
callbackLinkMarker,
|
||||
"</div>",
|
||||
"<div id='trajet'>" + contentTo + "</div>"
|
||||
].join('');
|
||||
|
||||
// Création du contenu de l'onglet horaire
|
||||
var htmlHoraires = "<table class='horairesRCPopup'>";
|
||||
var jourSemaine = (new Date()).getDay();
|
||||
for (jour in horaires) {
|
||||
var heures = (horaires[jour]).split(",");
|
||||
if (heures[0] == '' && heures[1] == '') heures[0] = "fermé";
|
||||
htmlHoraires = htmlHoraires + "<tr" + (jourSemaine == parseInt(heures[2]) ? " class='selected'" : "") + "><td class='horairesRCJourPopup'> " + jour + "</td><td class='horaireRCPopup'>" + heures[0] + " " + heures[1] + "</td></tr>";
|
||||
}
|
||||
htmlHoraires = htmlHoraires + "</table>";
|
||||
|
||||
adresse_pointclic = [adresse, "|", codePostal, " ", commune].join('');
|
||||
|
||||
var contentString = [
|
||||
'<div id="tabs" style="width:340px;">',
|
||||
'<ul>',
|
||||
'<li><a href="#tabInfos"><span>Infos</span></a></li>',
|
||||
'<li><a href="#tabHoraires"><span>Horaires</span></a></li>',
|
||||
'</ul>',
|
||||
'<div id="tabInfos">',
|
||||
htmlInfo,
|
||||
'</div>',
|
||||
'<div id="tabHoraires">',
|
||||
htmlHoraires,
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join('');
|
||||
|
||||
if (infowindow) infowindow.close();
|
||||
infowindow = new google.maps.InfoWindow({content: contentString});
|
||||
|
||||
google.maps.event.addListener(infowindow, "domready", function() {
|
||||
$("#point_choisi").attr("value", adresse_pointclic);
|
||||
$("#tabs").tabs();
|
||||
$("#tabs").parent().removeAttr("style");
|
||||
});
|
||||
|
||||
infowindow.open(map, marker);
|
||||
}
|
||||
|
||||
function createMarker(markerData, indice) {
|
||||
|
||||
var marker = new google.maps.Marker({
|
||||
icon: iconRelais,
|
||||
position: new google.maps.LatLng(markerData[5], markerData[6]),
|
||||
map: map,
|
||||
title:markerData[1]
|
||||
});
|
||||
|
||||
google.maps.event.addListener(marker, "click", function() {
|
||||
// Sélectionne le relais correspondant dans la liste
|
||||
$("input[@type=radio][@name=tntRCchoixRelais]:eq("+ indice + ")").attr("checked", true);
|
||||
tntRCSetSelectedInfo(indice);
|
||||
});
|
||||
|
||||
relaisMarkers.push(marker);
|
||||
zone_chalandise.extend(marker.getPosition());
|
||||
}
|
||||
|
||||
|
||||
function tntRCInitMap() {
|
||||
|
||||
// Si la carte n'est pas présente, fin de l'initialisation
|
||||
if (!document.getElementById("map_canvas")) return;
|
||||
mapDetected = true;
|
||||
|
||||
// Si une fonction de callback a été définie, un lien est ajouté
|
||||
// dans la popup d'info du marqueur de relais colis
|
||||
if (window.callbackSelectionRelais) callbackLinkMarker = "<a onclick='callbackSelectionRelais();' href='#' style='color:#FF6600'>Choisir ce relais</a>";
|
||||
|
||||
//Ajout du lien pour retour en zoom zone de chalandise
|
||||
var jMapCanvas = $("#map_canvas");
|
||||
jMapCanvas.wrap("<div></div>");
|
||||
jMapCanvas.parent().append("<a class=\"lien_reset\" href=\"#\" onclick=\"javascript:retourZoomChalandise();\" style=\"text-decoration:none;\">Retour à la vue initiale</a>");
|
||||
|
||||
var mapClass = jMapCanvas.attr("class");
|
||||
if (mapClass && mapClass != "") {
|
||||
jMapCanvas.attr("class", "");
|
||||
jMapCanvas.parent().attr("class", mapClass);
|
||||
}
|
||||
|
||||
var myOptions = {
|
||||
zoom: defaultZoom,
|
||||
center: defaultCenter,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
||||
navigationControl: true,
|
||||
scaleControl: true,
|
||||
mapTypeControl: true,
|
||||
streetViewControl: true
|
||||
};
|
||||
|
||||
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
|
||||
|
||||
// If the map position is out of range, move it back
|
||||
function checkBounds() {
|
||||
|
||||
// Perform the check and return if OK
|
||||
var currentBounds = map.getBounds();
|
||||
var cSpan = currentBounds.toSpan(); // width and height of the bounds
|
||||
var offsetX = cSpan.lng() / (2+aberration); // we need a little border
|
||||
var offsetY = cSpan.lat() / (2+aberration);
|
||||
var C = map.getCenter(); // current center coords
|
||||
var X = C.lng();
|
||||
var Y = C.lat();
|
||||
|
||||
// now check if the current rectangle in the allowed area
|
||||
var checkSW = new google.maps.LatLng(C.lat()-offsetY,C.lng()-offsetX);
|
||||
var checkNE = new google.maps.LatLng(C.lat()+offsetY,C.lng()+offsetX);
|
||||
|
||||
if (allowedBounds.contains(checkSW) &&
|
||||
allowedBounds.contains(checkNE)) {
|
||||
return; // nothing to do
|
||||
}
|
||||
|
||||
var AmaxX = allowedBounds.getNorthEast().lng();
|
||||
var AmaxY = allowedBounds.getNorthEast().lat();
|
||||
var AminX = allowedBounds.getSouthWest().lng();
|
||||
var AminY = allowedBounds.getSouthWest().lat();
|
||||
|
||||
if (X < (AminX+offsetX)) {X = AminX + offsetX;}
|
||||
if (X > (AmaxX-offsetX)) {X = AmaxX - offsetX;}
|
||||
if (Y < (AminY+offsetY)) {Y = AminY + offsetY;}
|
||||
if (Y > (AmaxY-offsetY)) {Y = AmaxY - offsetY;}
|
||||
|
||||
map.setCenter(new google.maps.LatLng(Y,X));
|
||||
return;
|
||||
}
|
||||
|
||||
google.maps.event.addListener(map, "drag", function() {
|
||||
checkBounds();
|
||||
});
|
||||
|
||||
google.maps.event.addListener(map, "zoom_changed", function() {
|
||||
if (map.getZoom() < minMapScale) {
|
||||
map.setZoom(minMapScale);
|
||||
}
|
||||
});
|
||||
|
||||
google.maps.event.addListener(map.getStreetView(), "visible_changed", function() {
|
||||
//premier accès lors du chargement de la page, il ne faut pas cacher les markers
|
||||
if (init_streetview == true) {
|
||||
if(map.getStreetView().getVisible() == true) {
|
||||
for (var k = 0; k < relaisMarkers.length; k++) {
|
||||
relaisMarkers[k].setVisible(false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (var k = 0; k < relaisMarkers.length; k++) {
|
||||
relaisMarkers[k].setVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else init_streetview = true;
|
||||
});
|
||||
}
|
||||
|
||||
function retourZoomChalandise() {
|
||||
if(zoomZoneChalandiseDefault){
|
||||
map.setCenter(zoomZoneChalandiseDefault);
|
||||
map.fitBounds(centerZoneChalandiseDefault);
|
||||
}
|
||||
}
|
||||
|
||||
function fromhere() {
|
||||
switchFromTo(contentFrom);
|
||||
}
|
||||
|
||||
function tohere() {
|
||||
switchFromTo(contentTo);
|
||||
}
|
||||
|
||||
function switchFromTo(htmlContent) {
|
||||
var adresse_saisie = $("#saisie").val();
|
||||
$("#trajet").html(htmlContent);
|
||||
$("#point_choisi").attr('value', adresse_pointclic);
|
||||
$("#saisie").val(adresse_saisie);
|
||||
}
|
||||
|
||||
function popup_roadmap() {
|
||||
if($("#saisie").val() == "") return;
|
||||
window.open("http://" + tntDomain + "/public/geolocalisation/print_roadmap.do?mode="+ $("#mode").val() +"&point_choisi="+ $("#point_choisi").val() +"&saisie="+ $("#saisie").val());
|
||||
}
|
||||
|
||||
$().ready(tntB2CRelaisColis);
|
||||