diff --git a/address.php b/address.php index 16828e486..0c4a9c3de 100644 --- a/address.php +++ b/address.php @@ -1,6 +1,6 @@ run(); \ No newline at end of file +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/address'.$params); + diff --git a/addresses.php b/addresses.php index 188b17c99..930b75e93 100644 --- a/addresses.php +++ b/addresses.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/addresses'.$params); + diff --git a/authentication.php b/authentication.php index 2d7d49039..02ffd0269 100644 --- a/authentication.php +++ b/authentication.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/authentication'.$params); + diff --git a/best-sales.php b/best-sales.php index 685b6b074..a7b248ffb 100644 --- a/best-sales.php +++ b/best-sales.php @@ -1,6 +1,6 @@ run(); +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/best-sales'.$params); + diff --git a/cart.php b/cart.php index 2a3266376..dc435b427 100644 --- a/cart.php +++ b/cart.php @@ -1,6 +1,6 @@ run(); +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/cart'.$params); + diff --git a/category.php b/category.php index 6d83441e5..d7ffb70ea 100644 --- a/category.php +++ b/category.php @@ -1,6 +1,6 @@ run(); +require(dirname(__FILE__).'/config/config.inc.php'); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/category'.$params); + diff --git a/classes/FrontController.php b/classes/FrontController.php index af6a51d81..ba22a559e 100755 --- a/classes/FrontController.php +++ b/classes/FrontController.php @@ -92,7 +92,7 @@ class FrontControllerCore $link = new Link(); if ($this->auth AND !$cookie->isLogged($this->guestAllowed)) - Tools::redirect('authentication.php'.($this->authRedirection ? '?back='.$this->authRedirection : '')); + Tools::redirect('index.php/authentication'.($this->authRedirection ? '?back='.$this->authRedirection : '')); /* Theme is missing or maintenance */ if (!is_dir(_PS_THEME_DIR_)) diff --git a/classes/Link.php b/classes/Link.php index f013a6980..05ef2a9dd 100644 --- a/classes/Link.php +++ b/classes/Link.php @@ -1,6 +1,6 @@ allow == 1)?(_PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink().((isset($product->category) AND !empty($product->category) AND $product->category != 'home') ? $product->category.'/' : '').(int)$product->id.'-'.$product->link_rewrite.($product->ean13 ? '-'.$product->ean13 : '').'.html?deletePicture='.$id_picture) : - (_PS_BASE_URL_.__PS_BASE_URI__.'product.php?id_product='.(int)$product->id).'&deletePicture='.$id_picture; + (_PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=product&id_product='.(int)$product->id).'&deletePicture='.$id_picture; else - return _PS_BASE_URL_.__PS_BASE_URI__.'product.php?id_product='.(int)$product.'&deletePicture='.$id_picture; + return _PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=product&id_product='.(int)$product.'&deletePicture='.$id_picture; } /** @@ -67,73 +67,73 @@ class LinkCore { if (is_object($id_product)) return ($this->allow == 1)?(_PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink((int)$id_lang).((isset($id_product->category) AND !empty($id_product->category) AND $id_product->category != 'home') ? $id_product->category.'/' : '').(int)$id_product->id.'-'.$id_product->link_rewrite.($id_product->ean13 ? '-'.$id_product->ean13 : '').'.html') : - (_PS_BASE_URL_.__PS_BASE_URI__.'product.php?id_product='.(int)$id_product->id); + (_PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=product&id_product='.(int)$id_product->id); elseif ($alias) return ($this->allow == 1)?(_PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink((int)$id_lang).(($category AND $category != 'home') ? ($category.'/') : '').(int)$id_product.'-'.$alias.($ean13 ? '-'.$ean13 : '').'.html') : - (_PS_BASE_URL_.__PS_BASE_URI__.'product.php?id_product='.(int)$id_product); + (_PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=product&id_product='.(int)$id_product); else - return _PS_BASE_URL_.__PS_BASE_URI__.'product.php?id_product='.(int)$id_product; + return _PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=product&id_product='.(int)$id_product; } public function getCategoryLink($id_category, $alias = NULL, $id_lang = NULL) { if (is_object($id_category)) return ($this->allow == 1) ? (_PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink((int)($id_lang)).(int)($id_category->id).'-'.$id_category->link_rewrite) : - (_PS_BASE_URL_.__PS_BASE_URI__.'category.php?id_category='.(int)($id_category->id)); + (_PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=category&id_category='.(int)($id_category->id)); if ($alias) return ($this->allow == 1) ? (_PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink((int)($id_lang)).(int)($id_category).'-'.$alias) : - (_PS_BASE_URL_.__PS_BASE_URI__.'category.php?id_category='.(int)($id_category)); - return _PS_BASE_URL_.__PS_BASE_URI__.'category.php?id_category='.(int)($id_category); + (_PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=category&id_category='.(int)($id_category)); + return _PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=category&id_category='.(int)($id_category); } public function getCMSCategoryLink($id_category, $alias = NULL, $id_lang = NULL) { if (is_object($id_category)) return ($this->allow == 1) ? (_PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink((int)($id_lang)).'content/category/'.(int)($id_category->id).'-'.$id_category->link_rewrite) : - (_PS_BASE_URL_.__PS_BASE_URI__.'cms.php?id_cms_category='.(int)($id_category->id)); + (_PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=cms&id_cms_category='.(int)($id_category->id)); if ($alias) return ($this->allow == 1) ? (_PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink((int)($id_lang)).'content/category/'.(int)($id_category).'-'.$alias) : - (_PS_BASE_URL_.__PS_BASE_URI__.'cms.php?id_cms_category='.(int)($id_category)); - return _PS_BASE_URL_.__PS_BASE_URI__.'cms.php?id_cms_category='.(int)($id_category); + (_PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=cms&id_cms_category='.(int)($id_category)); + return _PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=cms&id_cms_category='.(int)($id_category); } public function getCMSLink($cms, $alias = null, $ssl = false, $id_lang = NULL) { $base = (($ssl AND Configuration::get('PS_SSL_ENABLED')) ? Tools::getShopDomainSsl(true) : Tools::getShopDomain(true)); - + if (is_object($cms)) { - return ($this->allow == 1) ? + return ($this->allow == 1) ? ($base.__PS_BASE_URI__.$this->getLangLink((int)($id_lang)).'content/'.(int)($cms->id).'-'.$cms->link_rewrite) : - ($base.__PS_BASE_URI__.'cms.php?id_cms='.(int)($cms->id)); + ($base.__PS_BASE_URI__.'index.php?controller=cms&id_cms='.(int)($cms->id)); } - + if ($alias) return ($this->allow == 1) ? ($base.__PS_BASE_URI__.$this->getLangLink((int)($id_lang)).'content/'.(int)($cms).'-'.$alias) : - ($base.__PS_BASE_URI__.'cms.php?id_cms='.(int)($cms)); - return $base.__PS_BASE_URI__.'cms.php?id_cms='.(int)($cms); + ($base.__PS_BASE_URI__.'index.php?controller=cms&id_cms='.(int)($cms)); + return $base.__PS_BASE_URI__.'index.php?controller=cms&id_cms='.(int)($cms); } public function getSupplierLink($id_supplier, $alias = NULL, $id_lang = NULL) { if (is_object($id_supplier)) return ($this->allow == 1) ? (_PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink((int)($id_lang)).(int)($id_supplier->id).'__'.$id_supplier->link_rewrite) : - (_PS_BASE_URL_.__PS_BASE_URI__.'supplier.php?id_supplier='.(int)($id_supplier->id)); + (_PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=supplier&id_supplier='.(int)($id_supplier->id)); if ($alias) return ($this->allow == 1) ? (_PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink((int)($id_lang)).(int)($id_supplier).'__'.$alias) : - (_PS_BASE_URL_.__PS_BASE_URI__.'supplier.php?id_supplier='.(int)($id_supplier)); - return _PS_BASE_URL_.__PS_BASE_URI__.'supplier.php?id_supplier='.(int)($id_supplier); + (_PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=supplier&id_supplier='.(int)($id_supplier)); + return _PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=supplier&id_supplier='.(int)($id_supplier); } public function getManufacturerLink($id_manufacturer, $alias = NULL, $id_lang = NULL) { if (is_object($id_manufacturer)) return ($this->allow == 1) ? (_PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink((int)($id_lang)).(int)($id_manufacturer->id).'_'.$id_manufacturer->link_rewrite) : - (_PS_BASE_URL_.__PS_BASE_URI__.'manufacturer.php?id_manufacturer='.(int)($id_manufacturer->id)); + (_PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=manufacturer&id_manufacturer='.(int)($id_manufacturer->id)); if ($alias) return ($this->allow == 1) ? (_PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink((int)($id_lang)).(int)($id_manufacturer).'_'.$alias) : - (_PS_BASE_URL_.__PS_BASE_URI__.'manufacturer.php?id_manufacturer='.(int)($id_manufacturer)); - return _PS_BASE_URL_.__PS_BASE_URI__.'manufacturer.php?id_manufacturer='.(int)($id_manufacturer); + (_PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=manufacturer&id_manufacturer='.(int)($id_manufacturer)); + return _PS_BASE_URL_.__PS_BASE_URI__.'index.php?controller=manufacturer&id_manufacturer='.(int)($id_manufacturer); } public function getImageLink($name, $ids, $type = NULL) @@ -145,7 +145,7 @@ class LinkCore $uri_path = _THEME_PROD_DIR_.$ids.($type ? '-'.$type : '').'.jpg'; return $protocol_content.Tools::getMediaServer($uri_path).$uri_path; } - + public function getMediaLink($filepath) { return Tools::getProtocol().Tools::getMediaServer($filepath).$filepath; @@ -165,7 +165,7 @@ class LinkCore foreach ($result as $row) self::$cache['page'][$row['page'].'.php_'.$cookie->id_lang] = $this->getLangLink((int)$cookie->id_lang).$row['url_rewrite']; } - + public function getPageLink($filename, $ssl = false, $id_lang = NULL) { global $cookie; @@ -196,7 +196,7 @@ class LinkCore { $uri_path = ''; if ($filename != 'index.php') - $uri_path = $filename; + $uri_path = 'index.php?controller='.$filename; } self::$cache['page'][$filename.'_'.$id_lang] = $uri_path; } @@ -232,7 +232,7 @@ class LinkCore parse_str($_SERVER['QUERY_STRING'], $queryTab); unset($queryTab['isolang']); $query = http_build_query($queryTab); - + if (!empty($query) OR !$this->allow) $query = '?'.$query; @@ -292,16 +292,17 @@ class LinkCore { return $url.(!strstr($url, '?') ? '?' : '&').'orderby='.urlencode($orderby).'&orderway='.urlencode($orderway); } - + protected function getLangLink($id_lang = NULL) { if (!$this->allow OR Language::countActiveLanguages() <= 1) return ''; - + global $cookie; if (!$id_lang) $id_lang = (int)$cookie->id_lang; - + return Language::getIsoById((int)$id_lang).'/'; } } + diff --git a/classes/Order.php b/classes/Order.php index 2fcc7a497..b71164586 100644 --- a/classes/Order.php +++ b/classes/Order.php @@ -398,47 +398,68 @@ class OrderCore extends ObjectModel return $result['message']; } + + /** + * Add breakdown prices in an order detail row + * + * @param array &$row + */ public function setProductPrices(&$row) { if ($this->_taxCalculationMethod == PS_TAX_EXC) - $row['product_price'] = Tools::ps_round($row['product_price'], 2); + $row = $this->setProductPricesTaxExcl($row); else - $row['product_price_wt'] = Tools::ps_round($row['product_price'] * (1 + $row['tax_rate'] / 100), 2); + $row = $this->setProductPricesTaxIncl($row); + } + + + /** + * Compute tax excl prices for an order detail + * + * @param array $row + */ + protected function getProductsPricesTaxExcl($row) + { + $row['product_price'] = Tools::ps_round($row['product_price'], 2); if ($row['reduction_percent']) - { - if ($this->_taxCalculationMethod == PS_TAX_EXC) $row['product_price'] = $row['product_price'] - $row['product_price'] * ($row['reduction_percent'] * 0.01); - else - $row['product_price_wt'] = Tools::ps_round($row['product_price_wt'] - $row['product_price_wt'] * ($row['reduction_percent'] * 0.01), 2); - } if ($row['reduction_amount']) - { - if ($this->_taxCalculationMethod == PS_TAX_EXC) $row['product_price'] = $row['product_price'] - $row['reduction_amount'] / (1 + $row['tax_rate'] / 100); - else - $row['product_price_wt'] = Tools::ps_round($row['product_price_wt'] - $row['reduction_amount'], 2); - } if ($row['group_reduction']) - { - if ($this->_taxCalculationMethod == PS_TAX_EXC) $row['product_price'] = $row['product_price'] - $row['product_price'] * ($row['group_reduction'] * 0.01); - else + + $row['product_price'] = Tools::ps_round($row['product_price'], 2); // rounding in case of reduction + + $row['product_price_wt'] = Tools::ps_round($row['product_price'] * (1 + ($row['tax_rate'] * 0.01)), 2) + Tools::ps_round($row['ecotax'] * (1 + $row['ecotax_tax_rate'] / 100), 2); + + $row['total_wt'] = $row['product_quantity'] * $row['product_price_wt']; + $row['total_price'] = $row['product_quantity'] * $row['product_price']; + } + + + /** + * Compute tax incl prices for an order detail + * + * @param array $row + */ + protected function getProductsPricesTaxIncl($row) + { + $row['product_price_wt'] = Tools::ps_round($row['product_price'] * (1 + $row['tax_rate'] / 100), 2); + + if ($row['reduction_percent']) + $row['product_price_wt'] = Tools::ps_round($row['product_price_wt'] - $row['product_price_wt'] * ($row['reduction_percent'] * 0.01), 2); + + if ($row['reduction_amount']) + $row['product_price_wt'] = Tools::ps_round($row['product_price_wt'] - $row['reduction_amount'], 2); + + if ($row['group_reduction']) $row['product_price_wt'] = Tools::ps_round($row['product_price_wt'] - $row['product_price_wt'] * ($row['group_reduction'] * 0.01), 2); - } - if (($row['reduction_percent'] OR $row['reduction_amount'] OR $row['group_reduction']) AND $this->_taxCalculationMethod == PS_TAX_EXC) - $row['product_price'] = Tools::ps_round($row['product_price'], 2); - - if ($this->_taxCalculationMethod == PS_TAX_EXC) - $row['product_price_wt'] = Tools::ps_round($row['product_price'] * (1 + ($row['tax_rate'] * 0.01)), 2) + Tools::ps_round($row['ecotax'] * (1 + $row['ecotax_tax_rate'] / 100), 2); - else - { - $row['product_price_wt_but_ecotax'] = $row['product_price_wt']; - $row['product_price_wt'] = Tools::ps_round($row['product_price_wt'] + $row['ecotax'] * (1 + $row['ecotax_tax_rate'] / 100), 2); - } + $row['product_price_wt_but_ecotax'] = $row['product_price_wt']; + $row['product_price_wt'] = Tools::ps_round($row['product_price_wt'] + $row['ecotax'] * (1 + $row['ecotax_tax_rate'] / 100), 2); $row['total_wt'] = $row['product_quantity'] * $row['product_price_wt']; $row['total_price'] = $row['product_quantity'] * $row['product_price']; @@ -980,3 +1001,4 @@ class OrderCore extends ObjectModel WHERE `id_order` = '.(int)($this->id)) !== false); } } + diff --git a/classes/SubDomain.php b/classes/SubDomain.php index ba32e6511..48fb3657f 100644 --- a/classes/SubDomain.php +++ b/classes/SubDomain.php @@ -1,6 +1,6 @@ ExecuteS('SELECT `name` FROM `'._DB_PREFIX_.'subdomain`')) return false; - $subDomains = array(); + + $sub_domains = array(); foreach ($result AS $row) - $subDomains[] = $row['name']; - return $subDomains; + $sub_domains[] = $row['name']; + return $sub_domains; } } diff --git a/classes/Tools.php b/classes/Tools.php index 6254e471c..547b7a798 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -58,6 +58,9 @@ class ToolsCore global $link; if (strpos($url, $baseUri) !== FALSE && strpos($url, $baseUri) == 0) $url = substr($url, strlen($baseUri)); + if (strpos($url, 'index.php/') !== FALSE && strpos($url, 'index.php/') == 0) + $url = substr($url, strlen('index.php/')); + $explode = explode('?', $url); $url = $link->getPageLink($explode[0], true); if (isset($explode[1])) @@ -84,6 +87,8 @@ class ToolsCore global $link; if (strpos($url, __PS_BASE_URI__) !== FALSE && strpos($url, __PS_BASE_URI__) == 0) $url = substr($url, strlen(__PS_BASE_URI__)); + if (strpos($url, 'index.php/') !== FALSE && strpos($url, 'index.php/') == 0) + $url = substr($url, strlen('index.php/')); $explode = explode('?', $url); $url = $link->getPageLink($explode[0]); if (isset($explode[1])) @@ -1302,7 +1307,7 @@ class ToolsCore Tools::addCSS($file, $media_type); return true; } - + //overriding of modules css files $different = 0; $override_path = str_replace(__PS_BASE_URI__.'modules/', _PS_ROOT_DIR_.'/themes/'._THEME_NAME_.'/css/modules/', $css_uri, $different); @@ -1411,7 +1416,7 @@ class ToolsCore } } - + /** * Combine Compress and Cache (ccc) JS calls */ @@ -1429,17 +1434,17 @@ class ToolsCore foreach ($js_files as $filename) { $expr = explode(':', $filename); - + if ($expr[0] == 'http') - $js_external_files[] = $filename; - else + $js_external_files[] = $filename; + else { $infos = array(); $infos['uri'] = $filename; $url_data = parse_url($filename); $infos['path'] =_PS_ROOT_DIR_.Tools::str_replace_once(__PS_BASE_URI__, '/', $url_data['path']); $js_files_infos[] = $infos; - + $js_files_date = max( file_exists($infos['path']) ? filemtime($infos['path']) : 0, $js_files_date @@ -1479,7 +1484,7 @@ class ToolsCore // rebuild the original js_files array $url = str_replace(_PS_ROOT_DIR_.'/', __PS_BASE_URI__, $compressed_js_path); $js_files = array_merge(array($protocol_link.Tools::getMediaServer($url).$url), $js_external_files); - + } public static function getMediaServer($filename) @@ -1711,31 +1716,43 @@ FileETag INode MTime Size */ public static function displayAsDeprecated() { - if (_PS_DISPLAY_COMPATIBILITY_WARNING_) - { - $backtrace = debug_backtrace(); - $callee = next($backtrace); - trigger_error('Function '.$callee['function'].'() is deprecated in '.$callee['file'].' on line '.$callee['line'].'
', E_USER_WARNING); + $backtrace = debug_backtrace(); + $callee = next($backtrace); + $error = 'Function '.$callee['function'].'() is deprecated in '.$callee['file'].' on line '.$callee['line'].'
'; + $message = Tools::displayError('The function').' '.$callee['function'].' ('.Tools::displayError('Line').' '.$callee['line'].') '.Tools::displayError('is deprecated and will be removed in the next major version.'); - $message = Tools::displayError('The function').' '.$callee['function'].' ('.Tools::displayError('Line').' '.$callee['line'].') '.Tools::displayError('is deprecated and will be removed in the next major version.'); - - Logger::addLog($message, 3, $callee['class']); - } + self::throwDeprecated($error, $message, $callee['class']); } /** * Display a warning message indicating that the parameter is deprecated */ public static function displayParameterAsDeprecated($parameter) + { + $backtrace = debug_backtrace(); + $callee = next($backtrace); + $error = 'Parameter '.$parameter.' in function '.$callee['function'].'() is deprecated in '.$callee['file'].' on line '.$callee['Line'].'
'; + $message = Tools::displayError('The parameter').' '.$parameter.' '.Tools::displayError(' in function ').' '.$callee['function'].' ('.Tools::displayError('Line').' '.$callee['Line'].') '.Tools::displayError('is deprecated and will be removed in the next major version.'); + + self::throwDeprecated($error, $message, $callee['class']); + } + + public static function displayFileAsDeprecated() + { + $backtrace = debug_backtrace(); + $callee = current($backtrace); + $error = 'File '.$callee['file'].' is deprecated
'; + $message = Tools::displayError('The file').' '.$callee['file'].' '.Tools::displayError('is deprecated and will be removed in the next major version.'); + + self::throwDeprecated($error, $message, $callee['class']); + } + + protected static function throwDeprecated($error, $message, $class) { if (_PS_DISPLAY_COMPATIBILITY_WARNING_) { - $backtrace = debug_backtrace(); - $callee = next($backtrace); - trigger_error('Parameter '.$parameter.' in function '.$callee['function'].'() is deprecated in '.$callee['file'].' on line '.$callee['Line'].'
', E_USER_WARNING); - - $message = Tools::displayError('The parameter').' '.$parameter.' '.Tools::displayError(' in function ').' '.$callee['function'].' ('.Tools::displayError('Line').' '.$callee['Line'].') '.Tools::displayError('is deprecated and will be removed in the next major version.'); - Logger::addLog($message, 3, $callee['class']); + trigger_error($error, E_USER_WARNING); + Logger::addLog($message, 3, $class); } } @@ -1776,7 +1793,7 @@ FileETag INode MTime Size $s = str_replace($char, '\\'.$char, $s); return $s; } - + public static function str_replace_once($needle , $replace , $haystack) { $pos = strpos($haystack, $needle); diff --git a/cms.php b/cms.php index 6dfc3f57a..1435b5703 100644 --- a/cms.php +++ b/cms.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/cms'.$params); + diff --git a/contact-form.php b/contact-form.php index 92e6f5200..6e752aa71 100644 --- a/contact-form.php +++ b/contact-form.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/contact-form'.$params); + diff --git a/controllers/AddressController.php b/controllers/AddressController.php index d697e368e..c38654de7 100644 --- a/controllers/AddressController.php +++ b/controllers/AddressController.php @@ -1,6 +1,6 @@ php_self = 'address.php'; $this->authRedirection = 'addresses.php'; $this->ssl = true; - + parent::__construct(); } - + public function preProcess() { parent::preProcess(); - + if ($back = Tools::getValue('back')) self::$smarty->assign('back', Tools::safeOutput($back)); if ($mod = Tools::getValue('mod')) self::$smarty->assign('mod', Tools::safeOutput($mod)); - + if (Tools::isSubmit('ajax') AND Tools::isSubmit('type')) { if (Tools::getValue('type') == 'delivery') @@ -62,7 +62,7 @@ class AddressControllerCore extends FrontController } else $id_address = (int)Tools::getValue('id_address', 0); - + if ($id_address) { $this->_address = new Address((int)$id_address); @@ -75,7 +75,7 @@ class AddressControllerCore extends FrontController if (self::$cart->id_address_delivery == $this->_address->id) unset(self::$cart->id_address_delivery); if ($this->_address->delete()) - Tools::redirect('addresses.php'); + Tools::redirect('index.php?controller=addresses'); $this->errors[] = Tools::displayError('This address cannot be deleted.'); } self::$smarty->assign(array('address' => $this->_address, 'id_address' => (int)$id_address)); @@ -83,7 +83,7 @@ class AddressControllerCore extends FrontController elseif (Tools::isSubmit('ajax')) exit; else - Tools::redirect('addresses.php'); + Tools::redirect('index.php?controller=addresses'); } if (Tools::isSubmit('submitAddress')) { @@ -135,7 +135,7 @@ class AddressControllerCore extends FrontController if ((int)($country->contains_states) AND !(int)($address->id_state)) $this->errors[] = Tools::displayError('This country requires a state selection.'); - + if (!sizeof($this->errors)) { if (isset($id_address)) @@ -153,7 +153,7 @@ class AddressControllerCore extends FrontController if (self::$cart->id_address_delivery == $address_old->id) unset(self::$cart->id_address_delivery); } - + if ($address_old->isUsed()) $address_old->delete(); else @@ -164,8 +164,8 @@ class AddressControllerCore extends FrontController } } elseif (self::$cookie->is_guest) - Tools::redirect('addresses.php'); - + Tools::redirect('index.php?controller=addresses'); + if ($result = $address->save()) { if ((bool)(Tools::getValue('select_address', false)) == true OR (Tools::isSubmit('ajax') AND Tools::getValue('type') == 'invoice')) @@ -177,7 +177,7 @@ class AddressControllerCore extends FrontController if (Tools::isSubmit('ajax')) { $return = array( - 'hasError' => !empty($this->errors), + 'hasError' => !empty($this->errors), 'errors' => $this->errors, 'id_address_delivery' => self::$cart->id_address_delivery, 'id_address_invoice' => self::$cart->id_address_invoice @@ -201,26 +201,26 @@ class AddressControllerCore extends FrontController if (Tools::isSubmit('ajax') AND sizeof($this->errors)) { $return = array( - 'hasError' => !empty($this->errors), + 'hasError' => !empty($this->errors), 'errors' => $this->errors ); die(Tools::jsonEncode($return)); } } - + public function setMedia() { parent::setMedia(); Tools::addJS(_THEME_JS_DIR_.'tools/statesManagement.js'); } - + public function process() { parent::process(); /* Secure restriction for guest */ if (self::$cookie->is_guest) - Tools::redirect('addresses.php'); + Tools::redirect('index.php?controller=addresses'); if (Tools::isSubmit('id_country') AND Tools::getValue('id_country') != NULL AND is_numeric(Tools::getValue('id_country'))) $selectedCountry = (int)Tools::getValue('id_country'); @@ -234,7 +234,7 @@ class AddressControllerCore extends FrontController } else $selectedCountry = (int)Configuration::get('PS_COUNTRY_DEFAULT'); - + $countries = Country::getCountries((int)self::$cookie->id_lang, true); $countriesList = ''; foreach ($countries AS $country) @@ -257,21 +257,12 @@ class AddressControllerCore extends FrontController )); } - protected function _processAddressFormat() - { - - $id_country = is_null($this->_address)? 0 : (int)$this->_address->id_country; - - $dlv_adr_fields = AddressFormat::getOrderedAddressFields($id_country, $split_all = true); - self::$smarty->assign('ordered_adr_fields', $dlv_adr_fields); - } - public function displayHeader() { if (Tools::getValue('ajax') != 'true') parent::displayHeader(); } - + public function displayContent() { parent::displayContent(); @@ -279,7 +270,7 @@ class AddressControllerCore extends FrontController $this->_processAddressFormat(); self::$smarty->display(_PS_THEME_DIR_.'address.tpl'); } - + public function displayFooter() { if (Tools::getValue('ajax') != 'true') diff --git a/controllers/AuthController.php b/controllers/AuthController.php index af064c24d..e2bc58e87 100644 --- a/controllers/AuthController.php +++ b/controllers/AuthController.php @@ -40,7 +40,7 @@ class AuthControllerCore extends FrontController parent::preProcess(); if (self::$cookie->isLogged() AND !Tools::isSubmit('ajax')) - Tools::redirect('my-account.php'); + Tools::redirect('index.php?controller=my-account'); if (Tools::getValue('create_account')) { @@ -203,7 +203,7 @@ class AuthControllerCore extends FrontController } if ($back = Tools::getValue('back')) Tools::redirect($back); - Tools::redirect('my-account.php'); + Tools::redirect('index.php?controller=my-account'); } } } @@ -272,7 +272,7 @@ class AuthControllerCore extends FrontController { if ($back = Tools::getValue('back')) Tools::redirect($back); - Tools::redirect('my-account.php'); + Tools::redirect('index.php?controller=my-account'); } } } diff --git a/controllers/CMSController.php b/controllers/CMSController.php index 8de8f2973..cce554a1b 100644 --- a/controllers/CMSController.php +++ b/controllers/CMSController.php @@ -1,6 +1,6 @@ cms = new CMS($id_cms, self::$cookie->id_lang); + $this->cms = new CMS($id_cms, self::$cookie->id_lang); elseif ($id_cms_category = (int)Tools::getValue('id_cms_category')) - $this->cms_category = new CMSCategory($id_cms_category, self::$cookie->id_lang); - + $this->cms_category = new CMSCategory($id_cms_category, self::$cookie->id_lang); + // Automatically redirect to the canonical URL if the current in is the right one // $_SERVER['HTTP_HOST'] must be replaced by the real canonical domain if ($this->cms AND $canonicalURL = self::$link->getCMSLink($this->cms)) @@ -56,17 +56,17 @@ class CmsControllerCore extends FrontController die('[Debug] This page has moved
Please use the following URL instead: '.$canonicalURL.''); Tools::redirectLink($canonicalURL); } - + parent::preProcess(); - + /* assignCase (1 = CMS page, 2 = CMS category) */ if (Validate::isLoadedObject($this->cms) AND ($this->cms->active OR (Tools::getValue('adtoken') == Tools::encrypt('PreviewCMS'.$this->cms->id) AND file_exists(dirname(__FILE__).'/../'.Tools::getValue('ad').'/ajax.php')))) $this->assignCase = 1; elseif (Validate::isLoadedObject($this->cms_category)) $this->assignCase = 2; else - Tools::redirect('404.php'); - + Tools::redirect('index.php?controller=404'); + if((int)(Configuration::get('PS_REWRITING_SETTINGS'))) { $rewrite_infos = (isset($id_cms) AND !isset($id_cms_category)) ? CMS::getUrlRewriteInformations($id_cms) : CMSCategory::getUrlRewriteInformations($id_cms_category); @@ -81,17 +81,17 @@ class CmsControllerCore extends FrontController self::$smarty->assign('lang_rewrite_urls', $default_rewrite); } } - + public function setMedia() { parent::setMedia(); - + if ($this->assignCase == 1) Tools::addJS(_THEME_JS_DIR_.'cms.js'); - + Tools::addCSS(_THEME_CSS_DIR_.'cms.css'); } - + public function process() { parent::process(); @@ -117,10 +117,11 @@ class CmsControllerCore extends FrontController )); } } - + public function displayContent() { parent::displayContent(); self::$smarty->display(_PS_THEME_DIR_.'cms.tpl'); } } + diff --git a/controllers/CartController.php b/controllers/CartController.php index b2de43761..7904bc4cf 100644 --- a/controllers/CartController.php +++ b/controllers/CartController.php @@ -1,6 +1,6 @@ errors)) - Tools::redirect('order.php?'.(isset($idProduct) ? 'ipa='.(int)($idProduct) : '')); + Tools::redirect('index.php?controller=order&'.(isset($idProduct) ? 'ipa='.(int)($idProduct) : '')); } } @@ -239,3 +239,4 @@ class CartControllerCore extends FrontController self::$smarty->display(_PS_THEME_DIR_.'errors.tpl'); } } + diff --git a/controllers/CompareController.php b/controllers/CompareController.php index 2363e8cd1..abcdd7964 100644 --- a/controllers/CompareController.php +++ b/controllers/CompareController.php @@ -42,7 +42,7 @@ class CompareControllerCore extends FrontController $postProducts = isset($product_list) ? rtrim($product_list,'|') : ''; if (!Configuration::get('PS_COMPARATOR_MAX_ITEM')) - return Tools::redirect('404.php'); + return Tools::redirect('index.php?controller=404'); if ($postProducts) { diff --git a/controllers/GuestTrackingController.php b/controllers/GuestTrackingController.php index b34cba5b4..db9f6c98c 100644 --- a/controllers/GuestTrackingController.php +++ b/controllers/GuestTrackingController.php @@ -1,6 +1,6 @@ isLogged()) - Tools::redirect('history.php'); + Tools::redirect('index.php?controller=history'); } - + public function process() { parent::process(); - + if ($id_order = Tools::getValue('id_order') AND $email = Tools::getValue('email')) { $order = new Order((int)$id_order); @@ -58,8 +58,7 @@ class GuestTrackingControllerCore extends FrontController $products = $order->getProducts(); $customizedDatas = Product::getAllCustomizedDatas((int)($order->id_cart)); Product::addCustomizationPrice($products, $customizedDatas); - - $this->processAddressFormat($addressDelivery, $addressInvoice); + self::$smarty->assign(array( 'shop_name' => Configuration::get('PS_SHOP_NAME'), 'order' => $order, @@ -86,7 +85,7 @@ class GuestTrackingControllerCore extends FrontController self::$smarty->assign('followup', str_replace('@', $order->shipping_number, $carrier->url)); self::$smarty->assign('HOOK_ORDERDETAILDISPLAYED', Module::hookExec('orderDetailDisplayed', array('order' => $order))); Module::hookExec('OrderDetail', array('carrier' => $carrier, 'order' => $order)); - + if (Tools::isSubmit('submitTransformGuestToCustomer')) { if (!Validate::isPasswd(Tools::getValue('password'))) @@ -104,25 +103,25 @@ class GuestTrackingControllerCore extends FrontController /* Handle brute force attacks */ sleep(1); } - + self::$smarty->assign(array( 'action' => 'guest-tracking.php', 'errors' => $this->errors )); } - + public function setMedia() { parent::setMedia(); - + Tools::addCSS(_THEME_CSS_DIR_.'history.css'); Tools::addCSS(_THEME_CSS_DIR_.'addresses.css'); } - + public function displayContent() { parent::displayContent(); - + self::$smarty->display(_PS_THEME_DIR_.'guest-tracking.tpl'); } @@ -137,3 +136,4 @@ class GuestTrackingControllerCore extends FrontController } } + diff --git a/controllers/OrderController.php b/controllers/OrderController.php index 514f3bf97..98eb530ce 100644 --- a/controllers/OrderController.php +++ b/controllers/OrderController.php @@ -67,7 +67,7 @@ class OrderControllerCore extends ParentOrderController } if (!self::$cookie->isLogged(true) AND in_array($this->step, array(1, 2, 3))) - Tools::redirect('authentication.php?back='.urlencode('order.php?step='.$this->step)); + Tools::redirect('index.php?controller=authentication&back=order.php?step='.$this->step); if ($this->nbProducts) self::$smarty->assign('virtual_cart', $isVirtualCart); @@ -109,10 +109,10 @@ class OrderControllerCore extends ParentOrderController { $email = self::$cookie->email; self::$cookie->logout(); // If guest we clear the cookie for security reason - Tools::redirect('guest-tracking.php?id_order='.(int)$id_order.'&email='.urlencode($email)); + Tools::redirect('index.php?controller=guest-tracking&id_order='.(int)$id_order.'&email='.urlencode($email)); } else - Tools::redirect('history.php'); + Tools::redirect('index.php?controller=history'); } $this->_assignPayment(); break; @@ -172,7 +172,7 @@ class OrderControllerCore extends ParentOrderController global $isVirtualCart; if ($this->step >= 2 AND (!self::$cart->id_address_delivery OR !self::$cart->id_address_invoice)) - Tools::redirect('order.php?step=1'); + Tools::redirect('index.php?controller=order&step=1'); $delivery = new Address((int)(self::$cart->id_address_delivery)); $invoice = new Address((int)(self::$cart->id_address_invoice)); @@ -182,10 +182,10 @@ class OrderControllerCore extends ParentOrderController unset(self::$cart->id_address_delivery); if ($invoice->deleted) unset(self::$cart->id_address_invoice); - Tools::redirect('order.php?step=1'); + Tools::redirect('index.php?controller=order&step=1'); } elseif ($this->step >= 3 AND !self::$cart->id_carrier AND !$isVirtualCart) - Tools::redirect('order.php?step=2'); + Tools::redirect('index.php?controller=order&step=2'); } /* @@ -241,7 +241,7 @@ class OrderControllerCore extends ParentOrderController self::$smarty->assign('cart', self::$cart); if (self::$cookie->is_guest) - Tools::redirect('order.php?step=2'); + Tools::redirect('index.php?controller=order?step=2'); } /* Carrier step */ @@ -268,7 +268,7 @@ class OrderControllerCore extends ParentOrderController // Redirect instead of displaying payment modules if any module are grefted on Hook::backBeforePayment('order.php?step=3'); - + /* We may need to display an order summary */ self::$smarty->assign(self::$cart->getSummaryDetails()); self::$smarty->assign(array( @@ -276,7 +276,7 @@ class OrderControllerCore extends ParentOrderController 'taxes_enabled' => (int)(Configuration::get('PS_TAX')) )); self::$cookie->checkedTOS = '1'; - + parent::_assignPayment(); } } diff --git a/controllers/OrderDetailController.php b/controllers/OrderDetailController.php index a73313bbe..4ccf32f1a 100644 --- a/controllers/OrderDetailController.php +++ b/controllers/OrderDetailController.php @@ -84,7 +84,7 @@ class OrderDetailControllerCore extends FrontController '{message}' => $message->message), $to, $toName, $customer->email, $customer->firstname.' '.$customer->lastname); if (Tools::getValue('ajax') != 'true') - Tools::redirect('order-detail.php?id_order='.(int)($idOrder)); + Tools::redirect('index.php?controller=order-detail&id_order='.(int)($idOrder)); } else { diff --git a/controllers/OrderFollowController.php b/controllers/OrderFollowController.php index 2fee624fc..e08b2441d 100644 --- a/controllers/OrderFollowController.php +++ b/controllers/OrderFollowController.php @@ -1,6 +1,6 @@ php_self = 'order-follow.php'; $this->authRedirection = 'order-follow.php'; $this->ssl = true; - + parent::__construct(); } - + public function preProcess() { parent::preProcess(); - + if (Tools::isSubmit('submitReturnMerchandise')) { $customizationQtyInput = Tools::getValue('customization_qty_input'); if (!$id_order = (int)(Tools::getValue('id_order'))) - Tools::redirect('history.php'); + Tools::redirect('index.php?controller=history'); if (!$order_qte_input = Tools::getValue('order_qte_input')) - Tools::redirect('order-follow.php?errorDetail1'); + Tools::redirect('index.php?controller=order-follow&errorDetail1'); if ($customizationIds = Tools::getValue('customization_ids') AND !$customizationQtyInput) - Tools::redirect('order-follow.php?errorDetail1'); + Tools::redirect('index.php?controller=order-follow&errorDetail1'); if (!$ids_order_detail = Tools::getValue('ids_order_detail') AND !$customizationIds) - Tools::redirect('order-follow.php?errorDetail2'); + Tools::redirect('index.php?controller=order-follow&errorDetail2'); $order = new Order((int)($id_order)); - if (!$order->isReturnable()) Tools::redirect('order-follow.php?errorNotReturnable'); + if (!$order->isReturnable()) Tools::redirect('index.php?controller=order-follow&errorNotReturnable'); if ($order->id_customer != self::$cookie->id_customer) die(Tools::displayError()); $orderReturn = new OrderReturn(); @@ -63,15 +63,15 @@ class OrderFollowControllerCore extends FrontController $orderReturn->id_order = $id_order; $orderReturn->question = strval(Tools::getValue('returnText')); if (empty($orderReturn->question)) - Tools::redirect('order-follow.php?errorMsg'); + Tools::redirect('index.php?controller=order-follow&errorMsg'); if (!$orderReturn->checkEnoughProduct($ids_order_detail, $order_qte_input, $customizationIds, $customizationQtyInput)) - Tools::redirect('order-follow.php?errorQuantity'); + Tools::redirect('index.php?controller=order-follow&errorQuantity'); $orderReturn->state = 1; $orderReturn->add(); $orderReturn->addReturnDetail($ids_order_detail, $order_qte_input, $customizationIds, $customizationQtyInput); Module::hookExec('orderReturn', array('orderReturn' => $orderReturn)); - Tools::redirect('order-follow.php'); + Tools::redirect('index.php?controller=order-follow'); } $ordersReturn = OrderReturn::getOrdersReturn((int)(self::$cookie->id_customer)); @@ -88,7 +88,7 @@ class OrderFollowControllerCore extends FrontController self::$smarty->assign('ordersReturn', $ordersReturn); } - + public function setMedia() { parent::setMedia(); diff --git a/controllers/ParentOrderController.php b/controllers/ParentOrderController.php index adcdf1ffa..11714f376 100644 --- a/controllers/ParentOrderController.php +++ b/controllers/ParentOrderController.php @@ -1,6 +1,6 @@ ssl = true; parent::__construct(); - + /* Disable some cache related bugs on the cart/order */ header('Cache-Control: no-cache, must-revalidate'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); } - + public function init() { parent::init(); $this->nbProducts = self::$cart->nbProducts(); } - + public function preProcess() { global $isVirtualCart; - + parent::preProcess(); - + // Redirect to the good order process - if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 AND strpos($_SERVER['PHP_SELF'], 'order.php') === false) - Tools::redirect('order.php'); - if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1 AND strpos($_SERVER['PHP_SELF'], 'order-opc.php') === false) + if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 AND Tools::getValue('controller') != 'order') + Tools::redirect('index.php?controller=order'); + if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1 AND Tools::getValue('controller') != 'order-opc') { if (isset($_GET['step']) AND $_GET['step'] == 3) - Tools::redirect('order-opc.php?isPaymentStep=true'); - Tools::redirect('order-opc.php'); + Tools::redirect('index.php?controller=order-opc&isPaymentStep=true'); + Tools::redirect('index.php?controller=order-opc'); } - + if (Configuration::get('PS_CATALOG_MODE')) $this->errors[] = Tools::displayError('This store has not accepted your new order.'); - + if (Tools::isSubmit('submitReorder') AND $id_order = (int)Tools::getValue('id_order')) { $oldCart = new Cart(Order::getCartIdStatic((int)$id_order, (int)self::$cookie->id_customer)); @@ -80,11 +80,11 @@ class ParentOrderControllerCore extends FrontController self::$cookie->id_cart = $duplication['cart']->id; self::$cookie->write(); if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1) - Tools::redirect('order-opc.php'); - Tools::redirect('order.php'); + Tools::redirect('index.php?controller=order-opc'); + Tools::redirect('index.php?controller=order'); } } - + if ($this->nbProducts) { if (Tools::isSubmit('submitAddDiscount') AND Tools::getValue('discount_name')) @@ -105,7 +105,7 @@ class ParentOrderControllerCore extends FrontController if (!sizeof($this->errors)) { self::$cart->addDiscount((int)($discount->id)); - Tools::redirect('order-opc.php'); + Tools::redirect('index.php?controller=order-opc'); } } self::$smarty->assign(array( @@ -116,21 +116,21 @@ class ParentOrderControllerCore extends FrontController elseif (isset($_GET['deleteDiscount']) AND Validate::isUnsignedId($_GET['deleteDiscount'])) { self::$cart->deleteDiscount((int)($_GET['deleteDiscount'])); - Tools::redirect('order-opc.php'); + Tools::redirect('index.php?controller=order-opc'); } - + /* Is there only virtual product in cart */ if ($isVirtualCart = self::$cart->isVirtualCart()) $this->_setNoCarrier(); } - + self::$smarty->assign('back', Tools::safeOutput(Tools::getValue('back'))); } - + public function setMedia() { parent::setMedia(); - + // Adding CSS style sheet Tools::addCSS(_THEME_CSS_DIR_.'addresses.css'); Tools::addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'screen'); @@ -145,9 +145,9 @@ class ParentOrderControllerCore extends FrontController Tools::addJS(_THEME_JS_DIR_.'cart-summary.js'); Tools::addJS(_PS_JS_DIR_.'jquery/jquery-typewatch.pack.js'); } - + } - + /** * @return boolean */ @@ -162,7 +162,7 @@ class ParentOrderControllerCore extends FrontController } return false; } - + protected function _updateMessage($messageContent) { if ($messageContent) @@ -194,7 +194,7 @@ class ParentOrderControllerCore extends FrontController } return true; } - + protected function _processCarrier() { self::$cart->recyclable = (int)(Tools::getValue('recyclable')); @@ -206,7 +206,7 @@ class ParentOrderControllerCore extends FrontController else self::$cart->gift_message = strip_tags($_POST['gift_message']); } - + if (isset(self::$cookie->id_customer) AND self::$cookie->id_customer) { $address = new Address((int)(self::$cart->id_address_delivery)); @@ -215,21 +215,21 @@ class ParentOrderControllerCore extends FrontController } else $id_zone = Country::getIdZone((int)Configuration::get('PS_COUNTRY_DEFAULT')); - + if (Validate::isInt(Tools::getValue('id_carrier')) AND sizeof(Carrier::checkCarrierZone((int)(Tools::getValue('id_carrier')), (int)($id_zone)))) self::$cart->id_carrier = (int)(Tools::getValue('id_carrier')); elseif (!self::$cart->isVirtualCart() AND (int)(Tools::getValue('id_carrier')) == 0) $this->errors[] = Tools::displayError('Invalid carrier or no carrier selected'); - + Module::hookExec('processCarrier', array('cart' => self::$cart)); - + return self::$cart->update(); } - + protected function _assignSummaryInformations() { global $currency; - + if (file_exists(_PS_SHIP_IMG_DIR_.(int)(self::$cart->id_carrier).'.jpg')) self::$smarty->assign('carrierPicture', 1); $summary = self::$cart->getSummaryDetails(); @@ -273,11 +273,11 @@ class ParentOrderControllerCore extends FrontController 'HOOK_SHOPPING_CART_EXTRA' => Module::hookExec('shoppingCartExtra', $summary) )); } - + protected function _assignAddress() { if (!Customer::getAddressesTotalById((int)(self::$cookie->id_customer))) - Tools::redirect('address.php?back=order.php?step=1'); + Tools::redirect('index.php?controller=address&back=order.php&step=1'); $customer = new Customer((int)(self::$cookie->id_customer)); if (Validate::isLoadedObject($customer)) { @@ -319,14 +319,14 @@ class ParentOrderControllerCore extends FrontController if ($oldMessage = Message::getMessageByCartId((int)(self::$cart->id))) self::$smarty->assign('oldMessage', $oldMessage['message']); } - + protected function _assignCarrier() { $customer = new Customer((int)(self::$cookie->id_customer)); $address = new Address((int)(self::$cart->id_address_delivery)); $id_zone = Address::getZoneById((int)($address->id)); $carriers = Carrier::getCarriersForOrder($id_zone, $customer->getGroups()); - + $checked = 0; if (Validate::isUnsignedInt(self::$cart->id_carrier) AND self::$cart->id_carrier) { @@ -342,14 +342,14 @@ class ParentOrderControllerCore extends FrontController 'HOOK_BEFORECARRIER' => Module::hookExec('beforeCarrier', array('carriers' => $carriers)) )); } - + protected function _assignWrappingAndTOS() { // Wrapping fees $wrapping_fees = (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE')); $wrapping_fees_tax = new Tax((int)(Configuration::get('PS_GIFT_WRAPPING_TAX'))); $wrapping_fees_tax_inc = $wrapping_fees * (1 + (((float)($wrapping_fees_tax->rate) / 100))); - + // TOS $cms = new CMS((int)(Configuration::get('PS_CONDITIONS_CMS_ID')), (int)(self::$cookie->id_lang)); $this->link_conditions = self::$link->getCMSLink($cms, $cms->link_rewrite, true); @@ -357,7 +357,7 @@ class ParentOrderControllerCore extends FrontController $this->link_conditions .= '?content_only=1'; else $this->link_conditions .= '&content_only=1'; - + self::$smarty->assign(array( 'checkedTOS' => (int)(self::$cookie->checkedTOS), 'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')), @@ -370,7 +370,7 @@ class ParentOrderControllerCore extends FrontController 'total_wrapping_cost' => Tools::convertPrice($wrapping_fees_tax_inc, new Currency((int)(self::$cookie->id_currency))), 'total_wrapping_tax_exc_cost' => Tools::convertPrice($wrapping_fees, new Currency((int)(self::$cookie->id_currency))))); } - + protected function _assignPayment() { self::$smarty->assign(array( @@ -378,7 +378,7 @@ class ParentOrderControllerCore extends FrontController 'HOOK_PAYMENT' => Module::hookExecPayment() )); } - + /** * Set id_carrier to 0 (no shipping price) * @@ -389,3 +389,4 @@ class ParentOrderControllerCore extends FrontController self::$cart->update(); } } + diff --git a/controllers/PasswordController.php b/controllers/PasswordController.php index 5d4dd6a25..a0f66eb51 100644 --- a/controllers/PasswordController.php +++ b/controllers/PasswordController.php @@ -1,6 +1,6 @@ php_self = 'password.php'; - + $this->php_self = 'password'; + parent::__construct(); } - + public function process() { parent::process(); @@ -55,13 +55,13 @@ class PasswordControllerCore extends FrontController if ((strtotime($customer->last_passwd_gen.'+'.(int)($min_time = Configuration::get('PS_PASSWD_TIME_FRONT')).' minutes') - time()) > 0) $this->errors[] = Tools::displayError('You can regenerate your password only each').' '.(int)($min_time).' '.Tools::displayError('minute(s)'); else - { - if (Mail::Send((int)(self::$cookie->id_lang), 'password_query', Mail::l('Password query confirmation'), - array('{email}' => $customer->email, - '{lastname}' => $customer->lastname, + { + if (Mail::Send((int)(self::$cookie->id_lang), 'password_query', Mail::l('Password query confirmation'), + array('{email}' => $customer->email, + '{lastname}' => $customer->lastname, '{firstname}' => $customer->firstname, - '{url}' => self::$link->getPageLink('password.php', true).'?token='.$customer->secure_key.'&id_customer='.(int)$customer->id), - $customer->email, + '{url}' => self::$link->getPageLink('password', true).'?token='.$customer->secure_key.'&id_customer='.(int)$customer->id), + $customer->email, $customer->firstname.' '.$customer->lastname)) self::$smarty->assign(array('confirmation' => 2, 'email' => $customer->email)); else @@ -78,20 +78,20 @@ class PasswordControllerCore extends FrontController $customer = new Customer(); $customer->getByemail($email); if ((strtotime($customer->last_passwd_gen.'+'.(int)($min_time = Configuration::get('PS_PASSWD_TIME_FRONT')).' minutes') - time()) > 0) - Tools::redirect('authentication.php?error_regen_pwd'); + Tools::redirect('index.php?controller=authentication&error_regen_pwd'); else { $customer->passwd = Tools::encrypt($password = Tools::passwdGen((int)(MIN_PASSWD_LENGTH))); $customer->last_passwd_gen = date('Y-m-d H:i:s', time()); if ($customer->update()) { - if (Mail::Send((int)(self::$cookie->id_lang), 'password', Mail::l('Your password'), - array('{email}' => $customer->email, - '{lastname}' => $customer->lastname, - '{firstname}' => $customer->firstname, - '{passwd}' => $password), - $customer->email, - $customer->firstname.' '.$customer->lastname)) + if (Mail::Send((int)(self::$cookie->id_lang), 'password', Mail::l('Your password'), + array('{email}' => $customer->email, + '{lastname}' => $customer->lastname, + '{firstname}' => $customer->firstname, + '{passwd}' => $password), + $customer->email, + $customer->firstname.' '.$customer->lastname)) self::$smarty->assign(array('confirmation' => 1, 'email' => $customer->email)); else $this->errors[] = Tools::displayError('Error occured when sending the e-mail.'); @@ -106,7 +106,7 @@ class PasswordControllerCore extends FrontController elseif (($token = Tools::getValue('token')) || ($id_customer = Tools::getValue('id_customer'))) $this->errors[] = Tools::displayError('We cannot regenerate your password with the data you submitted'); } - + public function displayContent() { parent::displayContent(); diff --git a/controllers/ProductController.php b/controllers/ProductController.php index ebc1a8b5a..27136835d 100644 --- a/controllers/ProductController.php +++ b/controllers/ProductController.php @@ -54,7 +54,7 @@ class ProductControllerCore extends FrontController { if ($id_product = (int)Tools::getValue('id_product')) $this->product = new Product($id_product, true, self::$cookie->id_lang); - + if (!Validate::isLoadedObject($this->product)) { header('HTTP/1.1 404 Not Found'); @@ -67,6 +67,7 @@ class ProductControllerCore extends FrontController if (Validate::isLoadedObject($this->product)) { $canonicalURL = self::$link->getProductLink($this->product); + p($canonicalURL); if (!preg_match('/^'.Tools::pRegexp($canonicalURL, '/').'([&?].*)?$/', Tools::getProtocol().$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])) { header('HTTP/1.0 301 Moved'); diff --git a/discount.php b/discount.php index 973297f96..4ca652267 100644 --- a/discount.php +++ b/discount.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/discount'.$params); + diff --git a/get-file.php b/get-file.php index c66cc201b..6a87631d0 100644 --- a/get-file.php +++ b/get-file.php @@ -68,7 +68,7 @@ if ($cookie->isLoggedBack() AND Tools::getValue('file')) } if (!file_exists($file)) - Tools::redirect('index.php'); + Tools::redirect('index.php/index'); } else { @@ -78,7 +78,7 @@ else $cookie = new Cookie('ps'); Tools::setCookieLanguage(); if (!$cookie->isLogged() AND !Tools::getValue('secure_key') AND !Tools::getValue('id_order')) - Tools::redirect('authentication.php?back=get-file.php&key='.$key); + Tools::redirect('index.php/authentication?back=get-file.php&key='.$key); elseif (!$cookie->isLogged() AND Tools::getValue('secure_key') AND Tools::getValue('id_order')) { $order = new Order((int)Tools::getValue('id_order')); diff --git a/guest-tracking.php b/guest-tracking.php index c5ac5c5e3..ff7ecc538 100644 --- a/guest-tracking.php +++ b/guest-tracking.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/guest-tracking'.$params); + diff --git a/history.php b/history.php index 11370d2ce..faf8d91ab 100644 --- a/history.php +++ b/history.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/history'.$params); + diff --git a/identity.php b/identity.php index 4dac92f1c..36be0e8fc 100644 --- a/identity.php +++ b/identity.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/identity'.$params); + diff --git a/index.php b/index.php index 47cef0884..eb9ad6a34 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,7 @@ + run(); +$dispatcher = new Dispatcher(); +$dispatcher->dispatch(); + diff --git a/manufacturer.php b/manufacturer.php index 13066d8f4..d08faf42f 100644 --- a/manufacturer.php +++ b/manufacturer.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/manufacturer'.$params); + diff --git a/modules/authorizeaim/validation.php b/modules/authorizeaim/validation.php index 23e93219b..c86103ad9 100755 --- a/modules/authorizeaim/validation.php +++ b/modules/authorizeaim/validation.php @@ -60,7 +60,7 @@ if (!isset($response[7]) OR !isset($response[3]) OR !isset($response[9])) } if ($response[0] == 3) - Tools::redirect('order.php?step=3&aimerror=1'); + Tools::redirect('index.php/order?step=3&aimerror=1'); else { /* Does the cart exist and is valid? */ @@ -82,6 +82,6 @@ else else $authorizeaim->validateOrder((int)$cart->id, _PS_OS_ERROR_, (float)$response[9], $authorizeaim->displayName, $message); - Tools::redirect('order-confirmation.php?id_module='.(int)$authorizeaim->id.'&id_cart='.(int)$cart->id.'&key='.$customer->secure_key); + Tools::redirect('index.php/order-confirmation?id_module='.(int)$authorizeaim->id.'&id_cart='.(int)$cart->id.'&key='.$customer->secure_key); } diff --git a/modules/bankwire/payment.php b/modules/bankwire/payment.php index fefc3279a..36ad44ef6 100644 --- a/modules/bankwire/payment.php +++ b/modules/bankwire/payment.php @@ -33,7 +33,7 @@ include(dirname(__FILE__).'/../../header.php'); include(dirname(__FILE__).'/bankwire.php'); if (!$cookie->isLogged(true)) - Tools::redirect('authentication.php?back=order.php'); + Tools::redirect('index.php/authentication?back=order.php'); $bankwire = new BankWire(); echo $bankwire->execPayment($cart); diff --git a/modules/bankwire/payment_execution.tpl b/modules/bankwire/payment_execution.tpl index b506447cc..1585c9984 100644 --- a/modules/bankwire/payment_execution.tpl +++ b/modules/bankwire/payment_execution.tpl @@ -73,7 +73,7 @@ {l s='Please confirm your order by clicking \'I confirm my order\'' mod='bankwire'}.

