From 1c1e7cf1f6b40e8ef3c36dca92d4929c76589a2b Mon Sep 17 00:00:00 2001 From: lLefevre Date: Mon, 27 Aug 2012 15:06:00 +0000 Subject: [PATCH] [*] FO : Optimization - don't redirect and allow WS and other script to work --- classes/shop/Shop.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php index bb3211086..c42703d14 100644 --- a/classes/shop/Shop.php +++ b/classes/shop/Shop.php @@ -295,6 +295,10 @@ class ShopCore extends ObjectModel */ public static function initialize() { + // Optimization - don't redirect and allow WS and other script to work + if (!($id_shop = Tools::getValue('id_shop'))) + $_GET['id_shop'] = Configuration::get('PS_SHOP_DEFAULT'); + // Find current shop from URL if (!($id_shop = Tools::getValue('id_shop')) || defined('_PS_ADMIN_DIR_')) {