Initial commit

This commit is contained in:
2019-11-20 07:44:43 +01:00
commit 5bf49c4a81
41188 changed files with 5459177 additions and 0 deletions

View File

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>postaldeliv</name>
<displayName><![CDATA[Postal Deliv]]></displayName>
<version><![CDATA[2.1.10]]></version>
<description><![CDATA[Livraison par code postal]]></description>
<author><![CDATA[&eacute;bew&egrave;]]></author>
<tab><![CDATA[shipping_logistics]]></tab>
<is_configurable>1</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@@ -0,0 +1,389 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
class AdminPostalDelivController extends ModuleAdminController
{
public $module = 'postaldeliv';
public $bootstrap = true;
public function __construct()
{
$this->table = 'postaldeliv';
$this->className = 'PostalDelivModel';
parent::__construct();
$this->bulk_actions = array(
'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'),
'icon' => 'icon-trash')
);
$this->addRowAction('edit');
$this->addRowAction('delete');
$this->identifier = 'id_postaldeliv';
$this->context = Context::getContext();
}
public function setMedia($isNewTheme = false)
{
parent::setMedia($isNewTheme);
$this->addJqueryPlugin('tagify');
}
public function initPageHeaderToolbar()
{
if (empty($this->display)) {
$this->page_header_toolbar_btn['new_rule'] = array(
'href' => self::$currentIndex.'&addpostaldeliv&token='.$this->token,
'desc' => $this->l('Add new rule', null, null, false),
'icon' => 'process-icon-new'
);
}
$this->page_header_toolbar_btn['support'] = array(
'href' => 'https://addons.prestashop.com/contact-community.php?id_product=4891',
'desc' => $this->l('Ask the developer for support', null, null, false),
'icon' => 'process-icon-1 icon-info-circle',
'target' => true
);
$this->page_header_toolbar_btn['rate'] = array(
'href' => 'http://addons.prestashop.com/fr/ratings.php?id_product=4891',
'desc' => $this->l('Comment and rate the module', null, null, false),
'icon' => 'process-icon-1 icon-star',
'target' => true
);
parent::initPageHeaderToolbar();
}
/**
* Function used to render the list to display for this controller
*/
public function renderList()
{
$this->fields_list = array(
'id_postaldeliv' => array(
'title' => $this->l('ID'),
'align' => 'center',
'width' => 40,
'search' => false,
),
'carrier' => array(
'title' => $this->l('Carrier'),
'width' => 40,
'search' => false,
),
'available' => array(
'title' => $this->l('Availability'),
'width' => 40,
'search' => false,
'callback' => 'displayHumanReadableAvailability',
),
'country' => array(
'title' => $this->l('Country'),
'width' => 40,
'search' => false,
'callback' => 'displayHumanReadableCountry',
),
'postcode' => array(
'title' => $this->l('Postcode'),
'width' => 40,
'search' => false,
),
'county' => array(
'title' => $this->l('County'),
'width' => 40,
'search' => false,
),
'range' => array(
'title' => $this->l('Range'),
'width' => 40,
'search' => false,
'callback' => 'renderRange',
),
);
$this->_select = 'c.`name` as carrier';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'postaldeliv_shop` b ON (b.`id_postaldeliv` = a.`id_postaldeliv`)
LEFT JOIN `'._DB_PREFIX_.'carrier` c ON (c.`id_carrier` = a.`id_carrier`)';
$this->_where = ' AND b.id_shop IN ('.implode(',', array_map('intval', Shop::getContextListShopID())).')';
$this->_group = 'GROUP BY a.`id_postaldeliv`';
return parent::renderList();
}
/**
* Function used to render the form for this controller
*/
public function renderForm()
{
if (Shop::isFeatureActive()) {
$shop_array = array(
'type' => 'select',
'multiple' => true,
'label' => $this->l('Shops'),
'name' => 'shop[]',
'class' => 'chosen',
'options' => array(
'query' => Shop::getShops(),
'id' => 'id_shop',
'name' => 'name',
'default' => array(
'label' => $this->l('All shops'),
'value' => 0
)
)
);
} else {
$shop_array = array(
'type' => 'hidden',
'name' => 'shop[]',
);
}
$this->fields_form = array(
'tinymce' => true,
'legend' => array(
'title' => $this->l('Configure your delivery restriction'),
'icon' => 'icon-globe'
),
'input' => array(
$shop_array,
array(
'type' => 'select',
'multiple' => true,
'label' => $this->l('Countries'),
'name' => 'countries[]',
'class' => 'chosen',
'options' => array(
'query' => Country::getCountries((int)$this->context->language->id, true),
'id' => 'id_country',
'name' => 'name',
'default' => array(
'label' => $this->l('All countries'),
'value' => 0
)
)
),
array(
'type' => 'select',
'label' => $this->l('Carrier'),
'name' => 'id_carrier',
'options' => array(
'query' => Carrier::getCarriers(
(int)$this->context->language->id,
true,
false,
false,
null,
Carrier::ALL_CARRIERS
),
'id' => 'id_carrier',
'name' => 'name',
)
),
array(
'type' => 'switch',
'label' => $this->l('Availability'),
'name' => 'available',
'required' => false,
'is_bool' => true,
'values' => array(
array(
'id' => 'available_on',
'value' => 1,
'label' => $this->l('Available')
),
array(
'id' => 'available_off',
'value' => 0,
'label' => $this->l('Unavailable')
),
)
),
array(
'type' => 'tags',
'label' => $this->l('For the following postcodes'),
'name' => 'postcode',
'hint' => array(
$this->l('Separate your postcodes with commas like so: 75001,75002,').'<br><br>'
.$this->l('You can use any format of postcodes as long as you separate them with commas'),
),
),
array(
'type' => 'range',
'label' => $this->l('Or postcodes between'),
'name' => 'range',
'class' => 'inline fixed-width-lg',
'hint' => $this->l('This function only works for numerical postcodes'),
),
array(
'type' => 'tags',
'label' => $this->l('Or the postcodes starting with'),
'name' => 'county',
'hint' => $this->l('Separate your codes with commas like so: 75,76,'),
),
),
'submit' => array(
'title' => $this->l('Save')
)
);
if (Tools::getValue('id_postaldeliv')) {
$object = $this->loadObject(true);
$this->fields_value['shop[]'] = $object->getShops();
$this->fields_value['countries[]'] = explode(',', $object->country);
$this->fields_value['range'] = unserialize($object->range);
} else {
$this->fields_value['shop[]'] = Shop::getContextListShopID();
}
if (!Shop::isFeatureActive()) {
$this->fields_value['shop[]'] = $this->context->shop->id;
}
return parent::renderForm();
}
protected function afterAdd($object)
{
$country = Tools::getValue('countries');
// handles countries associations
if (empty($country) || $country == 0 || in_array(0, $country)) {
$country = array(0);
}
$country = implode(',', $country);
$object->country = $country;
// handles ranges
$range_count = Tools::getValue('range_count');
$range = array();
for ($i=0; $i<=$range_count; $i++) {
if (Tools::getIsset('range_from_'.$i) && Tools::getIsset('range_to_'.$i)) {
$range_from = Tools::getValue('range_from_'.$i);
$range_to = Tools::getValue('range_to_'.$i);
if (!Tools::isEmpty($range_from) && !Tools::isEmpty($range_to)) {
$range[] = array(Tools::getValue('range_from_'.$i), Tools::getValue('range_to_'.$i));
}
}
}
$object->range = serialize($range);
// Save country and range
$object->save();
// handles shops associations
$shop = Tools::getValue('shop');
$object->saveShops($shop);
return true;
}
protected function afterUpdate($object)
{
$country = Tools::getValue('countries');
// handles countries associations
if (empty($country) || $country == 0 || in_array(0, $country)) {
$country = array(0);
}
$country = implode(',', $country);
$object->country = $country;
$range_count = Tools::getValue('range_count');
$range = array();
for ($i=0; $i<=$range_count; $i++) {
if (Tools::getIsset('range_from_'.$i) && Tools::getIsset('range_to_'.$i)) {
$range_from = Tools::getValue('range_from_'.$i);
$range_to = Tools::getValue('range_to_'.$i);
if (!Tools::isEmpty($range_from) && !Tools::isEmpty($range_to)) {
$range[] = array(Tools::getValue('range_from_'.$i), Tools::getValue('range_to_'.$i));
}
}
}
$object->range = serialize($range);
$object->save();
if (Shop::isFeatureActive()) {
// handles shops associations
$shop = Tools::getValue('shop');
$object->saveShops($shop);
}
return true;
}
public static function displayHumanReadableCountry($countries)
{
$class = new AdminPostalDelivController();
if (empty($countries) || is_null($countries)) {
return $class->l('All countries');
}
$countries = explode(',', $countries);
$names = array();
foreach ($countries as $id_country) {
$country = new Country((int)$id_country);
$names[] = $country->name[Context::getContext()->language->id];
}
return implode(',', $names);
}
public static function displayHumanReadableAvailability($available)
{
$class = new AdminPostalDelivController();
if (empty($available) || is_null($available)) {
return $class->l('unavailable for');
} else {
return $class->l('available for');
}
}
public static function renderRange($echo)
{
if (Tools::isEmpty($echo)) {
return '--';
}
$range_array = unserialize($echo);
$range_string = '';
foreach ($range_array as $range) {
$range_string .= $range[0].'->'.$range[1].'; ';
}
return $range_string;
}
}

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,96 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package PostalDeliv
* Support by mail : contact@ebewe.net
*/
class PostalDelivModel extends ObjectModel
{
public $id;
public $id_postaldeliv;
public $id_carrier;
public $country;
public $postcode;
public $county;
public $range;
public $available;
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'postaldeliv',
'primary' => 'id_postaldeliv',
'fields' => array(
'id_carrier' => array('type' => self::TYPE_INT),
'country' => array('type' => self::TYPE_STRING),
'postcode' => array('type' => self::TYPE_STRING, 'validate' => 'isString'),
'county' => array('type' => self::TYPE_STRING, 'validate' => 'isString'),
'range' => array('type' => self::TYPE_STRING, 'validate' => 'isString'),
'available' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
),
);
public function delete()
{
parent::delete();
Db::getInstance()->delete('postaldeliv_shop', 'id_postaldeliv = '.(int)$this->id);
return true;
}
public function getShops()
{
$id_shops = Db::getInstance()->executeS('SELECT `id_shop` FROM `'._DB_PREFIX_.'postaldeliv_shop`
WHERE `id_postaldeliv` = '.(int)$this->id);
$results = array();
foreach ($id_shops as $id_shop) {
$results[] = $id_shop['id_shop'];
}
return $results;
}
public function saveShops($shop)
{
Db::getInstance()->delete('postaldeliv_shop', 'id_postaldeliv = '.(int)$this->id);
$id_shops = array();
if (Shop::isFeatureActive()) {
if (empty($shop) || $shop == 0 || $shop == array(0) || in_array(0, $shop)) {
$shop = Shop::getCompleteListOfShopsID();
}
foreach ($shop as $id_shop) {
$id_shops[] = array('id_postaldeliv' => (int)$this->id, 'id_shop' => (int)$id_shop);
}
} else {
$id_shops[] = array('id_postaldeliv' => (int)$this->id, 'id_shop' => (int)$shop);
}
Db::getInstance()->insert('postaldeliv_shop', $id_shops);
return true;
}
}

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,349 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
class Carrier extends CarrierCore
{
const SHIPPING_PRICE_EXCEPTION = 0;
const SHIPPING_WEIGHT_EXCEPTION = 1;
const SHIPPING_SIZE_EXCEPTION = 2;
/**
* Return the carrier name from the shop name (e.g. if the carrier name is '0').
*
* The returned carrier name is the shop name without '#' and ';' because this is not the same validation.
*
* @return string Carrier name
*/
public static function getCarrierNameFromShopName()
{
return str_replace(
array('#', ';'),
'',
Configuration::get('PS_SHOP_NAME')
);
}
/**
* Check if postcode starts with code
*
* Created for Postal Deliv
*/
private static function __startsWith($haystack, $needles)
{
foreach ((array)$needles as $needle) {
if ($needle != '' && strpos($haystack, $needle) === 0) {
return true;
}
}
return false;
}
/**
* Get all carriers in a given language
*
* @param integer $id_lang Language id
* @param $modules_filters, possible values:
PS_CARRIERS_ONLY
CARRIERS_MODULE
CARRIERS_MODULE_NEED_RANGE
PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE
ALL_CARRIERS
* @param boolean $active Returns only active carriers when true
* @return array Carriers
* Created for Postal Deliv
*/
public static function getCarriers2(
$id_lang,
$active = false,
$delete = false,
$id_zone = false,
$ids_group = null,
$modules_filters = self::PS_CARRIERS_ONLY,
$postcode = false,
$id_country = false
) {
// Filter by groups and no groups => return empty array
if ($ids_group && (!is_array($ids_group) || !count($ids_group))) {
return array();
}
$sql = '
SELECT c.*, cl.delay
FROM `'._DB_PREFIX_.'carrier` c
LEFT JOIN `'._DB_PREFIX_.'carrier_lang` cl ON (c.`id_carrier` = cl.`id_carrier`
AND cl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('cl').')
LEFT JOIN `'._DB_PREFIX_.'carrier_zone` cz ON (cz.`id_carrier` = c.`id_carrier`)'.
($id_zone ? 'LEFT JOIN `'._DB_PREFIX_.'zone` z ON (z.`id_zone` = '.(int)$id_zone.')' : '').'
'.Shop::addSqlAssociation('carrier', 'c').'
WHERE c.`deleted` = '.($delete ? '1' : '0');
if ($active) {
$sql .= ' AND c.`active` = 1 ';
}
if ($id_zone) {
$sql .= ' AND cz.`id_zone` = '.(int)$id_zone.' AND z.`active` = 1 ';
}
if ($ids_group) {
$sql .= ' AND EXISTS (SELECT 1 FROM '._DB_PREFIX_.'carrier_group
WHERE '._DB_PREFIX_.'carrier_group.id_carrier = c.id_carrier
AND id_group IN ('.implode(',', array_map('intval', $ids_group)).')) ';
}
switch ($modules_filters) {
case 1:
$sql .= ' AND c.is_module = 0 ';
break;
case 2:
$sql .= ' AND c.is_module = 1 ';
break;
case 3:
$sql .= ' AND c.is_module = 1 AND c.need_range = 1 ';
break;
case 4:
$sql .= ' AND (c.is_module = 0 OR c.need_range = 1) ';
break;
}
$sql .= ' GROUP BY c.`id_carrier` ORDER BY c.`position` ASC';
$cache_id = 'Carrier::getCarriers_'.md5($sql);
if (!Cache::isStored($cache_id)) {
$carriers = Db::getInstance()->executeS($sql);
Cache::store($cache_id, $carriers);
} else {
$carriers = Cache::retrieve($cache_id);
}
/* Postal Deliv START */
foreach ($carriers as $key => $carrier) {
if (Module::isEnabled('postaldeliv') && $postcode != false && $id_country != false) {
$postcode = Tools::strtoupper($postcode);
// Check if carrier has limitation
$rules = Db::getInstance()->executeS('
SELECT * FROM `'._DB_PREFIX_.'postaldeliv` a
LEFT JOIN `'._DB_PREFIX_.'postaldeliv_shop` b ON (b.`id_postaldeliv` = a.`id_postaldeliv`)
WHERE a.`id_carrier`='.(int)$carrier['id_carrier'].'
AND b.`id_shop`='.(int)Context::getContext()->shop->id);
if ($rules) {
$available_rules = array();
foreach ($rules as $rule) {
$countries = explode(',', $rule['country']);
if (in_array(0, $countries) || in_array($id_country, $countries)) {
$available_rules[] = $rule;
}
}
foreach ($available_rules as $rule) {
$countries = explode(',', $rule['country']);
// Check if rule is applied to the country
if (in_array(0, $countries) || in_array($id_country, $countries)) {
$in_postcode = in_array($postcode, explode(',', Tools::strtoupper($rule['postcode'])));
$starts_with = Carrier::__startsWith(
$postcode,
explode(',', Tools::strtoupper($rule['county']))
);
// Check if postcode is in one of the ranges
$in_range = false;
if ($ranges = unserialize($rule['range'])) {
foreach ($ranges as $range) {
if ($postcode >= $range[0] && $postcode <= $range[1]) {
$in_range = true;
}
}
}
if (($rule['available'] == '0' && ($in_postcode || $starts_with || $in_range))
|| ($rule['available'] == '1' && !$in_postcode && !$starts_with && !$in_range)) {
unset($carriers[$key]['id_carrier']);
} elseif ($carrier['name'] == '0') {
$carriers[$key]['name'] = Carrier::getCarrierNameFromShopName();
}
} else {
if ($rule['available'] == '1') {
unset($carriers[$key]['id_carrier']);
}
}
}
}
}
}
/* Postal Deliv END */
return $carriers;
}
/**
* Get available Carriers for Order
*
* @param int $id_zone Zone ID
* @param array $groups Group of the Customer
* @param Cart|null $cart Optional Cart object
* @param array &$error Contains an error message if an error occurs
*
* @return array Carriers for the order
* Modified for Postal Deliv
*/
public static function getCarriersForOrder($id_zone, $groups = null, $cart = null, &$error = array())
{
$context = Context::getContext();
$id_lang = $context->language->id;
if (is_null($cart)) {
$cart = $context->cart;
}
if (isset($context->currency)) {
$id_currency = $context->currency->id;
}
/* Postal Deliv START */
$postcode = '';
if (isset($context->cookie->postcode)) {
$postcode = $context->cookie->postcode;
$id_country = $context->cookie->id_country;
} elseif (Tools::getIsset('id_address_delivery')) {
$id_address = Tools::getValue('id_address_delivery');
$address = new Address((int)$id_address);
$postcode = $address->postcode;
$id_country = $address->id_country;
} else {
$id_address = $cart->id_address_delivery;
$address = new Address((int)$id_address);
$postcode = $address->postcode;
$id_country = $address->id_country;
}
if (is_array($groups) && !empty($groups)) {
$result = Carrier::getCarriers2(
$id_lang,
true,
false,
(int)$id_zone,
$groups,
self::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE,
$postcode,
$id_country
);
} else {
$result = Carrier::getCarriers2(
$id_lang,
true,
false,
(int)$id_zone,
array(Configuration::get('PS_UNIDENTIFIED_GROUP')),
self::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE,
$postcode,
$id_country
);
}
$results_array = array();
/* Postal Deliv END */
foreach ($result as $k => $row) {
/* Postal Deliv START */
if (isset($row['id_carrier'])) {
/* Postal Deliv END */
$carrier = new Carrier((int)$row['id_carrier']);
$shipping_method = $carrier->getShippingMethod();
if ($shipping_method != Carrier::SHIPPING_METHOD_FREE) {
// Get only carriers that are compliant with shipping method
if (($shipping_method == Carrier::SHIPPING_METHOD_WEIGHT
&& $carrier->getMaxDeliveryPriceByWeight($id_zone) === false)) {
$error[$carrier->id] = Carrier::SHIPPING_WEIGHT_EXCEPTION;
unset($result[$k]);
continue;
}
if (($shipping_method == Carrier::SHIPPING_METHOD_PRICE
&& $carrier->getMaxDeliveryPriceByPrice($id_zone) === false)) {
$error[$carrier->id] = Carrier::SHIPPING_PRICE_EXCEPTION;
unset($result[$k]);
continue;
}
// If out-of-range behavior carrier is set to "Deactivate carrier"
if ($row['range_behavior']) {
// Get id zone
if (!$id_zone) {
$id_zone = (int)Country::getIdZone(Country::getDefaultCountryId());
}
// Get only carriers that have a range compatible with cart
if ($shipping_method == Carrier::SHIPPING_METHOD_WEIGHT
&& (!Carrier::checkDeliveryPriceByWeight(
$row['id_carrier'],
$cart->getTotalWeight(),
$id_zone
))) {
$error[$carrier->id] = Carrier::SHIPPING_WEIGHT_EXCEPTION;
unset($result[$k]);
continue;
}
if ($shipping_method == Carrier::SHIPPING_METHOD_PRICE
&& (!Carrier::checkDeliveryPriceByPrice(
$row['id_carrier'],
$cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING),
$id_zone,
$id_currency
))) {
$error[$carrier->id] = Carrier::SHIPPING_PRICE_EXCEPTION;
unset($result[$k]);
continue;
}
}
}
$row['name'] = ((string)$row['name'] != '0' ? $row['name'] : Carrier::getCarrierNameFromShopName());
$row['price'] = (($shipping_method == Carrier::SHIPPING_METHOD_FREE) ? 0 :
$cart->getPackageShippingCost((int)$row['id_carrier'], true, null, null, $id_zone));
$row['price_tax_exc'] = (($shipping_method == Carrier::SHIPPING_METHOD_FREE) ? 0 :
$cart->getPackageShippingCost((int)$row['id_carrier'], false, null, null, $id_zone));
$row['img'] = file_exists(_PS_SHIP_IMG_DIR_.(int)$row['id_carrier'].'.jpg') ?
_THEME_SHIP_DIR_.(int)$row['id_carrier'].'.jpg' : '';
// If price is false, then the carrier is unavailable (carrier module)
if ($row['price'] === false) {
unset($result[$k]);
continue;
}
$results_array[] = $row;
/* Postal Deliv START */
}
/* Postal Deliv END */
}
// if we have to sort carriers by price
$prices = array();
if (Configuration::get('PS_CARRIER_DEFAULT_SORT') == Carrier::SORT_BY_PRICE) {
foreach ($results_array as $r) {
$prices[] = $r['price'];
}
if (Configuration::get('PS_CARRIER_DEFAULT_ORDER') == Carrier::SORT_BY_ASC) {
array_multisort($prices, SORT_ASC, SORT_NUMERIC, $results_array);
} else {
array_multisort($prices, SORT_DESC, SORT_NUMERIC, $results_array);
}
}
return $results_array;
}
}

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,185 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Loading Models
*/
require_once(_PS_MODULE_DIR_.'postaldeliv/models/PostalDeliv.php');
class Postaldeliv extends Module
{
/**
* DB file
*/
const INSTALL_SQL_FILE = 'install.sql';
const UNINSTALL_SQL_FILE = 'uninstall.sql';
public function __construct()
{
$this->name = 'postaldeliv';
$this->tab = 'shipping_logistics';
$this->version = '2.1.10';
$this->author = 'ébewè';
$this->need_instance = 0;
$this->module_key = 'ccc93a38bc63cb123994eed42f533a5c';
parent::__construct();
$this->displayName = $this->l('Postal Deliv');
$this->description = $this->l('Delivery by postal code');
}
/**
* Install Module
*
**/
public function install()
{
if (!parent::install()
|| !$this->registerHook('actionCarrierUpdate')
|| !$this->registerHook('displayBackOfficeHeader')
|| !$this->installModuleTab(
'AdminPostalDeliv',
array((int)Configuration::get('PS_LANG_DEFAULT')=>'Postal Deliv'),
'AdminParentShipping'
)
|| !$this->__executeSql(self::INSTALL_SQL_FILE)) {
return false;
}
return true;
}
/**
* Uninstall Module
*
**/
public function uninstall()
{
if (!parent::uninstall()
|| !$this->uninstallModuleTab('AdminPostalDeliv')
|| !$this->__executeSql(self::UNINSTALL_SQL_FILE)) {
return false;
}
return true;
}
/**
* install Tab
*
* @param mixed $tabClass
* @param mixed $tabName
* @param mixed $idTabParent
* @return bool $pass
*/
private function installModuleTab($tabClass, $tabName, $idTabParent)
{
$idTab = Tab::getIdFromClassName($idTabParent);
$pass = true;
$tab = new Tab();
$tab->name = $tabName;
$tab->class_name = $tabClass;
$tab->module = $this->name;
$tab->id_parent = $idTab;
$pass = $tab->save();
return $pass;
}
/**
* uninstall Tab
*
* @param mixed $tabClass
* @return bool $pass
*/
private function uninstallModuleTab($tabClass)
{
$pass = true;
@unlink(_PS_IMG_DIR_.'t/'.$tabClass.'.gif');
$idTab = Tab::getIdFromClassName($tabClass);
if ($idTab != 0) {
$tab = new Tab($idTab);
$pass = $tab->delete();
}
return $pass;
}
/**
* Create / Remove Table
*/
private function __executeSql($file)
{
if (!file_exists(dirname(__FILE__) . '/sql/' . $file)) {
return false;
} elseif (!$sql = Tools::file_get_contents(dirname(__FILE__).'/sql/'.$file)) {
return false;
}
$sql = str_replace(array('PREFIX_', 'ENGINE_TYPE'), array(_DB_PREFIX_, _MYSQL_ENGINE_), $sql);
// Insert default template data
$sql = str_replace('THE_FIRST_DEFAULT', serialize(array('width' => 1, 'height' => 1)), $sql);
$sql = str_replace('FLY_IN_DEFAULT', serialize(array('width' => 1, 'height' => 1)), $sql);
$sql = preg_split("/;\s*[\r\n]+/", trim($sql));
foreach ($sql as $query) {
if (!Db::getInstance()->execute(trim($query))) {
return false;
}
}
return true;
}
public function hookDisplayBackOfficeHeader()
{
if (version_compare(_PS_VERSION_, '1.6.0', '>=') === true
&& Tools::getValue('controller') == 'AdminPostalDeliv') {
$this->context->controller->addJquery();
$this->context->controller->addJs($this->_path.'views/js/postaldeliv.js');
$this->context->controller->addCss($this->_path.'views/css/postaldeliv.css');
}
}
public function hookActionCarrierUpdate($params)
{
$result = Db::getInstance()->getValue('
SELECT MAX(id_carrier)
FROM `'._DB_PREFIX_.'carrier`');
Db::getInstance()->Execute('
UPDATE `'._DB_PREFIX_.'postaldeliv`
SET `id_carrier`='.(int)$result.'
WHERE `id_carrier`='.(int)$params['id_carrier']);
}
/**
* Admin page
*/
public function getContent()
{
Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminPostalDeliv'));
}
}

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2014 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-2014 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
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;

View File

@@ -0,0 +1,16 @@
/* Postal Deliv */
CREATE TABLE IF NOT EXISTS `PREFIX_postaldeliv` (
`id_postaldeliv` int(10) unsigned NOT NULL AUTO_INCREMENT,
`id_carrier` int(10) unsigned NOT NULL,
`country` text NOT NULL,
`postcode` text NOT NULL,
`county` text NOT NULL,
`range` text NOT NULL,
`available` tinyint(1) NOT NULL,
PRIMARY KEY (`id_postaldeliv`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=UTF8;
CREATE TABLE IF NOT EXISTS `PREFIX_postaldeliv_shop` (
`id_postaldeliv` int(11) unsigned NOT NULL,
`id_shop` int(11) unsigned NOT NULL
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=UTF8;

View File

@@ -0,0 +1 @@
DROP TABLE IF EXISTS `PREFIX_postaldeliv`, `PREFIX_postaldeliv_shop`;

View File

@@ -0,0 +1,37 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{postaldeliv}prestashop>postaldeliv_ce4c50dc71d48129439ac3e3aa1add2f'] = 'Postal Deliv';
$_MODULE['<{postaldeliv}prestashop>postaldeliv_c7b990a3acb785ff77e2ef516264d9ca'] = 'Livraison par code postal';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Supprimer la sélection';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Supprimer les éléments sélectionnés ?';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_12d97e7a87922a58b6ec8414c504a042'] = 'Ajouter une nouvelle règle';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_ec6f42d496d7c24b24fb542d63d4991a'] = 'Demander de l\'aide au développeur';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_5b0a00c63b94c11f0764d6e13ea068bd'] = 'Commenter et noter le module';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_b718adec73e04ce3ec720dd11a06a308'] = 'ID';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_914419aa32f04011357d3b604a86d7eb'] = 'Transporteur';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_faeaec9eda6bc4c8cb6e1a9156a858be'] = 'Disponibilité';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_59716c97497eb9694541f7c3d37b1a4d'] = 'Pays';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_8bcdc441379cbf584638b0589a3f9adb'] = 'Code postal';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_e25b163360646e8f71af8a8ee0fad1a3'] = 'Département';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_87ba2ecc8b6915e8bd6f5089918229fd'] = 'Fourchette';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_12a521af593422cd508f7707662c9eb2'] = 'Boutiques';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_804ccd6219996d12eda865d1c0707423'] = 'Toutes les boutiques';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_d411309c16b9403930ea1c6f90a4835d'] = 'Configurez vos restrictions d\'envoi';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_790d59ef178acbc75d233bf4211763c6'] = 'Pays';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_c3987e4cac14a8456515f0d200da04ee'] = 'Tous les pays';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_78945de8de090e90045d299651a68a9b'] = 'Disponible';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_453e6aa38d87b28ccae545967c53004f'] = 'Indisponible';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_f47bc7ebabe107e4f9225e66a2f3a3b3'] = 'Pour les codes postaux suivants';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_388ede8232eb61bf35187c7a3e8ab31b'] = 'Séparez vos codes postaux avec des virgules comme suit: 75001,75002,';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_2cc38c0166c33e21f1c78d58843598cc'] = 'Vous pouvez utiliser tout type de format de codes postaux tant que ceux-ci sont séparés par des virgules.';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_d8915368220d2391096720a3d0c77275'] = 'Ou les codes postaux entre';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_1cd87238b0147bbebbed92e34f7109ba'] = 'Cette option ne fonctionne que pour les codes postaux numériques';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_1162d6b40a56d67ce3776c0c0a1eae8c'] = 'Ou les codes postaux commençant par';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_449ed49f0ad7a84787701ab960bf6a0b'] = 'Séparez vos codes par des virgules comme suit: 75, 76,';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_5f7af01f5e84e2043c3b3921d80cd1a0'] = 'indisponible pour';
$_MODULE['<{postaldeliv}prestashop>adminpostaldelivcontroller_179a91af16b74720becdf2c95a17861d'] = 'disponible pour';
$_MODULE['<{postaldeliv}prestashop>form_be5d5d37542d75f93a87094459f76678'] = 'et';
$_MODULE['<{postaldeliv}prestashop>form_9a33e3afba05711d4398d033d392c446'] = 'Êtes-vous sûr de vouloir supprimer cette fourchette ?';

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,42 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Function used to update your module from previous versions to the version 2.2.2,
* Don't forget to create one file per version.
*/
function upgrade_module_2_0_3($object)
{
if (!$object->uninstallOverrides()
|| !$object->installOverrides()) {
return false;
}
return true;
}