- {l s='Other payment methods' mod='bankwire'} + {l s='Other payment methods' mod='bankwire'}

diff --git a/modules/bankwire/payment_return.tpl b/modules/bankwire/payment_return.tpl index 322c8d9f9..c6749e952 100644 --- a/modules/bankwire/payment_return.tpl +++ b/modules/bankwire/payment_return.tpl @@ -35,11 +35,11 @@

- {l s='Do not forget to insert your order #' mod='bankwire'} {$id_order} {l s='in the subject of your bank wire' mod='bankwire'}

{l s='An e-mail has been sent to you with this information.' mod='bankwire'}

{l s='Your order will be sent as soon as we receive your settlement.' mod='bankwire'} -

{l s='For any questions or for further information, please contact our' mod='bankwire'} {l s='customer support' mod='bankwire'}. +

{l s='For any questions or for further information, please contact our' mod='bankwire'} {l s='customer support' mod='bankwire'}.

{else}

{l s='We noticed a problem with your order. If you think this is an error, you can contact our' mod='bankwire'} - {l s='customer support' mod='bankwire'}. + {l s='customer support' mod='bankwire'}.

{/if} diff --git a/modules/blockbestsellers/blockbestsellers.tpl b/modules/blockbestsellers/blockbestsellers.tpl index 74aff46b1..6dc45854b 100644 --- a/modules/blockbestsellers/blockbestsellers.tpl +++ b/modules/blockbestsellers/blockbestsellers.tpl @@ -26,7 +26,7 @@
-

