From 7ae0041dbb2e3adfe7c9038bd6795de3bdb2e8ab Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 27 Apr 2022 19:41:57 +0530 Subject: [PATCH] Remove vatnumber --- .../default/template/helpers/form/form.tpl | 1 - classes/helper/HelperForm.php | 1 - controllers/admin/AdminProductsController.php | 2 - js/admin.js | 15 - modules/vatnumber/CHANGELOG.txt | 16 - modules/vatnumber/VATNumberTaxManager.php | 45 --- modules/vatnumber/ajax.php | 30 -- modules/vatnumber/index.php | 36 -- modules/vatnumber/logo.gif | Bin 1025 -> 0 bytes modules/vatnumber/logo.png | Bin 1749 -> 0 bytes modules/vatnumber/translations/index.php | 35 -- modules/vatnumber/upgrade/install-2.0.php | 9 - modules/vatnumber/vatnumber.php | 313 ------------------ modules/vatnumber/views/index.php | 35 -- .../admin/_configure/helpers/form/form.tpl | 52 --- .../admin/_configure/helpers/form/index.php | 35 -- modules/vatnumber/views/templates/index.php | 35 -- 17 files changed, 660 deletions(-) delete mode 100644 modules/vatnumber/CHANGELOG.txt delete mode 100644 modules/vatnumber/VATNumberTaxManager.php delete mode 100644 modules/vatnumber/ajax.php delete mode 100644 modules/vatnumber/index.php delete mode 100644 modules/vatnumber/logo.gif delete mode 100644 modules/vatnumber/logo.png delete mode 100644 modules/vatnumber/translations/index.php delete mode 100644 modules/vatnumber/upgrade/install-2.0.php delete mode 100644 modules/vatnumber/vatnumber.php delete mode 100644 modules/vatnumber/views/index.php delete mode 100644 modules/vatnumber/views/templates/admin/_configure/helpers/form/form.tpl delete mode 100644 modules/vatnumber/views/templates/admin/_configure/helpers/form/index.php delete mode 100644 modules/vatnumber/views/templates/index.php diff --git a/admin/themes/default/template/helpers/form/form.tpl b/admin/themes/default/template/helpers/form/form.tpl index 478f365db..75e0dce6f 100644 --- a/admin/themes/default/template/helpers/form/form.tpl +++ b/admin/themes/default/template/helpers/form/form.tpl @@ -911,7 +911,6 @@ var module_dir = '{$smarty.const._MODULE_DIR_}'; var id_language = {$defaultFormLanguage|intval}; var languages = new Array(); - var vat_number = {if $vat_number}1{else}0{/if}; // Multilang field setup must happen before document is ready so that calls to displayFlags() to avoid // precedence conflicts with other document.ready() blocks {foreach $languages as $k => $language} diff --git a/classes/helper/HelperForm.php b/classes/helper/HelperForm.php index c60308f6e..9fe37a036 100644 --- a/classes/helper/HelperForm.php +++ b/classes/helper/HelperForm.php @@ -251,7 +251,6 @@ class HelperFormCore extends Helper 'fields' => $this->fields_form, 'fields_value' => $this->fields_value, 'required_fields' => $this->getFieldsRequired(), - 'vat_number' => Module::isInstalled('vatnumber') && file_exists(_PS_MODULE_DIR_.'vatnumber/ajax.php'), 'module_dir' => _MODULE_DIR_, 'base_url' => $this->context->shop->getBaseURL(), 'contains_states' => (isset($this->fields_value['id_country']) && isset($this->fields_value['id_state'])) ? Country::containsStates($this->fields_value['id_country']) : null, diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index c9ad78a71..8c5214f29 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -2646,8 +2646,6 @@ class AdminProductsControllerCore extends AdminController // used to build the new url when changing category $this->tpl_list_vars['base_url'] = preg_replace('#&id_category=[0-9]*#', '', self::$currentIndex).'&token='.$this->token; } - // @todo module free - $this->tpl_form_vars['vat_number'] = file_exists(_PS_MODULE_DIR_.'vatnumber/ajax.php'); parent::initContent(); } diff --git a/js/admin.js b/js/admin.js index a72a66d66..4883cf790 100644 --- a/js/admin.js +++ b/js/admin.js @@ -1321,21 +1321,6 @@ function ajaxStates(id_state_selected) } } }); - - if (module_dir && vat_number) - { - $.ajax({ - type: "GET", - url: window.location.origin + module_dir + "vatnumber/ajax.php?id_country=" + $('#id_country').val(), - success: function(isApplicable) - { - if(isApplicable == 1) - $('#vat_area').show(); - else - $('#vat_area').hide(); - } - }); - } } function check_for_all_accesses(tabsize, tabnumber) diff --git a/modules/vatnumber/CHANGELOG.txt b/modules/vatnumber/CHANGELOG.txt deleted file mode 100644 index d1ab0de20..000000000 --- a/modules/vatnumber/CHANGELOG.txt +++ /dev/null @@ -1,16 +0,0 @@ ------------------------------- -# V1.8.0 to V2.0.0 ------------------------------- - -## Improved/Changed Features: - -* [CO] : Updated with latest PS version - 1.6.1.23. - - -2014-04-18 17:05:53 +0200 // update version for release -2014-04-18 16:55:22 +0200 [-] Fix retrocompat PrestaShop 1.5 -2014-04-17 11:40:40 +0200 Bug fix (PS 1.5): ps_version_compliancy removed -2014-03-25 11:47:05 +0100 Merge branch 'master' of https://github.com/PrestaShop/vatnumber -2014-03-24 16:07:23 +0100 // Typo. -2014-03-24 15:23:12 +0100 / MO vatnumber : ps_versions_compliancy added -2014-03-20 14:41:47 +0100 Initial commit diff --git a/modules/vatnumber/VATNumberTaxManager.php b/modules/vatnumber/VATNumberTaxManager.php deleted file mode 100644 index eb939ccee..000000000 --- a/modules/vatnumber/VATNumberTaxManager.php +++ /dev/null @@ -1,45 +0,0 @@ - -* @copyright 2007-2017 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -class VATNumberTaxManager implements TaxManagerInterface -{ - public static function isAvailableForThisAddress(Address $address) - { - return (!empty($address->vat_number) - && $address->id_country != Configuration::get('VATNUMBER_COUNTRY') - && Configuration::get('VATNUMBER_MANAGEMENT') - ); - } - - public function getTaxCalculator() - { - // If the address matches the european vat number criterias no taxes are applied - $tax = new Tax(); - $tax->rate = 0; - - return new TaxCalculator(array($tax)); - } -} diff --git a/modules/vatnumber/ajax.php b/modules/vatnumber/ajax.php deleted file mode 100644 index ee3aff6d6..000000000 --- a/modules/vatnumber/ajax.php +++ /dev/null @@ -1,30 +0,0 @@ - -* @copyright 2007-2017 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ -include(dirname(__FILE__).'/../../config/config.inc.php'); -include(dirname(__FILE__).'/../../init.php'); -include(dirname(__FILE__).'/vatnumber.php'); - -echo VatNumber::isApplicable(Tools::getValue('id_country')); diff --git a/modules/vatnumber/index.php b/modules/vatnumber/index.php deleted file mode 100644 index 0875d0aac..000000000 --- a/modules/vatnumber/index.php +++ /dev/null @@ -1,36 +0,0 @@ - -* @copyright 2007-2017 PrestaShop SA -* @version Release: $Revision$ -* @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; diff --git a/modules/vatnumber/logo.gif b/modules/vatnumber/logo.gif deleted file mode 100644 index 78c325d64fbd56e88eaba5a5c08e8cfa91d5110a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1025 zcmZ?wbhEHb6krfw_|52A(V|6*7cXA6Y}twx zD^{&qwR-jHHEY(aUAuPOx^?TmU4oj-s6;>C-XE?v5O z`SR7PSFc^WcK!PG8#iv;x^?UJ?b~Yg_BQ`!$o3~a$66de$u`V7Y;SG3bRdP`x&Twq+_y*O2mx~2U{39 zoEv^TXnfq-%`awD@?k@wOCzgG%aa3!%xvAfvP{V*6qF7;kajFOQgKj;nVnC}Ehm8C z;eBonnUXIP4jy{dA;8PGz(Q#QM<@@~~@tn6URk8w-bG LC3m`n0E0CEL8cAq diff --git a/modules/vatnumber/logo.png b/modules/vatnumber/logo.png deleted file mode 100644 index cee4e0ff6c0b3303c5cf28a6d107b0b55df28b66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1749 zcmV;`1}gc9P)8HS&8&dkni?9`TBJBdpi+i@y4Zfs0}Ry1t`L=_SeZ4iQhxCnuS3gs$+kO+pD z{6Rv15EW2?B9Kx*tx6Gp09C4*i`tNoq^XrSPJAJxv0b~a?cMcWX6AhSm|1)6c&!9g z>d_v3JF}zx-t)fSZIp=cb}k1%DRr~Y>#rR?`Nf4$9aLIxPWwJ0kj>@E7Ymb~@5Mfh2=LiHvVScJGYa`LoR@PDC7g77_s@nl`BsIM}WnfKG7{WS9`v6s3*iQ zJr~3`01-i~B?uxq+B*5rcYeJm`RV5VR7BR2K!5e{%U{TZdZ3c(OfFBZSintfz;#`G z&%^UP{FKi|Pci=AYZxt93nH-&`9gl8eq-Gae*5{JHKnO0fnVRy_~gF6PO=Hri=j{m zghB{|!$SmNh|&s$0u;6|%P01{i%?)Oh<72dWQ*aJOQWMzrMUq>_x=O5pZ@s1!}C@% zGZ)}{Zp`Nr)s~L79c*oM5det^AHKXmHXq>oE(nNNtc|c%Xxp}(A3pQ%V=ugV?dLBZ zeB?+a6J-hX-h+RAWdHlS4|cV-?kZ@PpFDkxnhk0Ely?KwBUi7YY={+z0I^UA0@Ag0 z7^Rk;_goLpOX0dcyE`|KmVlE(S2%s?+Ry&{jfcMtL}doN=B9>cTbgS~`yo>cE`2-i z=K9nWVH7N}BY@4%vj3rbD2XCh5^^OWU$V>>LdM3g5Q2F0RfmhqTr(GLj)z3`wPyrLoo` zKwDcUTN{0>g-9T>&|D+*Zpsi8^PCulnMK2FE&%W=0XSNL>nKX0;_ri5jt=M8^$w4B zx7RaQsAY7{A+m68Y=X;EbNDGA-}mrRDg0DyUDu-&LKs1Ft)*{MmQrbvvIXZ_@%nslf5!*s)^_DOaJD!WdIM3miuih6b$#5sf24Wa0GH5-*R=uye~iAMUPa zZ})bFXI&OcF@~6GOK($#QgM+JS70)u6USh*LaBIbt&?b41Ax{B$5B{o0YL+2Yq^Xc0(M_4RyVnj2!;9xYQ+?evpUZb_fXkDEFqYZ*! zh;954v<4BKfH7QOu>A2Hx2#(`G zAXpPeH|1Ji0mdk>Mq>;t6hnegF<)|SIB_L_vejCnjjmLnf&qyoFpi*-v|0&b`C5w* zDZ#Z4p(wOg7^Bf^I9>f+uP=ediou|k97>s=RUniVLPrtUSURnfu2ALl1L0G`iBob(p0=>@Z zmjD>GHUmn5F)kuPq~q$cHi+0N3z4G;Y^;A7KsD`EQiO~lY2hm;BAb~UKQb}-8d@7t zj)O67qOFOoDO(*|N8@NilngW`p?CF;of=ZEgI0=*qu0nzjW4z2ayzaC?f_aI{{B+~ zJMO-BciXmh!Z3^(iK3;#RJMW;M8bpZK4WussoGW2Z;Zh)3S;2>rT=i|)JwhJ36_Udk{ zBZ@2{mh!tqXrZsgVLBh{A2*x$#M84mj-EbSyztMb1}^;VSI;MoXMr5?98+~DRe%fB z0=EOr_douNuXOa@zrVG$ow|*6Ll&xnEY*`KiF1@TraMt^SbNpem(ym09G_o`Wd`a00000NkvXXu0mjf^`cN! diff --git a/modules/vatnumber/translations/index.php b/modules/vatnumber/translations/index.php deleted file mode 100644 index 54e037c8b..000000000 --- a/modules/vatnumber/translations/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2017 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; diff --git a/modules/vatnumber/upgrade/install-2.0.php b/modules/vatnumber/upgrade/install-2.0.php deleted file mode 100644 index 656b4d154..000000000 --- a/modules/vatnumber/upgrade/install-2.0.php +++ /dev/null @@ -1,9 +0,0 @@ -registerHook('actionValidateCustomerAddressForm')); -} diff --git a/modules/vatnumber/vatnumber.php b/modules/vatnumber/vatnumber.php deleted file mode 100644 index 0f3afc72f..000000000 --- a/modules/vatnumber/vatnumber.php +++ /dev/null @@ -1,313 +0,0 @@ - -* @copyright 2007-2017 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -if (!defined('_PS_VERSION_')) - exit; - -class VatNumber extends TaxManagerModule -{ - public function __construct() - { - $this->name = 'vatnumber'; - $this->tab = 'billing_invoicing'; - $this->version = '2.0.0'; - $this->author = 'PrestaShop'; - $this->need_instance = 0; - - $this->tax_manager_class = 'VATNumberTaxManager'; - - $this->bootstrap = true; - parent::__construct(); - $id_country = (int)Configuration::get('VATNUMBER_COUNTRY'); - - if ($id_country == 0) - $this->warning = $this->l('No default country set.'); - - $this->displayName = $this->l('European VAT number'); - $this->description = $this->l('Enables you to enter the intra-community VAT number when creating the address. You must fill in the company field to allow entering the VAT number.'); - $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); - } - - public function install() - { - return - parent::install() - && Configuration::updateValue('VATNUMBER_MANAGEMENT', 1) - && $this->registerHook('actionValidateCustomerAddressForm'); - } - - public function uninstall() - { - return (parent::uninstall() && Configuration::updateValue('VATNUMBER_MANAGEMENT', 0)); - } - - public function enable($force_all = false) - { - parent::enable($force_all); - Configuration::updateValue('VATNUMBER_MANAGEMENT', 1); - } - - public function disable($force_all = false) - { - parent::disable($force_all); - Configuration::updateValue('VATNUMBER_MANAGEMENT', 0); - } - - public static function getPrefixIntracomVAT() - { - $intracom_array = array( - 'AT' => 'AT', - //Austria - 'BE' => 'BE', - //Belgium - 'DK' => 'DK', - //Denmark - 'FI' => 'FI', - //Finland - 'FR' => 'FR', - //France - 'FX' => 'FR', - //France métropolitaine - 'DE' => 'DE', - //Germany - 'GR' => 'EL', - //Greece - 'IE' => 'IE', - //Irland - 'IT' => 'IT', - //Italy - 'LU' => 'LU', - //Luxembourg - 'NL' => 'NL', - //Netherlands - 'PT' => 'PT', - //Portugal - 'ES' => 'ES', - //Spain - 'SE' => 'SE', - //Sweden - 'GB' => 'GB', - //United Kingdom - 'CY' => 'CY', - //Cyprus - 'EE' => 'EE', - //Estonia - 'HU' => 'HU', - //Hungary - 'LV' => 'LV', - //Latvia - 'LT' => 'LT', - //Lithuania - 'MT' => 'MT', - //Malta - 'PL' => 'PL', - //Poland - 'SK' => 'SK', - //Slovakia - 'CZ' => 'CZ', - //Czech Republic - 'SI' => 'SI', - //Slovenia - 'RO' => 'RO', - //Romania - 'BG' => 'BG', - //Bulgaria - 'HR' => 'HR', - //Croatia - ); - - return $intracom_array; - } - - public static function isApplicable($id_country) - { - return (((int)$id_country && array_key_exists(Country::getIsoById($id_country), self::getPrefixIntracomVAT())) ? 1 : 0); - } - - public static function WebServiceCheck($vat_number) - { - if (empty($vat_number)) - return array(); - $vat_number = str_replace(' ', '', $vat_number); - $prefix = Tools::substr($vat_number, 0, 2); - if (array_search($prefix, self::getPrefixIntracomVAT()) === false) - return array(Tools::displayError('Invalid VAT number')); - $vat = Tools::substr($vat_number, 2); - $url = 'http://ec.europa.eu/taxation_customs/vies/viesquer.do?ms='.urlencode($prefix).'&iso='.urlencode($prefix).'&vat='.urlencode($vat); - @ini_set('default_socket_timeout', 2); - for ($i = 0; $i < 3; $i++) - { - if ($page_res = Tools::file_get_contents($url)) - { - if (preg_match('/invalid VAT number/i', $page_res)) - { - @ini_restore('default_socket_timeout'); - - return array(Tools::displayError('VAT number not found')); - } - else if (preg_match('/valid VAT number/i', $page_res)) - { - @ini_restore('default_socket_timeout'); - - return array(); - } - else - ++$i; - } - else - sleep(1); - } - @ini_restore('default_socket_timeout'); - - return array(Tools::displayError('VAT number validation service unavailable')); - } - - public function getContent() - { - $echo = ''; - - if (Tools::isSubmit('submitVatNumber')) - { - if (Configuration::updateValue('VATNUMBER_COUNTRY', (int)Tools::getValue('VATNUMBER_COUNTRY'))) - $echo .= $this->displayConfirmation($this->l('Your country has been updated.')); - - if (Configuration::updateValue('VATNUMBER_CHECKING', (int)Tools::getValue('VATNUMBER_CHECKING'))) - $echo .= ((bool)Tools::getValue('VATNUMBER_CHECKING') ? $this->displayConfirmation($this->l('The check of the VAT number with the WebService is now enabled.')) : $this->displayConfirmation($this->l('The check of the VAT number with the WebService is now disabled.'))); - } - $echo .= $this->renderForm(); - - return $echo; - } - - public function renderForm() - { - $countries = Country::getCountries($this->context->language->id); - - $countries_fmt = array( - 0 => array( - 'id' => 0, - 'name' => $this->l('-- Choose a country --') - ) - ); - - foreach ($countries as $country) - $countries_fmt[] = array( - 'id' => $country['id_country'], - 'name' => $country['name'] - ); - - $fields_form = array( - 'form' => array( - 'legend' => array( - 'title' => $this->l('Settings'), - 'icon' => 'icon-cogs' - ), - 'input' => array( - array( - 'type' => 'select', - 'label' => $this->l('Customers\' country'), - 'desc' => $this->l('Filter customers\' country.'), - 'name' => 'VATNUMBER_COUNTRY', - 'required' => false, - 'default_value' => (int)$this->context->country->id, - 'options' => array( - 'query' => $countries_fmt, - 'id' => 'id', - 'name' => 'name', - ) - ), - array( - 'type' => 'switch', - 'label' => $this->l('Enable checking of the VAT number with the web service'), - 'name' => 'VATNUMBER_CHECKING', - 'is_bool' => true, - 'desc' => $this->l('The verification by the web service is slow. Enabling this option can slow down your shop.'), - 'values' => array( - array( - 'id' => 'active_on', - 'value' => 1, - 'label' => $this->l('Enabled') - ), - array( - 'id' => 'active_off', - 'value' => 0, - 'label' => $this->l('Disabled') - ) - ), - ) - ), - 'submit' => array( - 'title' => $this->l('Save'), - ) - ), - ); - - $helper = new HelperForm(); - $helper->module = $this; - $helper->show_toolbar = false; - $helper->table = $this->table; - $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT')); - $helper->default_form_language = $lang->id; - $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; - $this->fields_form = array(); - - $helper->identifier = $this->identifier; - $helper->submit_action = 'submitVatNumber'; - $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; - $helper->token = Tools::getAdminTokenLite('AdminModules'); - $helper->tpl_vars = array( - 'fields_value' => $this->getConfigFieldsValues(), - 'languages' => $this->context->controller->getLanguages(), - 'id_language' => $this->context->language->id - ); - - return $helper->generateForm(array($fields_form)); - } - - public function getConfigFieldsValues() - { - return array( - 'VATNUMBER_COUNTRY' => Tools::getValue('VATNUMBER_COUNTRY', Configuration::get('VATNUMBER_COUNTRY')), - 'VATNUMBER_CHECKING' => Tools::getValue('VATNUMBER_CHECKING', Configuration::get('VATNUMBER_CHECKING')), - ); - } - - public function hookActionValidateCustomerAddressForm(&$params) - { - $form = $params['form']; - $is_valid = true; - - if (($vatNumber = $form->getField('vat_number')) && Configuration::get('VATNUMBER_MANAGEMENT') && Configuration::get('VATNUMBER_CHECKING')) { - $isAVatNumber = VatNumber::WebServiceCheck($vatNumber->getValue()); - if (is_array($isAVatNumber) && count($isAVatNumber) > 0) { - $vatNumber->addError($isAVatNumber[0]); - $is_valid = false; - } - } - - return $is_valid; - } -} diff --git a/modules/vatnumber/views/index.php b/modules/vatnumber/views/index.php deleted file mode 100644 index d8f3648ad..000000000 --- a/modules/vatnumber/views/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2017 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; diff --git a/modules/vatnumber/views/templates/admin/_configure/helpers/form/form.tpl b/modules/vatnumber/views/templates/admin/_configure/helpers/form/form.tpl deleted file mode 100644 index ad96b5b42..000000000 --- a/modules/vatnumber/views/templates/admin/_configure/helpers/form/form.tpl +++ /dev/null @@ -1,52 +0,0 @@ -{* -* 2007-2017 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 -* @copyright 2007-2017 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} - -{extends file="helpers/form/form.tpl"} - -{block name="input"} - {if $input.type == 'switch' && $smarty.const._PS_VERSION_|@addcslashes:'\'' < '1.6'} - {foreach $input.values as $value} - - - {if isset($input.br) && $input.br}
{/if} - {if isset($value.p) && $value.p}

{$value.p}

{/if} - {/foreach} - {else} - {$smarty.block.parent} - {/if} - -{/block} diff --git a/modules/vatnumber/views/templates/admin/_configure/helpers/form/index.php b/modules/vatnumber/views/templates/admin/_configure/helpers/form/index.php deleted file mode 100644 index 54e037c8b..000000000 --- a/modules/vatnumber/views/templates/admin/_configure/helpers/form/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2017 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; diff --git a/modules/vatnumber/views/templates/index.php b/modules/vatnumber/views/templates/index.php deleted file mode 100644 index 54e037c8b..000000000 --- a/modules/vatnumber/views/templates/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2017 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;