View File

@@ -0,0 +1,95 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package PostalDeliv
* Support by mail : contact@ebewe.net
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Function used to update your module from previous versions to the version 2.1.0,
* Don't forget to create one file per version.
*/
function upgrade_module_2_1_0($object)
{
// Update tab link
$idTab = Tab::getIdFromClassName('PostDeliv');
if ($idTab != 0) {
$tab = new Tab($idTab);
$tab->class_name = 'AdminPostalDeliv';
$pass = $tab->save();
if (!$pass) {
return false;
}
}
// Update postaldeliv table
if (!Db::getInstance()->execute('
ALTER TABLE `'._DB_PREFIX_.'postaldeliv`
ADD `country` TEXT NOT NULL,
ADD `range` TEXT NOT NULL
')) {
return false;
}
// Set All countries for each carrier
if (!Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'postaldeliv`
SET `country` = 0
WHERE 1')) {
return false;
}
// Update ranges from postaldeliv_range to postaldeliv
$ranges = Db::getInstance()->executeS('SELECT *
FROM `'._DB_PREFIX_.'postaldeliv_range`
');
$ranges_array = array();
foreach ($ranges as $range) {
$ranges_array[$range['id_carrier']][] = array($range['from'], $range['to']);
}
foreach ($ranges_array as $id_carrier => $range_array) {
$range_array = serialize($range_array);
if (!Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'postaldeliv`
SET `range` = "'.pSQL($range_array).'"
WHERE `id_carrier` = '.(int)$id_carrier)) {
return false;
}
}
// Delete postaldeliv_range table
if (!Db::getInstance()->execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'postaldeliv_range`')) {
return false;
}
// Update Overrides
if (!$object->uninstallOverrides()
|| !$object->installOverrides()) {
return false;
}
return true;
}

View File

@@ -0,0 +1,69 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Function used to update your module from previous versions to the version 2.1.1,
* Don't forget to create one file per version.
*/
function upgrade_module_2_1_1($object)
{
// Update postaldeliv table and create postaldeliv_shop
if (!Db::getInstance()->execute('
ALTER TABLE `'._DB_PREFIX_.'postaldeliv`
DROP `id_shop`;
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'postaldeliv_shop` (
`id_postaldeliv` int(11) unsigned NOT NULL,
`id_shop` int(11) unsigned NOT NULL
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;
')) {
return false;
}
// Update id_shop for each id_postaldeliv
$shop = Shop::getContextListShopID();
$id_postaldelivs = Db::getInstance()->executeS('SELECT `id_postaldeliv` FROM `'._DB_PREFIX_.'postaldeliv`');
$id_shops = array();
foreach ($id_postaldelivs as $id) {
foreach ($shop as $id_shop) {
$id_shops[] = array('id_postaldeliv' => (int)$id['id_postaldeliv'], 'id_shop' => (int)$id_shop);
}
}
if (!Db::getInstance()->insert('postaldeliv_shop', $id_shops)) {
return false;
}
if (!$object->uninstallOverrides()
|| !$object->installOverrides()) {
return false;
}
return true;
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Function used to update your module from previous versions to the version 2.1.1,
* Don't forget to create one file per version.
*/
function upgrade_module_2_1_3($object)
{
if (!$object->uninstallOverrides()
|| !$object->installOverrides()) {
return false;
}
return true;
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
if (!defined('_PS_VERSION_')) {
exit;
}
/**
* Function used to update your module from previous versions to the version 2.1.1,
* Don't forget to create one file per version.
*/
function upgrade_module_2_1_4($object)
{
if (!$object->uninstallOverrides()
|| !$object->installOverrides()) {
return false;
}
return true;
}

View File

@@ -0,0 +1,38 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
if (!defined('_PS_VERSION_')) {
exit;
}
function upgrade_module_2_1_7($object)
{
if (!$object->uninstallOverrides()
|| !$object->installOverrides()) {
return false;
}
return true;
}

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,9 @@
.bootstrap input.inline {
display: inline !important;
}
.postal_range {
margin-bottom: 10px;
}
.icon-plus-sign, .icon-minus-sign {
cursor: pointer;
}

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,46 @@
/*
* 2007-2016 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 Paul MORA
* @copyright Copyright (c) 2011-2018 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
$(document).ready(function(){
$('.adminpostaldeliv').on('click', 'i.icon-plus-sign', function(){
data_range_plus = parseInt( $(this).attr('data-range') ) + 1;
data_range = parseInt( $(this).attr('data-range') );
$(this).before(
'<div class="postal_range">' +
'<input type="text" name="range_from_'+ data_range +'" class="inline fixed-width-lg">' +
' ' + data_and + ' ' +
'<input type="text" name="range_to_'+ data_range +'" class="inline fixed-width-lg">' + ' ' +
'<i data-range="'+ data_range +'" class="icon-minus-sign"></i>' +
'</div>');
$(this).attr('data-range', data_range_plus);
$('#range_count').val(data_range_plus);
}).on('click', 'i.icon-minus-sign', function(){
conf = confirm( data_delete_confirm );
if ( conf == true )
$(this).parent().remove();
});
});

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,58 @@
{*
* 2007-2015 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 Paul MORA
* @copyright Copyright (c) 2011-2019 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*}
{extends file="helpers/form/form.tpl"}
{block name="input"}
{$smarty.block.parent}
{if $input.type == 'range'}
{foreach from=$fields_value[$input.name] item=field_value name=field}
<div class="postal_range">
<input type="text"
name="{$input.name|escape:'html':'UTF-8'}_from_{$smarty.foreach.field.index|escape:'html':'UTF-8'}"
value="{$field_value[0]|escape:'html':'UTF-8'}"
class="{if isset($input.class)}{$input.class|escape:'html':'UTF-8'}{/if}"
/>
{l s='and' mod='postaldeliv'}
<input type="text"
name="{$input.name|escape:'html':'UTF-8'}_to_{$smarty.foreach.field.index|escape:'html':'UTF-8'}"
value="{$field_value[1]|escape:'html':'UTF-8'}"
class="{if isset($input.class)}{$input.class|escape:'html':'UTF-8'}{/if}"
/>
{if $field_value[0] != '' || $field_value[1] != ''}
<i class="icon-minus-sign" data-range="{$smarty.foreach.field.index|escape:'html':'UTF-8'}"></i>
{/if}
</div>
{/foreach}
<i class="icon-plus-sign" data-range="{$smarty.foreach.field.iteration|escape:'html':'UTF-8'}"></i>
<input value="{$smarty.foreach.field.iteration|escape:'html':'UTF-8'}" type="hidden" name="{$input.name|escape:'html':'UTF-8'}_count" id="{$input.name|escape:'html':'UTF-8'}_count">
{/if}
{/block}
{block name="after"}
{addJsDefL name=data_and}{l s='and' mod='postaldeliv' js=1}{/addJsDefL}
{addJsDefL name=data_delete_confirm}{l s='Are you sure you want to delete this range ?' mod='postaldeliv' js=1}{/addJsDefL}
{/block}

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;

View File

@@ -0,0 +1,36 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to a commercial license from EURL ébewè - www.ebewe.net
* Use, copy, modification or distribution of this source file without written
* license agreement from the EURL ébewè is strictly forbidden.
* In order to obtain a license, please contact us: contact@ebewe.net
* ...........................................................................
* INFORMATION SUR LA LICENCE D'UTILISATION
*
* L'utilisation de ce fichier source est soumise a une licence commerciale
* concedee par la societe EURL ébewè - www.ebewe.net
* Toute utilisation, reproduction, modification ou distribution du present
* fichier source sans contrat de licence ecrit de la part de la EURL ébewè est
* expressement interdite.
* Pour obtenir une licence, veuillez contacter la EURL ébewè a l'adresse: contact@ebewe.net
* ...........................................................................
*
* @author Paul MORA
* @copyright Copyright (c) 2011-2017 EURL ébewè - www.ebewe.net - Paul MORA
* @license Commercial license
* @package Postaldeliv
* Support by mail : contact@ebewe.net
*/
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;