{l s='Top sellers' mod='blockbestsellers'}

+

{l s='Top sellers' mod='blockbestsellers'}

{if $best_sellers|@count > 0}
diff --git a/modules/blockcms/blockcms.tpl b/modules/blockcms/blockcms.tpl index 813e8330e..b3ccf8154 100755 --- a/modules/blockcms/blockcms.tpl +++ b/modules/blockcms/blockcms.tpl @@ -38,7 +38,7 @@ {foreach from=$cms_title.cms item=cms_page} {if isset($cms_page.link)}
  • {$cms_page.meta_title|escape:html:'UTF-8'}
  • {/if} {/foreach} - {if $cms_title.display_store}
  • {l s='Our stores' mod='blockcms'}
  • {/if} + {if $cms_title.display_store}
  • {l s='Our stores' mod='blockcms'}
  • {/if}
    {/foreach} @@ -46,11 +46,11 @@ {else}

    - {l s='All specials' mod='blockspecials'} + {l s='All specials' mod='blockspecials'}

    {else}

    {l s='No specials at this time' mod='blockspecials'}

    {/if} - \ No newline at end of file + + diff --git a/modules/blockstore/blockstore.tpl b/modules/blockstore/blockstore.tpl index 5df070316..c11619079 100644 --- a/modules/blockstore/blockstore.tpl +++ b/modules/blockstore/blockstore.tpl @@ -26,11 +26,11 @@
    -

    {l s='Our stores' mod='blockstore'}

    +

    {l s='Our stores' mod='blockstore'}

    - {l s='Our stores' mod='blockstore'}
    - {l s='Discover our stores' mod='blockstore'} + {l s='Our stores' mod='blockstore'}
    + {l s='Discover our stores' mod='blockstore'}

    diff --git a/modules/blocksupplier/blocksupplier.tpl b/modules/blocksupplier/blocksupplier.tpl index 090285990..e5167d3b8 100644 --- a/modules/blocksupplier/blocksupplier.tpl +++ b/modules/blocksupplier/blocksupplier.tpl @@ -26,7 +26,7 @@
    -

    {if $display_link_supplier}{/if}{l s='Suppliers' mod='blocksupplier'}{if $display_link_supplier}{/if}

    +

    {if $display_link_supplier}{/if}{l s='Suppliers' mod='blocksupplier'}{if $display_link_supplier}{/if}

    {if $suppliers} {if $text_list} diff --git a/modules/blocktags/blocktags.tpl b/modules/blocktags/blocktags.tpl index 641cf522b..02ba923dc 100644 --- a/modules/blocktags/blocktags.tpl +++ b/modules/blocktags/blocktags.tpl @@ -30,7 +30,7 @@

    {if $tags} {foreach from=$tags item=tag name=myLoop} - {$tag.name|escape:html:'UTF-8'} + {$tag.name|escape:html:'UTF-8'} {/foreach} {else} {l s='No tags specified yet' mod='blocktags'} diff --git a/modules/blockuserinfo/blockuserinfo.tpl b/modules/blockuserinfo/blockuserinfo.tpl index bbda8698b..bf303a3c5 100644 --- a/modules/blockuserinfo/blockuserinfo.tpl +++ b/modules/blockuserinfo/blockuserinfo.tpl @@ -30,15 +30,15 @@ {l s='Welcome' mod='blockuserinfo'}, {if $cookie->isLogged()} {$cookie->customer_firstname} {$cookie->customer_lastname} - ({l s='Log out' mod='blockuserinfo'}) + ({l s='Log out' mod='blockuserinfo'}) {else} - {l s='Log in' mod='blockuserinfo'} + {l s='Log in' mod='blockuserinfo'} {/if}

    diff --git a/modules/blockwishlist/mywishlist.php b/modules/blockwishlist/mywishlist.php index 52e32bf9e..5043eeebe 100644 --- a/modules/blockwishlist/mywishlist.php +++ b/modules/blockwishlist/mywishlist.php @@ -86,7 +86,7 @@ if ($cookie->isLogged()) } else { - Tools::redirect('authentication.php?back=modules/blockwishlist/mywishlist.php'); + Tools::redirect('index.php/authentication?back=modules/blockwishlist/mywishlist.php'); } $smarty->assign(array( diff --git a/modules/blockwishlist/mywishlist.tpl b/modules/blockwishlist/mywishlist.tpl index 466810317..695c59c90 100644 --- a/modules/blockwishlist/mywishlist.tpl +++ b/modules/blockwishlist/mywishlist.tpl @@ -31,7 +31,7 @@
    - {capture name=path}{l s='My account' mod='blockwishlist'}{$navigationPipe}{l s='My wishlists' mod='blockwishlist'}{/capture} + {capture name=path}{l s='My account' mod='blockwishlist'}{$navigationPipe}{l s='My wishlists' mod='blockwishlist'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"}

    {l s='My wishlists' mod='blockwishlist'}

    @@ -94,7 +94,7 @@ {/if}
    diff --git a/modules/blockwishlist/view.tpl b/modules/blockwishlist/view.tpl index a827c99c1..3a1804fbd 100644 --- a/modules/blockwishlist/view.tpl +++ b/modules/blockwishlist/view.tpl @@ -71,7 +71,7 @@ {l s='View' mod='blockwishlist'} {if isset($product.attribute_quantity) AND $product.attribute_quantity >= 1 OR !isset($product.attribute_quantity) AND $product.product_quantity >= 1} {if !$ajax} - + diff --git a/modules/cashondelivery/validation.tpl b/modules/cashondelivery/validation.tpl index a6a2a8c2c..33994ccd6 100644 --- a/modules/cashondelivery/validation.tpl +++ b/modules/cashondelivery/validation.tpl @@ -52,7 +52,7 @@ {l s='Please confirm your order by clicking \'I confirm my order\'' mod='cashondelivery'}.

    - {l s='Other payment methods' mod='cashondelivery'} + {l s='Other payment methods' mod='cashondelivery'}

    diff --git a/modules/cashticket/payment.php b/modules/cashticket/payment.php index 88e037a26..5b11ee7c6 100644 --- a/modules/cashticket/payment.php +++ b/modules/cashticket/payment.php @@ -31,11 +31,11 @@ include(dirname(__FILE__).'/cashticket.php'); $module = new CashTicket(); if (!$cart->id OR $cart->id_customer == 0 OR $cart->id_address_delivery == 0 OR $cart->id_address_invoice == 0 OR !$module->active) - Tools::redirect('order.php?step=3'); + Tools::redirect('index.php/order?step=3'); $currency = new Currency($cart->id_currency); if (!$module->isCurrencyActive($currency->iso_code)) - Tools::redirect('order.php?step=3'); + Tools::redirect('index.php/order?step=3'); $amount = number_format((float)($cart->getOrderTotal(true, Cart::BOTH)), 2, '.',''); if (Tools::getValue('hash') != md5(Configuration::get($module->prefix.'SALT') + $amount + $currency->iso_code)) @@ -98,7 +98,7 @@ if ($state == _PS_OS_ERROR_) else { $order = new Order($module->currentOrder); - Tools::redirect('order-confirmation.php?id_cart='.(int)($cart->id).'&id_module='.(int)($module->id).'&id_order='.(int)($module->currentOrder).'&key='.$order->secure_key); + Tools::redirect('index.php/order-confirmation?id_cart='.(int)($cart->id).'&id_module='.(int)($module->id).'&id_order='.(int)($module->currentOrder).'&key='.$order->secure_key); } diff --git a/modules/cashticket/redirect.php b/modules/cashticket/redirect.php index ca03e7dc9..78d1850bf 100644 --- a/modules/cashticket/redirect.php +++ b/modules/cashticket/redirect.php @@ -31,11 +31,11 @@ include(dirname(__FILE__).'/cashticket.php'); $module = new CashTicket(); if (!$cart->id OR $cart->id_customer == 0 OR $cart->id_address_delivery == 0 OR $cart->id_address_invoice == 0 OR !$module->active) - Tools::redirect('order.php?step=3'); + Tools::redirect('index.php/order?step=3'); $currency = new Currency($cart->id_currency); if (!$module->isCurrencyActive($currency->iso_code)) - Tools::redirect('order.php?step=3'); + Tools::redirect('index.php/order?step=3'); $result = $module->createDisposition($cart); diff --git a/modules/cheque/payment.php b/modules/cheque/payment.php index 7e2028f5a..b6bacd258 100644 --- a/modules/cheque/payment.php +++ b/modules/cheque/payment.php @@ -33,7 +33,7 @@ include(dirname(__FILE__).'/../../header.php'); include(dirname(__FILE__).'/cheque.php'); if (!$cookie->isLogged(true)) - Tools::redirect('authentication.php?back=order.php'); + Tools::redirect('index.php/authentication?back=order.php'); $cheque = new Cheque(); echo $cheque->execPayment($cart); diff --git a/modules/cheque/payment.tpl b/modules/cheque/payment.tpl index c1d9f81d0..688d54e00 100644 --- a/modules/cheque/payment.tpl +++ b/modules/cheque/payment.tpl @@ -25,8 +25,8 @@ *}

    - + {l s='Pay by cheque' mod='cheque'} {l s='Pay by cheque (order process will be longer)' mod='cheque'} -

    \ No newline at end of file +

    diff --git a/modules/cheque/payment_execution.tpl b/modules/cheque/payment_execution.tpl index 5a9ba018e..dd76f7c05 100644 --- a/modules/cheque/payment_execution.tpl +++ b/modules/cheque/payment_execution.tpl @@ -73,7 +73,7 @@ {l s='Please confirm your order by clicking \'I confirm my order\'' mod='cheque'}.

    - {l s='Other payment methods' mod='cheque'} + {l s='Other payment methods' mod='cheque'}

    diff --git a/modules/cheque/payment_return.tpl b/modules/cheque/payment_return.tpl index a02ace82f..bdb811801 100644 --- a/modules/cheque/payment_return.tpl +++ b/modules/cheque/payment_return.tpl @@ -33,11 +33,11 @@

    - {l s='mail to' mod='cheque'} {if $chequeAddress}{$chequeAddress}{else}___________{/if}

    {l s='An e-mail has been sent to you with this information.' mod='cheque'}

    {l s='Your order will be sent as soon as we receive your payment.' mod='cheque'} -

    {l s='For any questions or for further information, please contact our' mod='cheque'} {l s='customer support' mod='cheque'}. +

    {l s='For any questions or for further information, please contact our' mod='cheque'} {l s='customer support' mod='cheque'}.

    {else}

    {l s='We noticed a problem with your order. If you think this is an error, you can contact our' mod='cheque'} - {l s='customer support' mod='cheque'}. + {l s='customer support' mod='cheque'}.

    {/if} diff --git a/modules/cheque/validation.php b/modules/cheque/validation.php index aee6b2340..1c9a620c9 100644 --- a/modules/cheque/validation.php +++ b/modules/cheque/validation.php @@ -1,6 +1,6 @@ id_customer == 0 OR $cart->id_address_delivery == 0 OR $cart->id_address_invoice == 0 OR !$cheque->active) - Tools::redirectLink(__PS_BASE_URI__.'order.php?step=1'); + Tools::redirectLink(__PS_BASE_URI__.'index.php/order?step=1'); $customer = new Customer((int)$cart->id_customer); if (!Validate::isLoadedObject($customer)) - Tools::redirectLink(__PS_BASE_URI__.'order.php?step=1'); + Tools::redirectLink(__PS_BASE_URI__.'index.php/order?step=1'); $currency = new Currency((int)(isset($_POST['currency_payement']) ? $_POST['currency_payement'] : $cookie->id_currency)); $total = (float)($cart->getOrderTotal(true, Cart::BOTH)); @@ -49,5 +49,5 @@ $mailVars = array( $cheque->validateOrder((int)($cart->id), _PS_OS_CHEQUE_, $total, $cheque->displayName, NULL, $mailVars, (int)($currency->id), false, $customer->secure_key); -Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?id_cart='.(int)($cart->id).'&id_module='.(int)($cheque->id).'&id_order='.$cheque->currentOrder.'&key='.$customer->secure_key); +Tools::redirectLink(__PS_BASE_URI__.'index.php/order-confirmation?id_cart='.(int)($cart->id).'&id_module='.(int)($cheque->id).'&id_order='.$cheque->currentOrder.'&key='.$customer->secure_key); diff --git a/modules/gcheckout/confirm.tpl b/modules/gcheckout/confirm.tpl index e6976b218..8f5073f69 100644 --- a/modules/gcheckout/confirm.tpl +++ b/modules/gcheckout/confirm.tpl @@ -24,7 +24,7 @@ * International Registered Trademark & Property of PrestaShop SA *} -{capture name=path}{l s='Your shopping cart' mod='gcheckout'}{$navigationPipe}{l s='Google Checkout' mod='gcheckout'}{/capture} +{capture name=path}{l s='Your shopping cart' mod='gcheckout'}{$navigationPipe}{l s='Google Checkout' mod='gcheckout'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"}

    {l s='Order summary' mod='gcheckout'}

    @@ -49,8 +49,8 @@ {l s='Please confirm your order by clicking \'I confirm my order\'' mod='gcheckout'}.

    - {l s='Other payment methods' mod='gcheckout'} + {l s='Other payment methods' mod='gcheckout'} {l s='I confirm my order' mod='gcheckout'}

    -{$googleCheckoutExtraForm} \ No newline at end of file +{$googleCheckoutExtraForm} diff --git a/modules/gcheckout/payment.php b/modules/gcheckout/payment.php index fd792dbe5..15cc10a39 100644 --- a/modules/gcheckout/payment.php +++ b/modules/gcheckout/payment.php @@ -30,7 +30,7 @@ include(dirname(__FILE__).'/../../init.php'); include(dirname(__FILE__).'/gcheckout.php'); if (!$cookie->isLogged(true)) - Tools::redirect('authentication.php?back=order.php'); + Tools::redirect('index.php/authentication?back=order.php'); elseif (!$cart->getOrderTotal(true, Cart::BOTH)) Tools::displayError('Error: Empty cart'); diff --git a/modules/gsitemap/config.xml b/modules/gsitemap/config.xml index a6d6f5979..5a6c6826e 100755 --- a/modules/gsitemap/config.xml +++ b/modules/gsitemap/config.xml @@ -8,4 +8,5 @@ seo 1 1 + \ No newline at end of file diff --git a/modules/gsitemap/gsitemap.php b/modules/gsitemap/gsitemap.php index 8e5ec4388..a1e32e715 100644 --- a/modules/gsitemap/gsitemap.php +++ b/modules/gsitemap/gsitemap.php @@ -185,6 +185,9 @@ XML; 'supplier' => false, 'store' => false); + foreach ($pages AS $page => $ssl) + foreach($langs as $lang) + $this->_addSitemapNode($xml, $link->getPageLink($page, $ssl, $lang['id_lang']), '0.5', 'monthly'); if(Configuration::get('PS_REWRITING_SETTINGS')) foreach ($pages AS $page => $ssl) diff --git a/modules/hipay/redirect.php b/modules/hipay/redirect.php index b56324096..ee1974d7b 100644 --- a/modules/hipay/redirect.php +++ b/modules/hipay/redirect.php @@ -33,7 +33,7 @@ include(dirname(__FILE__).'/../../init.php'); include(dirname(__FILE__).'/hipay.php'); if (!$cookie->isLogged(true)) - Tools::redirect('authentication.php?back=order.php'); + Tools::redirect('index.php/authentication?back=order.php'); $hipay = new HiPay(); $hipay->payment(); diff --git a/modules/homefeatured/homefeatured.tpl b/modules/homefeatured/homefeatured.tpl index bda1f89e0..2db9282ce 100644 --- a/modules/homefeatured/homefeatured.tpl +++ b/modules/homefeatured/homefeatured.tpl @@ -45,7 +45,7 @@ {l s='View' mod='homefeatured'} {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} {if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2} - {l s='Add to cart' mod='homefeatured'} + {l s='Add to cart' mod='homefeatured'} {else} {l s='Add to cart' mod='homefeatured'} {/if} diff --git a/modules/loyalty/loyalty-program.php b/modules/loyalty/loyalty-program.php index cfb1baaa1..f5afcee3e 100644 --- a/modules/loyalty/loyalty-program.php +++ b/modules/loyalty/loyalty-program.php @@ -35,7 +35,7 @@ include_once(dirname(__FILE__).'/LoyaltyModule.php'); include_once(dirname(__FILE__).'/LoyaltyStateModule.php'); if (!$cookie->isLogged()) - Tools::redirect('authentication.php?back=modules/loyalty/loyalty-program.php'); + Tools::redirect('index.php/authentication?back=modules/loyalty/loyalty-program.php'); Tools::addCSS(_PS_CSS_DIR_.'jquery.cluetip.css', 'all'); Tools::addJS(array(_PS_JS_DIR_.'jquery/jquery.dimensions.js',_PS_JS_DIR_.'jquery/jquery.cluetip.js')); diff --git a/modules/loyalty/loyalty.tpl b/modules/loyalty/loyalty.tpl index ce1b4dc82..b602820a8 100644 --- a/modules/loyalty/loyalty.tpl +++ b/modules/loyalty/loyalty.tpl @@ -30,7 +30,7 @@ --> -{capture name=path}{l s='My account' mod='loyalty'}{$navigationPipe}{l s='My loyalty points' mod='loyalty'}{/capture} +{capture name=path}{l s='My account' mod='loyalty'}{$navigationPipe}{l s='My loyalty points' mod='loyalty'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"}

    {l s='My loyalty points' mod='loyalty'}

    @@ -199,6 +199,6 @@ $(document).ready(function() {/if} diff --git a/modules/mailalerts/myalerts.tpl b/modules/mailalerts/myalerts.tpl index e6e7c9f24..8a2f1052b 100644 --- a/modules/mailalerts/myalerts.tpl +++ b/modules/mailalerts/myalerts.tpl @@ -31,7 +31,7 @@
    - {capture name=path}{l s='My account' mod='mailalerts'}{$navigationPipe}{l s='My alerts' mod='mailalerts'}{/capture} + {capture name=path}{l s='My account' mod='mailalerts'}{$navigationPipe}{l s='My alerts' mod='mailalerts'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"}

    {l s='My alerts' mod='mailalerts'}

    @@ -73,7 +73,7 @@ {/if}
    diff --git a/modules/mondialrelay/mondialrelay.php b/modules/mondialrelay/mondialrelay.php index 6a9be6b08..d251ddeea 100755 --- a/modules/mondialrelay/mondialrelay.php +++ b/modules/mondialrelay/mondialrelay.php @@ -340,7 +340,7 @@ class MondialRelay extends Module { if (empty($_POST['MR_Selected_Num_'.$cart->id_carrier])) // Case error : the customer didn't choose a 'relais' but selected Relais Colis TNT as a carrier - Tools::redirect('order.php?step=2&mr_null'); + Tools::redirect('index.php/order?step=2&mr_null'); else { Db::getInstance()->delete(_DB_PREFIX_.'mr_selected','id_cart = "'.(int)($cart->id).'"'); diff --git a/modules/moneybookers/confirmation.tpl b/modules/moneybookers/confirmation.tpl index 7266f0bc5..7314306ec 100644 --- a/modules/moneybookers/confirmation.tpl +++ b/modules/moneybookers/confirmation.tpl @@ -27,18 +27,18 @@ {if $status == 'ok'}

    {l s='Your order on' mod='moneybookers'} {$shop_name} {l s='is complete.' mod='moneybookers'}

    {l s='Your order will be shipped as soon as possible.' mod='moneybookers'} -

    {l s='For any questions or for further information, please contact our' mod='moneybookers'} {l s='customer support' mod='moneybookers'}. +

    {l s='For any questions or for further information, please contact our' mod='moneybookers'} {l s='customer support' mod='moneybookers'}.

    {else} {if $status == 'pending'}

    {l s='Your order on' mod='moneybookers'} {$shop_name} {l s='is pending.' mod='moneybookers'}

    {l s='Your order will be shipped as soon as we receive your bankwire.' mod='moneybookers'} -

    {l s='For any questions or for further information, please contact our' mod='moneybookers'} {l s='customer support' mod='moneybookers'}. +

    {l s='For any questions or for further information, please contact our' mod='moneybookers'} {l s='customer support' mod='moneybookers'}.

    {else}

    {l s='We noticed a problem with your order. If you think this is an error, you can contact our' mod='moneybookers'} - {l s='customer support' mod='moneybookers'}. + {l s='customer support' mod='moneybookers'}.

    {/if} {/if} diff --git a/modules/ogone/config.xml b/modules/ogone/config.xml index 7441290dd..4e2eae3cb 100755 --- a/modules/ogone/config.xml +++ b/modules/ogone/config.xml @@ -8,4 +8,5 @@ payments_gateways 1 1 + \ No newline at end of file diff --git a/modules/ogone/confirmation.php b/modules/ogone/confirmation.php index 357b49be1..69ad330e3 100644 --- a/modules/ogone/confirmation.php +++ b/modules/ogone/confirmation.php @@ -39,7 +39,7 @@ $smarty->assign(array( 'id_module' => $id_module, 'id_cart' => $id_cart, 'key' => $key, - 'ogone_link' => (method_exists($link, 'getPageLink') ? $link->getPageLink('my-account.php') : _PS_BASE_URL_.'my-account.php') + 'ogone_link' => (method_exists($link, 'getPageLink') ? $link->getPageLink('my-account') : _PS_BASE_URL_.'my-account') )); echo $ogone->display(__FILE__, 'waiting.tpl'); diff --git a/modules/ogone/ogone.php b/modules/ogone/ogone.php index dba8c7e51..173578851 100644 --- a/modules/ogone/ogone.php +++ b/modules/ogone/ogone.php @@ -186,7 +186,7 @@ class Ogone extends PaymentModule else $smarty->assign('status', 'failed'); $link = new Link(); - $smarty->assign('ogone_link', (method_exists($link, 'getPageLink') ? $link->getPageLink('contact-form.php', true) : Tools::getHttpHost(true).'contact-form.php')); + $smarty->assign('ogone_link', (method_exists($link, 'getPageLink') ? $link->getPageLink('contact-form', true) : Tools::getHttpHost(true).'contact-form')); return $this->display(__FILE__, 'hookorderconfirmation.tpl'); } diff --git a/modules/paypal/confirm.tpl b/modules/paypal/confirm.tpl index c30d1fbc0..1d78ef1bf 100644 --- a/modules/paypal/confirm.tpl +++ b/modules/paypal/confirm.tpl @@ -24,7 +24,7 @@ * International Registered Trademark & Property of PrestaShop SA *} -{capture name=path}{l s='Your shopping cart' mod='paypal'}{$navigationPipe}{l s='PayPal' mod='paypal'}{/capture} +{capture name=path}{l s='Your shopping cart' mod='paypal'}{$navigationPipe}{l s='PayPal' mod='paypal'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"}

    {l s='Order summary' mod='paypal'}

    @@ -54,7 +54,7 @@ {l s='Please confirm your order by clicking \'I confirm my order\'' mod='paypal'}.

    - {l s='Other payment methods' mod='paypal'} + {l s='Other payment methods' mod='paypal'}

    diff --git a/modules/paypal/confirmation.tpl b/modules/paypal/confirmation.tpl index 201ebcd14..f0d7311f0 100644 --- a/modules/paypal/confirmation.tpl +++ b/modules/paypal/confirmation.tpl @@ -28,5 +28,5 @@

    {l s='You have chosen the PayPal method.' mod='paypal'}

    {l s='Your order will be sent very soon.' mod='paypal'} -

    {l s='For any questions or for further information, please contact our' mod='paypal'} {l s='customer support' mod='paypal'}. +

    {l s='For any questions or for further information, please contact our' mod='paypal'} {l s='customer support' mod='paypal'}.

    diff --git a/modules/paypal/error.tpl b/modules/paypal/error.tpl index c2e334b12..bb7f636dd 100644 --- a/modules/paypal/error.tpl +++ b/modules/paypal/error.tpl @@ -24,7 +24,7 @@ * International Registered Trademark & Property of PrestaShop SA *} -{capture name=path}{l s='Your shopping cart' mod='paypal'}{$navigationPipe}{l s='PayPal' mod='paypal'}{/capture} +{capture name=path}{l s='Your shopping cart' mod='paypal'}{$navigationPipe}{l s='PayPal' mod='paypal'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"}

    {$message}

    diff --git a/modules/paypal/express/login.tpl b/modules/paypal/express/login.tpl index 21d18b282..e0579e5e0 100644 --- a/modules/paypal/express/login.tpl +++ b/modules/paypal/express/login.tpl @@ -47,6 +47,6 @@

    -

    {l s='Forgot your password?' mod='paypal'}

    +

    {l s='Forgot your password?' mod='paypal'}

    diff --git a/modules/paypal/express/submit.php b/modules/paypal/express/submit.php index 4c3bf53fa..195d6f635 100644 --- a/modules/paypal/express/submit.php +++ b/modules/paypal/express/submit.php @@ -88,7 +88,7 @@ function displayProcess($payerID) $cookie->paypal_token = strval($cookie->paypal_token); $cookie->paypal_payer_id = $payerID; - Tools::redirect('order.php?step=1&back=paypal'); + Tools::redirect('index.php/order?step=1&back=paypal'); } function displayConfirm() diff --git a/modules/paysafecard/payment.php b/modules/paysafecard/payment.php index 96b5d5255..ee374b979 100644 --- a/modules/paysafecard/payment.php +++ b/modules/paysafecard/payment.php @@ -31,11 +31,11 @@ include(dirname(__FILE__).'/paysafecard.php'); $module = new PaysafeCard(); if (!$cart->id OR $cart->id_customer == 0 OR $cart->id_address_delivery == 0 OR $cart->id_address_invoice == 0 OR !$module->active) - Tools::redirect('order.php?step=3'); + Tools::redirect('index.php/order?step=3'); $currency = new Currency($cart->id_currency); if (!$module->isCurrencyActive($currency->iso_code)) - Tools::redirect('order.php?step=3'); + Tools::redirect('index.php/order?step=3'); $amount = number_format((float)($cart->getOrderTotal(true, Cart::BOTH)), 2, '.',''); if (Tools::getValue('hash') != md5(Configuration::get($module->prefix.'SALT') + $amount + $currency->iso_code)) @@ -95,7 +95,7 @@ if ($state == _PS_OS_ERROR_) else { $order = new Order($module->currentOrder); - Tools::redirect('order-confirmation.php?id_cart='.(int)($cart->id).'&id_module='.(int)($module->id).'&id_order='.(int)($module->currentOrder).'&key='.$order->secure_key); + Tools::redirect('index.php/order-confirmation?id_cart='.(int)($cart->id).'&id_module='.(int)($module->id).'&id_order='.(int)($module->currentOrder).'&key='.$order->secure_key); } diff --git a/modules/paysafecard/redirect.php b/modules/paysafecard/redirect.php index 2ea48a3ee..6c52ee929 100644 --- a/modules/paysafecard/redirect.php +++ b/modules/paysafecard/redirect.php @@ -31,11 +31,11 @@ include(dirname(__FILE__).'/paysafecard.php'); $module = new PaysafeCard(); if (!$cart->id OR $cart->id_customer == 0 OR $cart->id_address_delivery == 0 OR $cart->id_address_invoice == 0 OR !$module->active) - Tools::redirect('order.php?step=3'); + Tools::redirect('index.php/order?step=3'); $currency = new Currency($cart->id_currency); if (!$module->isCurrencyActive($currency->iso_code)) - Tools::redirect('order.php?step=3'); + Tools::redirect('index.php/order?step=3'); $result = $module->createDisposition($cart); diff --git a/modules/referralprogram/referralprogram-program.php b/modules/referralprogram/referralprogram-program.php index 69ed417d2..45de3000a 100644 --- a/modules/referralprogram/referralprogram-program.php +++ b/modules/referralprogram/referralprogram-program.php @@ -33,7 +33,7 @@ require_once(dirname(__FILE__).'/../../init.php'); include_once(dirname(__FILE__).'/ReferralProgramModule.php'); if (!$cookie->isLogged()) - Tools::redirect('authentication.php?back=modules/referralprogram/referralprogram-program.php'); + Tools::redirect('index.php/authentication?back=modules/referralprogram/referralprogram-program.php'); Tools::addCSS(_PS_CSS_DIR_.'thickbox.css', 'all'); Tools::addJS(array(_PS_JS_DIR_.'jquery/thickbox-modified.js',_PS_JS_DIR_.'jquery/jquery.idTabs.modified.js')); diff --git a/modules/referralprogram/referralprogram-program.tpl b/modules/referralprogram/referralprogram-program.tpl index 4504fd7b6..68e4d42f5 100644 --- a/modules/referralprogram/referralprogram-program.tpl +++ b/modules/referralprogram/referralprogram-program.tpl @@ -38,7 +38,7 @@ //]]> -{capture name=path}{l s='My account' mod='referralprogram'}{$navigationPipe}{l s='Referral Program' mod='referralprogram'}{/capture} +{capture name=path}{l s='My account' mod='referralprogram'}{$navigationPipe}{l s='Referral Program' mod='referralprogram'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"}

    {l s='Referral program' mod='referralprogram'}

    @@ -218,6 +218,6 @@
    diff --git a/modules/socolissimo/validation.php b/modules/socolissimo/validation.php index 5906edde8..a06e67cc7 100644 --- a/modules/socolissimo/validation.php +++ b/modules/socolissimo/validation.php @@ -63,7 +63,7 @@ if (isset($return['SIGNATURE']) AND isset($return['CENAME']) AND isset($return[' if (!$cart->update()) Tools::redirect(); else - Tools::redirect('order.php?step=3'); + Tools::redirect('index.php/order?step=3'); } else echo '
    nok '.$so->displaySoError('999').' diff --git a/modules/trackingfront/stats.php b/modules/trackingfront/stats.php index d39b33819..c3964a85e 100644 --- a/modules/trackingfront/stats.php +++ b/modules/trackingfront/stats.php @@ -31,7 +31,7 @@ include(dirname(__FILE__).'/trackingfront.php'); $tf = new TrackingFront(); if (!$tf->active) - Tools::redirect('404.php'); + Tools::redirect('index.php/404'); $tf->postProcess(); echo $tf->isLogged() ? $tf->displayAccount() : $tf->displayLogin(); diff --git a/my-account.php b/my-account.php index 6b1a55406..f02551870 100644 --- a/my-account.php +++ b/my-account.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/my-account'.$params); + diff --git a/new-products.php b/new-products.php index 920f93cd4..1736dbbea 100644 --- a/new-products.php +++ b/new-products.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/new-products'.$params); + diff --git a/order-confirmation.php b/order-confirmation.php index 3a4b3213f..213231451 100644 --- a/order-confirmation.php +++ b/order-confirmation.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/order-confirmation'.$params); + diff --git a/order-detail.php b/order-detail.php index 378ed4c9a..4f401758b 100644 --- a/order-detail.php +++ b/order-detail.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/order-detail'.$params); + diff --git a/order-follow.php b/order-follow.php index b6c5e65c3..3c1768fc4 100644 --- a/order-follow.php +++ b/order-follow.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/order-follow'.$params); + diff --git a/order-opc.php b/order-opc.php index 8a4ab82ce..267b865c5 100755 --- a/order-opc.php +++ b/order-opc.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/order-opc'.$params); + diff --git a/order-return.php b/order-return.php index 1ae53029e..46b12abd5 100644 --- a/order-return.php +++ b/order-return.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/order-return'.$params); + diff --git a/order-slip.php b/order-slip.php index 933ae5927..d81c70e79 100644 --- a/order-slip.php +++ b/order-slip.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/order-slip'.$params); + diff --git a/order.php b/order.php index b66bbd10a..aeb11c09f 100644 --- a/order.php +++ b/order.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/order'.$params); + diff --git a/password.php b/password.php index dc8097be0..84c2cbd2f 100644 --- a/password.php +++ b/password.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/password'.$params); + diff --git a/pdf-invoice.php b/pdf-invoice.php index 478f8e4ae..e77c38d48 100644 --- a/pdf-invoice.php +++ b/pdf-invoice.php @@ -30,7 +30,7 @@ include(dirname(__FILE__).'/init.php'); $cookie = new Cookie('ps'); if (!$cookie->isLogged() AND !Tools::getValue('secure_key')) - Tools::redirect('authentication.php?back=pdf-invoice.php'); + Tools::redirect('index.php/authentication?back=pdf-invoice.php'); if (!(int)(Configuration::get('PS_INVOICE'))) die(Tools::displayError('Invoices are disabled in this shop.')); if (isset($_GET['id_order']) AND Validate::isUnsignedId($_GET['id_order'])) diff --git a/pdf-order-return.php b/pdf-order-return.php index d5d9bed73..f1dc5bbaf 100644 --- a/pdf-order-return.php +++ b/pdf-order-return.php @@ -30,7 +30,7 @@ include(dirname(__FILE__).'/init.php'); $cookie = new Cookie('ps'); if (!$cookie->isLogged()) - Tools::redirect('authentication.php?back=order-follow.php'); + Tools::redirect('index.php/authentication?back=order-follow.php'); if (isset($_GET['id_order_return']) AND Validate::isUnsignedId($_GET['id_order_return'])) $orderReturn = new OrderReturn((int)($_GET['id_order_return'])); diff --git a/pdf-order-slip.php b/pdf-order-slip.php index ae4c1a80a..2e9842ba6 100644 --- a/pdf-order-slip.php +++ b/pdf-order-slip.php @@ -30,7 +30,7 @@ include(dirname(__FILE__).'/init.php'); $cookie = new Cookie('ps'); if (!$cookie->isLogged()) - Tools::redirect('authentication.php?back=order-follow.php'); + Tools::redirect('index.php/authentication?back=order-follow.php'); if (isset($_GET['id_order_slip']) AND Validate::isUnsignedId($_GET['id_order_slip'])) $orderSlip = new OrderSlip((int)($_GET['id_order_slip'])); diff --git a/prices-drop.php b/prices-drop.php index 96e64c758..78170edaf 100644 --- a/prices-drop.php +++ b/prices-drop.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/prices-drop'.$params); + diff --git a/product-sort.php b/product-sort.php index 55eab503b..b15c42ef0 100644 --- a/product-sort.php +++ b/product-sort.php @@ -1,6 +1,6 @@ productSort(); \ No newline at end of file +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/product-sort'.$params); + diff --git a/product.php b/product.php index 1678af670..e14a93c33 100644 --- a/product.php +++ b/product.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/product'.$params); + diff --git a/products-comparison.php b/products-comparison.php index d8c2230be..1bbce2cb0 100644 --- a/products-comparison.php +++ b/products-comparison.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/products-comparison'.$params); + diff --git a/search.php b/search.php index e81a4dc80..3e8f1ad26 100644 --- a/search.php +++ b/search.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/search'.$params); + diff --git a/sitemap.php b/sitemap.php index 9d410e93a..636fc58b4 100644 --- a/sitemap.php +++ b/sitemap.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/sitemap'.$params); + diff --git a/stores.php b/stores.php index 1b41ec4cd..8e955b5ee 100644 --- a/stores.php +++ b/stores.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/stores'.$params); + diff --git a/supplier.php b/supplier.php index acadcd7c6..2f8509ac1 100644 --- a/supplier.php +++ b/supplier.php @@ -1,6 +1,6 @@ run(); +Tools::displayFileAsDeprecated(); + +// init front controller in order to use Tools::redirect +$controller = new FrontController(); +$controller->init(); + +$params = $_SERVER['QUERY_STRING']; +if (!empty($params)) + $params = '?'.$params; + +Tools::redirect('index.php/supplier'.$params); + diff --git a/themes/prestashop/404.tpl b/themes/prestashop/404.tpl index 73bc7db4a..37a1ea208 100644 --- a/themes/prestashop/404.tpl +++ b/themes/prestashop/404.tpl @@ -33,7 +33,7 @@

    {l s='To find a product, please type its name in the field below'}

    -
    +

    diff --git a/themes/prestashop/address.tpl b/themes/prestashop/address.tpl index 36c39d98c..583c43cbc 100644 --- a/themes/prestashop/address.tpl +++ b/themes/prestashop/address.tpl @@ -82,7 +82,7 @@ $(function(){ldelim} {include file="$tpl_dir./errors.tpl"} - +

    {if isset($id_address)}{l s='Your address'}{else}{l s='New address'}{/if}

    diff --git a/themes/prestashop/addresses.tpl b/themes/prestashop/addresses.tpl index c3c042cb8..5cf6da788 100644 --- a/themes/prestashop/addresses.tpl +++ b/themes/prestashop/addresses.tpl @@ -30,7 +30,7 @@ --> -{capture name=path}{l s='My account'}{$navigationPipe}{l s='My addresses'}{/capture} +{capture name=path}{l s='My account'}{$navigationPipe}{l s='My addresses'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"}

    {l s='My addresses'}

    @@ -55,19 +55,19 @@
  • {foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}{$address.$word_item|escape:'htmlall':'UTF-8'}{/foreach}
  • {/if} {/foreach} -
  • {l s='Update'}
  • -
  • {l s='Delete'}
  • +
  • {l s='Update'}
  • +
  • {l s='Delete'}
  • {/foreach}

    {else} -

    {l s='No addresses available.'} {l s='Add new address'}

    +

    {l s='No addresses available.'} {l s='Add new address'}

    {/if} -
    {l s='Add an address'}
    +
    {l s='Add an address'}
    diff --git a/themes/prestashop/authentication.tpl b/themes/prestashop/authentication.tpl index f9cf95432..6e24042f2 100644 --- a/themes/prestashop/authentication.tpl +++ b/themes/prestashop/authentication.tpl @@ -79,7 +79,7 @@ $(function(){ldelim} {include file="$tpl_dir./errors.tpl"} {if !isset($email_create)} - +

    {l s='Create your account'}

    {l s='Enter your e-mail address to create an account'}.

    @@ -94,7 +94,7 @@ $(function(){ldelim}

    -
    +

    {l s='Already registered ?'}

    @@ -109,11 +109,11 @@ $(function(){ldelim} {if isset($back)}{/if}

    -

    {l s='Forgot your password?'}

    +

    {l s='Forgot your password?'}

    {if isset($inOrderProcess) && $inOrderProcess && $PS_GUEST_CHECKOUT_ENABLED} -
    +

    {l s='Instant Checkout'}

    @@ -266,7 +266,7 @@ $(function(){ldelim} {/if} {else} -
    + {$HOOK_CREATE_ACCOUNT_TOP}
    diff --git a/themes/prestashop/identity.tpl b/themes/prestashop/identity.tpl index b23caebd5..f200b746f 100644 --- a/themes/prestashop/identity.tpl +++ b/themes/prestashop/identity.tpl @@ -30,7 +30,7 @@ --> -{capture name=path}{l s='My account'}{$navigationPipe}{l s='Your personal information'}{/capture} +{capture name=path}{l s='My account'}{$navigationPipe}{l s='Your personal information'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"}

    {l s='Your personal information'}

    @@ -45,7 +45,7 @@ {else}

    {l s='Please do not hesitate to update your personal information if it has changed.'}

    *{l s='Required field'}

    - +

    {l s='Title'} @@ -134,6 +134,6 @@ {/if}

    diff --git a/themes/prestashop/my-account.tpl b/themes/prestashop/my-account.tpl index 1444eb0a7..53e5b8cea 100644 --- a/themes/prestashop/my-account.tpl +++ b/themes/prestashop/my-account.tpl @@ -36,15 +36,15 @@

    {l s='My account'}

    {l s='Welcome to your account. Here you can manage your addresses and orders.'}

    diff --git a/themes/prestashop/order-address.tpl b/themes/prestashop/order-address.tpl index f31094425..11c04e999 100644 --- a/themes/prestashop/order-address.tpl +++ b/themes/prestashop/order-address.tpl @@ -138,7 +138,7 @@ {include file="$tpl_dir./order-steps.tpl"} {include file="$tpl_dir./errors.tpl"} - + {else}
    @@ -165,17 +165,33 @@ {/section} {else} - {l s='Add a new address'} + {l s='Add a new address'} {/if}


    - {l s='Add a new address'} + {l s='Add a new address'}

    {if !$opc}
    @@ -188,7 +204,7 @@

    - « {l s='Previous'} + « {l s='Previous'}

    diff --git a/themes/prestashop/order-carrier.tpl b/themes/prestashop/order-carrier.tpl index aa1b92ffa..9f8af10d7 100644 --- a/themes/prestashop/order-carrier.tpl +++ b/themes/prestashop/order-carrier.tpl @@ -72,7 +72,7 @@ {include file="$tpl_dir./errors.tpl"} -
    + {else}
    @@ -170,7 +170,7 @@

    - « {l s='Previous'} + « {l s='Previous'}

    diff --git a/themes/prestashop/order-confirmation.tpl b/themes/prestashop/order-confirmation.tpl index 04cf2116c..d1fbb3806 100644 --- a/themes/prestashop/order-confirmation.tpl +++ b/themes/prestashop/order-confirmation.tpl @@ -46,9 +46,9 @@
    {if $is_guest}

    {l s='Your order ID is:'} {$id_order_formatted} . {l s='Your order ID has been sent to your e-mail.'}

    - {l s='Follow my order'} - {l s='Follow my order'} + {l s='Follow my order'} + {l s='Follow my order'} {else} - {l s='Back to orders'} - {l s='Back to orders'} + {l s='Back to orders'} + {l s='Back to orders'} {/if} diff --git a/themes/prestashop/order-detail.tpl b/themes/prestashop/order-detail.tpl index 4b8549e6a..56f0262a8 100644 --- a/themes/prestashop/order-detail.tpl +++ b/themes/prestashop/order-detail.tpl @@ -24,7 +24,7 @@ * International Registered Trademark & Property of PrestaShop SA *} -
    +

    {l s='Order placed on'} {dateFormat date=$order->date_add full=0} @@ -65,7 +65,7 @@ {if $invoice AND $invoiceAllowed}

    - {l s='Download your invoice as a .PDF file'} + {l s='Download your invoice as a .PDF file'}

    {/if} {if $order->recyclable} @@ -102,7 +102,7 @@ {/foreach} {$HOOK_ORDERDETAILDISPLAYED} -{if !$is_guest}{/if} +{if !$is_guest}{/if}
    @@ -231,10 +231,10 @@ {foreach from=$ordersReturn item=return name=myLoop} - - + + {/foreach} @@ -66,6 +66,6 @@ {/if} diff --git a/themes/prestashop/order-steps.tpl b/themes/prestashop/order-steps.tpl index e1c7802a1..620b0a807 100644 --- a/themes/prestashop/order-steps.tpl +++ b/themes/prestashop/order-steps.tpl @@ -30,7 +30,7 @@
    • {if $current_step=='payment' || $current_step=='shipping' || $current_step=='address' || $current_step=='login'} - + {l s='Summary'} {else} @@ -39,7 +39,7 @@
    • {if $current_step=='payment' || $current_step=='shipping' || $current_step=='address'} - + {l s='Login'} {else} @@ -48,7 +48,7 @@
    • {if $current_step=='payment' || $current_step=='shipping'} - + {l s='Address'} {else} @@ -57,7 +57,7 @@
    • {if $current_step=='payment'} - + {l s='Shipping'} {else} @@ -69,4 +69,4 @@
    -{/if} \ No newline at end of file +{/if} diff --git a/themes/prestashop/password.tpl b/themes/prestashop/password.tpl index 7a915a66d..0a5a1c95c 100644 --- a/themes/prestashop/password.tpl +++ b/themes/prestashop/password.tpl @@ -50,5 +50,5 @@ {/if}

    - {l s='Return to Login'}{l s='Back to Login'} + {l s='Return to Login'}{l s='Back to Login'}

    diff --git a/themes/prestashop/product-compare.tpl b/themes/prestashop/product-compare.tpl index 392657a72..bcf766b62 100644 --- a/themes/prestashop/product-compare.tpl +++ b/themes/prestashop/product-compare.tpl @@ -31,7 +31,7 @@ var max_item = "{l s='You cannot add more than' js=1} {$comparator_max_item} {l s='product(s) in the product comparator' js=1}"; //]]> - +

    diff --git a/themes/prestashop/product-list.tpl b/themes/prestashop/product-list.tpl index 384868e6f..cd7e61733 100644 --- a/themes/prestashop/product-list.tpl +++ b/themes/prestashop/product-list.tpl @@ -46,7 +46,7 @@ {/if} {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0) && $product.customizable != 2} - {l s='Add to cart'} + {l s='Add to cart'} {else} {l s='Add to cart'} {/if} diff --git a/themes/prestashop/product.tpl b/themes/prestashop/product.tpl index 599dc7a10..cea2a5df3 100644 --- a/themes/prestashop/product.tpl +++ b/themes/prestashop/product.tpl @@ -223,7 +223,7 @@ var fieldRequired = '{l s='Please fill in all required fields' js=1}'; {if ($product->show_price AND !isset($restricted_country_mode)) OR isset($groups) OR $product->reference OR (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)} - quantity > 0}class="hidden"{/if} action="{$link->getPageLink('cart.php')}" method="post"> + quantity > 0}class="hidden"{/if} action="{$link->getPageLink('cart')}" method="post">

    {/if} @@ -452,7 +452,7 @@ var fieldRequired = '{l s='Please fill in all required fields' js=1}'; {if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}{if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if}{/if} {l s='View'} {if ($accessory.allow_oosp || $accessory.quantity > 0) AND $accessory.available_for_order AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} - {l s='Add to cart'} + {l s='Add to cart'} {else} {l s='Add to cart'}{if (isset($accessory.quantity_all_versions) && $accessory.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if} diff --git a/themes/prestashop/products-comparison.tpl b/themes/prestashop/products-comparison.tpl index 9610b2e3c..ec3753895 100644 --- a/themes/prestashop/products-comparison.tpl +++ b/themes/prestashop/products-comparison.tpl @@ -86,7 +86,7 @@ {l s='View'} {if (!$product->hasAttributes() OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND !$PS_CATALOG_MODE} {if ($product->quantity > 0 OR $product->allow_oosp) AND $product->customizable != 2} - {l s='Add to cart'} + {l s='Add to cart'} {else} {l s='Add to cart'} {/if} diff --git a/themes/prestashop/shopping-cart-product-line.tpl b/themes/prestashop/shopping-cart-product-line.tpl index 6abfbdc95..3cc636905 100644 --- a/themes/prestashop/shopping-cart-product-line.tpl +++ b/themes/prestashop/shopping-cart-product-line.tpl @@ -49,12 +49,12 @@ {if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0}{$product.customizationQuantityTotal}{/if} {if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0}
    - {l s='Delete'} + {l s='Delete'}
    - {l s='Add'}
    + {l s='Add'}
    {if $product.minimal_quantity < ($product.cart_quantity-$quantityDisplayed) OR $product.minimal_quantity <= 1} - + {l s='Subtract'} {else} diff --git a/themes/prestashop/shopping-cart.tpl b/themes/prestashop/shopping-cart.tpl index f61a6b3cd..74555c02a 100644 --- a/themes/prestashop/shopping-cart.tpl +++ b/themes/prestashop/shopping-cart.tpl @@ -219,12 +219,12 @@
    - +
    {l s='#'}{$return.id_order_return|string_format:"%06d"}{l s='#'}{$return.id_order|string_format:"%06d"}{l s='#'}{$return.id_order_return|string_format:"%06d"}{l s='#'}{$return.id_order|string_format:"%06d"} {$return.state_name|escape:'htmlall':'UTF-8'} {dateFormat date=$return.date_add full=0} {if $return.state == 2} - {l s='Order return'} {l s='#'}{$return.id_order_return|string_format: - {l s='Print out'} + {l s='Order return'} {l s='#'}{$return.id_order_return|string_format: + {l s='Print out'} {else} -- {/if} @@ -79,6 +79,6 @@ \ No newline at end of file + diff --git a/themes/prestashop/order-opc-new-account.tpl b/themes/prestashop/order-opc-new-account.tpl index 8618e2e89..7df778135 100644 --- a/themes/prestashop/order-opc-new-account.tpl +++ b/themes/prestashop/order-opc-new-account.tpl @@ -1,7 +1,7 @@

    1. {l s='Account'}

    - +

    {l s='Already registered?'} {l s='Click here'}

    diff --git a/themes/prestashop/order-opc.tpl b/themes/prestashop/order-opc.tpl index f1d9b3b82..d67c882dc 100755 --- a/themes/prestashop/order-opc.tpl +++ b/themes/prestashop/order-opc.tpl @@ -32,11 +32,11 @@ // getPageLink("authentication.php", true)}'; - var orderOpcUrl = '{$link->getPageLink("order-opc.php", true)}'; - var historyUrl = '{$link->getPageLink("history.php", true)}'; - var guestTrackingUrl = '{$link->getPageLink("guest-tracking.php", true)}'; - var addressUrl = '{$link->getPageLink("address.php", true)}'; + var authenticationUrl = '{$link->getPageLink("authentication", true)}'; + var orderOpcUrl = '{$link->getPageLink("order-opc", true)}'; + var historyUrl = '{$link->getPageLink("history", true)}'; + var guestTrackingUrl = '{$link->getPageLink("guest-tracking", true)}'; + var addressUrl = '{$link->getPageLink("address", true)}'; var orderProcess = 'order-opc'; var guestCheckoutEnabled = {$PS_GUEST_CHECKOUT_ENABLED|intval}; var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}'; diff --git a/themes/prestashop/order-payment.tpl b/themes/prestashop/order-payment.tpl index d7e05b103..475173c61 100644 --- a/themes/prestashop/order-payment.tpl +++ b/themes/prestashop/order-payment.tpl @@ -59,7 +59,7 @@ {/if} {if !$opc} -

    « {l s='Previous'}

    +

    « {l s='Previous'}

    {else}
    {/if} diff --git a/themes/prestashop/order-return.tpl b/themes/prestashop/order-return.tpl index 3fca59f1f..d6b5409a5 100644 --- a/themes/prestashop/order-return.tpl +++ b/themes/prestashop/order-return.tpl @@ -93,11 +93,11 @@

    {l s='REMINDER:'}

    - {l s='All products must be returned in their original packaging without damage or wear.'} -
    - {l s='Please print out the'} {l s='PDF document'} {l s='and slip it into your package.'} -
    - {l s='Please see PDF document'} ({l s='for the correct address'}) +
    - {l s='Please print out the'} {l s='PDF document'} {l s='and slip it into your package.'} +
    - {l s='Please see PDF document'} ({l s='for the correct address'})

    {l s='Upon receiving your package, you will be notified by e-mail. We will then begin processing the reimbursement of your order total.'} -

    {l s='Let us know if you have any questions.'} +

    {l s='Let us know if you have any questions.'}

    {l s='If the conditions of return listed above are not respected, we reserve the right to refuse your package and/or reimbursement.'}

    diff --git a/themes/prestashop/order-slip.tpl b/themes/prestashop/order-slip.tpl index aeb489ce9..ca356e787 100644 --- a/themes/prestashop/order-slip.tpl +++ b/themes/prestashop/order-slip.tpl @@ -30,7 +30,7 @@ --> -{capture name=path}{l s='My account'}{$navigationPipe}{l s='Credit slips'}{/capture} +{capture name=path}{l s='My account'}{$navigationPipe}{l s='Credit slips'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"}

    {l s='Credit slips'}

    @@ -53,8 +53,8 @@
    {l s='#'}{$slip.id_order|string_format:"%06d"} {dateFormat date=$slip.date_add full=0} - {l s='Order slip'} {l s='#'}{$slip.id_order_slip|string_format: - {l s='PDF'} + {l s='Order slip'} {l s='#'}{$slip.id_order_slip|string_format: + {l s='PDF'}
    - {l s='Delete'} + {l s='Delete'}
    - {l s='Add'}
    + {l s='Add'}
    {if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1} - + {l s='Subtract'} {else} @@ -251,7 +251,7 @@
    {$discount.name} {$discount.description}{l s='Delete'}{l s='Delete'} {if $discount.value_real > 0} {if !$priceDisplay}{displayPrice price=$discount.value_real*-1}{else}{displayPrice price=$discount.value_tax_exc*-1}{/if} @@ -273,7 +273,7 @@ {/foreach} {/if} - +

    {l s='Vouchers'}

    @@ -328,8 +328,8 @@ {/if}

    - {if !$opc}{l s='Next'} »{/if} - « {l s='Continue shopping'} + {if !$opc}{l s='Next'} »{/if} + « {l s='Continue shopping'}



    diff --git a/themes/prestashop/sitemap.tpl b/themes/prestashop/sitemap.tpl index 760745281..929f18d83 100644 --- a/themes/prestashop/sitemap.tpl +++ b/themes/prestashop/sitemap.tpl @@ -32,23 +32,23 @@

    {l s='Our offers'}


    @@ -83,8 +83,8 @@ {foreach from=$categoriescmsTree.cms item=cms name=cmsTree}
  • {$cms.meta_title|escape:'htmlall':'UTF-8'}
  • {/foreach} -
  • {l s='Contact'}
  • - {if $display_store}
  • {l s='Our stores'}
  • {/if} +
  • {l s='Contact'}
  • + {if $display_store}
  • {l s='Our stores'}
  • {/if}