diff --git a/admin-dev/tabs/AdminCarriers.php b/admin-dev/tabs/AdminCarriers.php index 1ff6e0c56..1da6e99d8 100644 --- a/admin-dev/tabs/AdminCarriers.php +++ b/admin-dev/tabs/AdminCarriers.php @@ -52,7 +52,7 @@ class AdminCarriers extends AdminTab $this->optionTitle = $this->l('Carrier options'); $this->_fieldsOptions = array( - 'PS_CARRIER_DEFAULT' => array('title' => $this->l('Default carrier:'), 'desc' => $this->l('The default carrier used in shop'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_carrier', 'list' => Carrier::getCarriers((int)(Configuration::get('PS_LANG_DEFAULT')), true , false,false, NULL, ALL_CARRIERS)), + 'PS_CARRIER_DEFAULT' => array('title' => $this->l('Default carrier:'), 'desc' => $this->l('The default carrier used in shop'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_carrier', 'list' => Carrier::getCarriers((int)(Configuration::get('PS_LANG_DEFAULT')), true , false,false, NULL, Carrier::ALL_CARRIERS)), ); parent::__construct(); diff --git a/admin-dev/tabs/AdminImport.php b/admin-dev/tabs/AdminImport.php index 8f5360439..13ebc669e 100644 --- a/admin-dev/tabs/AdminImport.php +++ b/admin-dev/tabs/AdminImport.php @@ -1191,6 +1191,10 @@ class AdminImport extends AdminTab $info = self::getMaskedRow($line); self::setDefaultValues($info); + + if (array_key_exists('id', $info) AND (int)($info['id']) AND Manufacturer::existsInDatabase((int)($info['id']))) + $manufacturer = new Manufacturer((int)($info['id'])); + else $manufacturer = new Manufacturer(); self::array_walk($info, array('AdminImport', 'fillInfo'), $manufacturer); @@ -1242,9 +1246,13 @@ class AdminImport extends AdminTab $info = self::getMaskedRow($line); self::setDefaultValues($info); - $supplier = new Supplier(); - self::array_walk($info, array('AdminImport', 'fillInfo'), $supplier); + if (array_key_exists('id', $info) AND (int)($info['id']) AND Supplier::existsInDatabase((int)($info['id']))) + $supplier = new Supplier((int)($info['id'])); + else + $supplier = new Supplier(); + + self::array_walk($info, array('AdminImport', 'fillInfo'), $supplier); if (($fieldError = $supplier->validateFields(UNFRIENDLY_ERROR, true)) === true AND ($langFieldError = $supplier->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true) { $res = false; diff --git a/admin-dev/tabs/AdminInformation.php b/admin-dev/tabs/AdminInformation.php index 6763d541b..55e0e9d19 100644 --- a/admin-dev/tabs/AdminInformation.php +++ b/admin-dev/tabs/AdminInformation.php @@ -293,7 +293,7 @@ class AdminInformation extends AdminTab if ($recursive) { while (($file = readdir($dh)) !== false) - if (@filetype($dir.$file) == 'dir' AND $file != '.' AND $file != '..') + if (is_dir($dir.$file) AND $file != '.' AND $file != '..') if (!self::test_dir($dir.$file, true)) return false; } diff --git a/admin-dev/tabs/AdminProducts.php b/admin-dev/tabs/AdminProducts.php index 946d3aceb..2231fb534 100644 --- a/admin-dev/tabs/AdminProducts.php +++ b/admin-dev/tabs/AdminProducts.php @@ -2726,19 +2726,27 @@ class AdminProducts extends AdminTab - '; - if (Tools::isSubmit('categoryBox')) + '; + $default_category = Tools::getValue('id_category', 1); + if (!$obj->id) { - $postCat = Tools::getValue('categoryBox'); - $selectedCat = Category::getSimpleCategories($this->_defaultFormLanguage, false, true, 'AND c.`id_category` IN ('.(empty($postCat) ? '1' : implode(',', $postCat)).')'); - echo ''; + $selectedCat = Category::getCategoryInformations(Tools::getValue('categoryBox', array($default_category)), $this->_defaultFormLanguage); + echo ' + '; } - if ($obj->id) + else + { + if (Tools::isSubmit('categoryBox')) + $selectedCat = Category::getCategoryInformations(Tools::getValue('categoryBox', array($default_category)), $this->_defaultFormLanguage); + else $selectedCat = Product::getProductCategoriesFull($obj->id, $this->_defaultFormLanguage); - else if(!Tools::isSubmit('categoryBox')) - $selectedCat[] = array('id_category' => 1, 'name' => $this->l('Home')); - echo ''; foreach($selectedCat AS $cat) echo ''; echo ' diff --git a/admin-dev/tabs/AdminRangePrice.php b/admin-dev/tabs/AdminRangePrice.php index f53ab094b..1f7aa0753 100644 --- a/admin-dev/tabs/AdminRangePrice.php +++ b/admin-dev/tabs/AdminRangePrice.php @@ -72,7 +72,7 @@ class AdminRangePrice extends AdminTab $currency = $this->context->currency; $carrierArray = array(); - $carriers = Carrier::getCarriers((int)(Configuration::get('PS_LANG_DEFAULT')), true , false,false, NULL, PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); + $carriers = Carrier::getCarriers((int)(Configuration::get('PS_LANG_DEFAULT')), true , false,false, NULL, Carrier::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); $id_carrier = Tools::getValue('id_carrier', $obj->id_carrier); foreach ($carriers AS $carrier) if (!$carrier['is_free']) diff --git a/admin-dev/tabs/AdminRangeWeight.php b/admin-dev/tabs/AdminRangeWeight.php index 2256c7276..8389cf58f 100644 --- a/admin-dev/tabs/AdminRangeWeight.php +++ b/admin-dev/tabs/AdminRangeWeight.php @@ -72,7 +72,7 @@ class AdminRangeWeight extends AdminTab return; $carrierArray = array(); - $carriers = Carrier::getCarriers((int)(Configuration::get('PS_LANG_DEFAULT')), true , false,false, NULL, PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); + $carriers = Carrier::getCarriers((int)(Configuration::get('PS_LANG_DEFAULT')), true , false,false, NULL, Carrier::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); $id_carrier = Tools::getValue('id_carrier', $obj->id_carrier); foreach ($carriers AS $carrier) if (!$carrier['is_free']) diff --git a/admin-dev/tabs/AdminShipping.php b/admin-dev/tabs/AdminShipping.php index 5b39404f6..f1a637432 100644 --- a/admin-dev/tabs/AdminShipping.php +++ b/admin-dev/tabs/AdminShipping.php @@ -204,7 +204,8 @@ class AdminShipping extends AdminTab { $carrierArray = array(); $id_carrier = Tools::getValue('id_carrier'); - $carriers = Carrier::getCarriers(Configuration::get('PS_LANG_DEFAULT'), true , false,false, NULL, PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); + + $carriers = Carrier::getCarriers(Configuration::get('PS_LANG_DEFAULT'), true , false,false, NULL, Carrier::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); foreach ($carriers AS $carrier) if (!$carrier['is_free']) $carrierArray[] = array( diff --git a/classes/Carrier.php b/classes/Carrier.php index dc2209822..b345577a8 100644 --- a/classes/Carrier.php +++ b/classes/Carrier.php @@ -27,6 +27,15 @@ class CarrierCore extends ObjectModel { + /** + * getCarriers method filter + */ + const PS_CARRIERS_ONLY = 1; + const CARRIERS_MODULE = 2; + const CARRIERS_MODULE_NEED_RANGE = 3; + const PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE = 4; + const ALL_CARRIERS = 5; + const SHIPPING_METHOD_DEFAULT = 0; const SHIPPING_METHOD_WEIGHT = 1; const SHIPPING_METHOD_PRICE = 2; @@ -340,7 +349,7 @@ class CarrierCore extends ObjectModel * @param boolean $active Returns only active carriers when true * @return array Carriers */ - public static function getCarriers($id_lang, $active = false, $delete = false, $id_zone = false, $ids_group = NULL, $modules_filters = 1) + public static function getCarriers($id_lang, $active = false, $delete = false, $id_zone = false, $ids_group = NULL, $modules_filters = self::PS_CARRIERS_ONLY) { if (!Validate::isBool($active)) die(Tools::displayError()); @@ -351,7 +360,7 @@ class CarrierCore extends ObjectModel $ids .= (int)($id).', '; $ids = rtrim($ids, ', '); if ($ids == '') - return (array()); + return array(); } $sql = 'SELECT c.*, cl.delay @@ -430,6 +439,12 @@ class CarrierCore extends ObjectModel return $countries; } + /** + * + * @param int $id_zone + * @param Array $groups group of the customer + * @return Array + */ public static function getCarriersForOrder($id_zone, $groups = NULL) { $context = Context::getContext(); @@ -441,9 +456,9 @@ class CarrierCore extends ObjectModel $id_currency = $context->currency->id; if (is_array($groups) AND !empty($groups)) - $result = Carrier::getCarriers($id_lang, true, false, (int)$id_zone, $groups, PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); + $result = Carrier::getCarriers($id_lang, true, false, (int)$id_zone, $groups, self::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); else - $result = Carrier::getCarriers($id_lang, true, false, (int)$id_zone, array(1), PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); + $result = Carrier::getCarriers($id_lang, true, false, (int)$id_zone, array(1), self::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); $resultsArray = array(); foreach ($result AS $k => $row) diff --git a/classes/Category.php b/classes/Category.php index 36a31390d..9bd8ad5f3 100644 --- a/classes/Category.php +++ b/classes/Category.php @@ -1008,8 +1008,8 @@ class CategoryCore extends ObjectModel public function getWsNbProductsRecursive() { - $result = Db::getInstance()->ExecuteS( - 'SELECT count(distinct(id_product)) as nb_product_recursive FROM `'._DB_PREFIX_.'category_product` + $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' + SELECT count(distinct(id_product)) as nb_product_recursive FROM `'._DB_PREFIX_.'category_product` WHERE id_category IN (SELECT id_category FROM `'._DB_PREFIX_.'category` WHERE nleft > '.(int)$this->nleft. @@ -1018,5 +1018,37 @@ class CategoryCore extends ObjectModel return -1; return $result[0]['nb_product_recursive']; } + + /** + * + * @param Array $ids_category + * @param int $id_lang + * @return Array + */ + public static function getCategoryInformations($ids_category, $id_lang = null) + { + if ($id_lang === null) + { + global $cookie; + $id_lang = $cookie->id_lang; +} + + if (!is_array($ids_category) || !sizeof($ids_category)) + return; + + $categories = array(); + $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' + SELECT c.`id_category`, cl.`name`, cl.`link_rewrite`, cl.`id_lang` + FROM `'._DB_PREFIX_.'category` c + LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`) + WHERE cl.`id_lang` = '.(int)$id_lang.' + AND c.`id_category` IN ('.implode(',', $ids_category).') + '); + + foreach($results as $category) + $categories[$category['id_category']] = $category; + + return $categories; + } } diff --git a/classes/ConfigurationTest.php b/classes/ConfigurationTest.php index f74539405..21273b291 100644 --- a/classes/ConfigurationTest.php +++ b/classes/ConfigurationTest.php @@ -110,7 +110,7 @@ class ConfigurationTestCore if ($recursive) { while (($file = readdir($dh)) !== false) - if (@filetype($dir.$file) == 'dir' AND $file != '.' AND $file != '..') + if (is_dir($dir.$file) AND $file != '.' AND $file != '..') if (!self::test_dir($dir.$file, true)) return false; } diff --git a/classes/ObjectModel.php b/classes/ObjectModel.php index 2248732f8..855933024 100644 --- a/classes/ObjectModel.php +++ b/classes/ObjectModel.php @@ -117,7 +117,7 @@ abstract class ObjectModelCore if ($id_lang != NULL && Validate::isLoadedObject(new Language($id_lang))) $this->id_lang = $id_lang; elseif ($id_lang != NULL) - die(Tools::displayError()); + $this->id_lang = Configuration::get('PS_LANG_DEFAULT'); if ($id_shop && $this->langMultiShop) { @@ -853,4 +853,20 @@ abstract class ObjectModelCore return false; return true; } + + /** + * Specify if an ObjectModel is already in database + * + * @param $id_entity entity id + * @return boolean + */ + public static function existsInDatabase($id_entity) + { + $row = Db::getInstance()->getRow(' + SELECT `id_'.self::$table.'` + FROM `'._DB_PREFIX_.self::$table.'` e + WHERE e.`id_'.self::$table.'` = '.(int)($id_entity)); + + return isset($row['id_product']); + } } diff --git a/classes/Product.php b/classes/Product.php index 16755cda6..b96a91d27 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -1567,7 +1567,8 @@ class ProductCore extends ObjectModel $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' SELECT cp.`id_category`, cl.`name`, cl.`link_rewrite` FROM `'._DB_PREFIX_.'category_product` cp LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (cp.`id_category` = cl.`id_category`) - WHERE cp.`id_product` = '.(int)$id_product); + WHERE cp.`id_product` = '.(int)$id_product.' + AND cl.`id_lang` = '.(int)$id_lang); foreach ($row as $val) $ret[$val['id_category']] = $val; return $ret; @@ -3037,22 +3038,6 @@ class ProductCore extends ObjectModel return true; } - /** - * Specify if a product is already in database - * - * @param $id_product Product id - * @return boolean - */ - public static function existsInDatabase($id_product) - { - $row = Db::getInstance()->getRow(' - SELECT `id_product` - FROM '._DB_PREFIX_.'product p - WHERE p.`id_product` = '.(int)($id_product)); - - return isset($row['id_product']); - } - public static function idIsOnCategoryId($id_product, $categories) { $sql = 'SELECT id_product FROM `'._DB_PREFIX_.'category_product` WHERE `id_product`='.(int)($id_product).' AND `id_category` IN('; diff --git a/classes/Tools.php b/classes/Tools.php index eb78e83c5..1bcf5b885 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -538,8 +538,6 @@ class ToolsCore self::deleteDirectory($dirname.$file, true); elseif (file_exists($dirname.$file)) unlink($dirname.$file); - else - p('Unable to delete '.$dirname.$file); } if($delete_self) rmdir($dirname); diff --git a/config/defines.inc.php b/config/defines.inc.php index d8666b81c..6cc166e1a 100755 --- a/config/defines.inc.php +++ b/config/defines.inc.php @@ -124,6 +124,7 @@ define('PS_ROUND_DOWN', 1); define('PS_ROUND_HALF', 2); /* Carrier::getCarriers() filter */ +// these defines are DEPRECATED since 1.4.5 version define('PS_CARRIERS_ONLY', 1); define('CARRIERS_MODULE', 2); define('CARRIERS_MODULE_NEED_RANGE', 3); diff --git a/controllers/OrderDetailController.php b/controllers/OrderDetailController.php index 7355e9e7c..30911a1ce 100644 --- a/controllers/OrderDetailController.php +++ b/controllers/OrderDetailController.php @@ -164,6 +164,16 @@ class OrderDetailControllerCore extends FrontController } } + public function setMedia() + { + if (Tools::getValue('ajax') != 'true') + { + parent::setMedia(); + Tools::addCSS(_THEME_CSS_DIR_.'history.css'); + Tools::addCSS(_THEME_CSS_DIR_.'addresses.css'); + } + } + public function displayHeader() { if (Tools::getValue('ajax') != 'true') diff --git a/mails/de/order_conf.html b/mails/de/order_conf.html index 26354db8b..250cb4f12 100644 --- a/mails/de/order_conf.html +++ b/mails/de/order_conf.html @@ -116,7 +116,7 @@   -{shop_name} powered with PrestaShop™ +{shop_name} powered with PrestaShop™ diff --git a/mails/de/order_conf.txt b/mails/de/order_conf.txt index d76a4dc40..96ef0feae 100644 --- a/mails/de/order_conf.txt +++ b/mails/de/order_conf.txt @@ -25,6 +25,6 @@ Versand {invoice_block_txt} Sie können diese Bestellung ansehen und Ihre Rechnung aus dem Abschnitt "Bestellverlauf" Ihres Kontos downloaden, indem Sie auf unserer Webseite auf "Mein Konto" klicken. -Wenn Sie ein Gast-Konto haben, können Sie Ihre Bestellung auf dieser Webseite verfolgen: {shop_url}gast-bestellverfolgung.php +Wenn Sie ein Gast-Konto haben, können Sie Ihre Bestellung auf dieser Webseite verfolgen: {shop_url}guest-tracking.php {shop_name} powered with PrestaShop™ diff --git a/modules/blocklayered/blocklayered.js b/modules/blocklayered/blocklayered.js index 00bac519d..fb3560db6 100644 --- a/modules/blocklayered/blocklayered.js +++ b/modules/blocklayered/blocklayered.js @@ -116,7 +116,10 @@ function reloadContent(params_plus) data = $('#layered_form').serialize(); $('.layered_slider').each( function () { - data += '&'+$(this).attr('id')+'='+$(this).slider('values', 0)+'_'+$(this).slider('values', 1); + var sliderStart = $(this).slider('values', 0); + var sliderStop = $(this).slider('values', 1); + if(typeof(sliderStart) == 'number' && typeof(sliderStop) == 'number') + data += '&'+$(this).attr('id')+'='+sliderStart+'_'+sliderStop; }); if ($('#selectPrductSort').length) diff --git a/modules/blocklayered/blocklayered.php b/modules/blocklayered/blocklayered.php index 6abdde663..f58af1df2 100644 --- a/modules/blocklayered/blocklayered.php +++ b/modules/blocklayered/blocklayered.php @@ -633,7 +633,7 @@ class BlockLayered extends Module $selectedFilters[$res[1].($id_key ? '_'.$id_key : '')] = array(); $selectedFilters[$res[1].($id_key ? '_'.$id_key : '')][] = (int)$value; } - elseif (in_array($res[1], array('weight'))) + elseif ($res[1] == 'weight') $selectedFilters[$res[1]] = $tmpTab; } } @@ -715,6 +715,7 @@ class BlockLayered extends Module break; case 'weight': + if($selectedFilters['weight'][0] != 0 || $selectedFilters['weight'][1] != 0) $queryFilters .= ' AND p.`weight` BETWEEN '.(float)($selectedFilters['weight'][0] - 0.001).' AND '.(float)($selectedFilters['weight'][1] + 0.001); break; } diff --git a/modules/blocklayered/blocklayered.tpl b/modules/blocklayered/blocklayered.tpl index 6ff108e56..49cdf9ab5 100644 --- a/modules/blocklayered/blocklayered.tpl +++ b/modules/blocklayered/blocklayered.tpl @@ -151,5 +151,16 @@


{l s='Loading...' mod='blocklayered'}

+{else} +
+
+
+ +
+
+ +
{/if} \ No newline at end of file diff --git a/modules/dateofdelivery/dateofdelivery.php b/modules/dateofdelivery/dateofdelivery.php index b00a6121d..1c4c1f886 100644 --- a/modules/dateofdelivery/dateofdelivery.php +++ b/modules/dateofdelivery/dateofdelivery.php @@ -310,8 +310,7 @@ class DateOfDelivery extends Module private function _setCarrierRuleForm() { - - $carriers = Carrier::getCarriers($this->context->language->id, true , false,false, NULL, ALL_CARRIERS); + $carriers = Carrier::getCarriers($this->context->language->id, true, false, false, null, Carrier::ALL_CARRIERS); if (Tools::isSubmit('editCarrierRule') AND $this->_isCarrierRuleExists(Tools::getValue('id_carrier_rule'))) $carrier_rule = $this->_getCarrierRule(Tools::getValue('id_carrier_rule')); diff --git a/modules/dejala/dejala.php b/modules/dejala/dejala.php index 97f3f5477..ef284e82f 100644 --- a/modules/dejala/dejala.php +++ b/modules/dejala/dejala.php @@ -125,7 +125,7 @@ class Dejala extends CarrierModule $djlCarrier = DejalaCarrierUtils::getCarrierByName($this->name) ; if (Configuration::get('PS_CARRIER_DEFAULT') == (int)($djlCarrier->id)) { - $carriers = Carrier::getCarriers($this->context->language->id, true, false, false, NULL, PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); + $carriers = Carrier::getCarriers($this->context->language->id, true, false, false, NULL, Carrier::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); foreach($carriers as $carrier) { if ($carrier['active'] AND !$carrier['deleted'] AND ($carrier['external_module_name'] != $this->name)) diff --git a/modules/dejala/dejalacarrierutils.php b/modules/dejala/dejalacarrierutils.php index ecbd49b86..485a2412c 100644 --- a/modules/dejala/dejalacarrierutils.php +++ b/modules/dejala/dejalacarrierutils.php @@ -86,8 +86,9 @@ class DejalaCarrierUtils return true; } - public static function getCarrierByName($name) { - $carriers = Carrier::getCarriers(Context::getContext()->language->id, true, false, false, NULL, ALL_CARRIERS); + public static function getCarrierByName($name) + { + $carriers = Carrier::getCarriers(Context::getContext()->language->id, true, false, false, null, Carrier::ALL_CARRIERS); foreach($carriers as $carrier) if (!$carrier['deleted'] AND $carrier['external_module_name'] == $name) return new Carrier((int)$carrier['id_carrier']) ; diff --git a/modules/ebay/ajax/getNbProductsSync.php b/modules/ebay/ajax/getNbProductsSync.php index 6d79ba3d9..1549b20b3 100755 --- a/modules/ebay/ajax/getNbProductsSync.php +++ b/modules/ebay/ajax/getNbProductsSync.php @@ -12,7 +12,8 @@ if (file_exists($configPath)) $nbProducts = Db::getInstance()->getValue(' SELECT COUNT(`id_product`) as nb FROM `'._DB_PREFIX_.'product` - WHERE `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_ebay_category` > 0 AND `sync` = 1)'); + WHERE `quantity` > 0 AND `active` = 1 + AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_ebay_category` > 0 AND `sync` = 1)'); echo $nbProducts; } diff --git a/modules/ebay/config.xml b/modules/ebay/config.xml index 0b1ac42ef..1cbb985b9 100755 --- a/modules/ebay/config.xml +++ b/modules/ebay/config.xml @@ -2,9 +2,9 @@ ebay - + - + 1 1 diff --git a/modules/ebay/eBayRequest.php b/modules/ebay/eBayRequest.php index b4d7cf76e..a626bda57 100755 --- a/modules/ebay/eBayRequest.php +++ b/modules/ebay/eBayRequest.php @@ -374,7 +374,7 @@ class eBayRequest $requestXml .= ' fr_FR'."\n"; $requestXml .= ' High'."\n"; $requestXml .= ' '."\n"; - $requestXml .= ' prestashop-'.$datas['id_product'].''; + $requestXml .= ' prestashop-'.$datas['id_product'].(isset($datas['reference']) ? '-'.$datas['reference'] : '').''; $requestXml .= ' '.substr($datas['name'], 0, 55).''."\n"; if (isset($datas['pictures'])) { @@ -503,7 +503,7 @@ class eBayRequest $requestXml .= ' High'."\n"; $requestXml .= ' '."\n"; $requestXml .= ' '.$datas['itemID'].''."\n"; - $requestXml .= ' prestashop-'.$datas['id_product'].''; + $requestXml .= ' prestashop-'.$datas['id_product'].(isset($datas['reference']) ? '-'.$datas['reference'] : '').''; $requestXml .= ' '.$datas['quantity'].''."\n"; $requestXml .= ' '.$datas['price'].''."\n"; if (Configuration::get('EBAY_SYNC_OPTION_RESYNC') != 1) @@ -653,7 +653,7 @@ class eBayRequest foreach ($datas['variations'] as $key => $variation) { $requestXml .= ' '."\n"; - $requestXml .= ' prestashop-'.$key.''."\n"; + $requestXml .= ' prestashop-'.$key.(isset($variation['reference']) ? '-'.$variation['reference'] : '').''."\n"; $requestXml .= ' '.$variation['price'].''."\n"; $requestXml .= ' '.$variation['quantity'].''."\n"; $requestXml .= ' '."\n"; @@ -1005,6 +1005,24 @@ class eBayRequest } if ($id_product > 0) $itemList[] = array('id_product' => $id_product, 'id_product_attribute' => $id_product_attribute, 'quantity' => $quantity, 'price' => (string)$transaction->TransactionPrice); + else + { + $id_product = Db::getInstance()->getValue(' + SELECT `id_product` FROM `'._DB_PREFIX_.'product` + WHERE `reference` = \''.pSQL((string)$transaction->item->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->item->CustomLabel).'\' + OR `reference` = \''.pSQL((string)$transaction->Variation->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->Variation->CustomLabel).'\''); + if ((int)$id_product > 0) + $itemList[] = array('id_product' => $id_product, 'quantity' => $quantity, 'price' => (string)$transaction->TransactionPrice); + else + { + $row = Db::getInstance()->getValue(' + SELECT `id_product`, `id_product_attribute` FROM `'._DB_PREFIX_.'product_attribute` + WHERE `reference` = \''.pSQL((string)$transaction->item->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->item->CustomLabel).'\' + OR `reference` = \''.pSQL((string)$transaction->Variation->SKU).'\' OR `reference` = \''.pSQL((string)$transaction->Variation->CustomLabel).'\''); + if ((int)$row['id_product'] > 0) + $itemList[] = array('id_product' => $row['id_product'], 'id_product_attribute' => $row['id_product_attribute'], 'quantity' => $quantity, 'price' => (string)$transaction->TransactionPrice); + } + } } $orderList[] = array( @@ -1014,7 +1032,7 @@ class eBayRequest 'date' => substr((string)$order->CreatedTime, 0, 10).' '.substr((string)$order->CreatedTime, 11, 8), 'name' => (string)$order->ShippingAddress->Name, 'firstname' => $name[0], - 'familyname' => $name[1], + 'familyname' => (isset($name[1]) ? $name[1] : $name[0]), 'address1' => (string)$order->ShippingAddress->Street1, 'address2' => (string)$order->ShippingAddress->Street2, 'city' => (string)$order->ShippingAddress->CityName, diff --git a/modules/ebay/ebay.php b/modules/ebay/ebay.php index 45f51295b..9319aaf7f 100755 --- a/modules/ebay/ebay.php +++ b/modules/ebay/ebay.php @@ -56,7 +56,8 @@ class Ebay extends Module { $this->name = 'ebay'; $this->tab = 'market_place'; - $this->version = '1.1'; + $this->version = '1.2'; + $this->author = 'PrestaShop'; parent::__construct (); $this->displayName = $this->l('eBay'); $this->description = $this->l('Open your shop on the eBay market place !'); @@ -92,6 +93,10 @@ class Ebay extends Module // Check if installed if (self::isInstalled($this->name)) { + // Upgrade eBay module + if (Configuration::get('EBAY_VERSION') != $this->version) + $this->upgrade(); + // Generate warnings if (!Configuration::get('EBAY_API_TOKEN')) $this->warning = $this->l('You must register your module on eBay.'); @@ -225,6 +230,20 @@ class Ebay extends Module return true; } + public function upgrade() + { + $version = Configuration::get('EBAY_VERSION'); + if ($version == '1.1' || empty($version)) + { + // Upgrade SQL + include(dirname(__FILE__).'/sql-upgrade-1-2.php'); + foreach ($sql as $s) + if (!Db::getInstance()->Execute($s)) + return false; + Configuration::updateValue('EBAY_VERSION', $this->version); + } + } + /******************************************************************/ /** Hook Methods **************************************************/ @@ -292,15 +311,28 @@ class Ebay extends Module if (Configuration::get('EBAY_ORDER_LAST_UPDATE') < date('Y-m-d', strtotime('-45 minutes')).'T'.date('H:i:s', strtotime('-45 minutes')).'.000Z') { $ebay = new eBayRequest(); - $orderList = $ebay->getOrders(Configuration::get('EBAY_ORDER_LAST_UPDATE'), $dateNew); + $orderList = $ebay->getOrders(date('Y-m-d', strtotime('-90 days')).'T'.date('H:i:s', strtotime('-45 minutes')).'.000Z', $dateNew); + if ($orderList) foreach ($orderList as $order) - if ($order['status'] == 'Complete'&& - isset($order['product_list']) && count($order['product_list'])) + if ($order['status'] == 'Complete' && $order['amount'] > 0.1 && isset($order['product_list']) && count($order['product_list'])) { + if (!Db::getInstance()->getValue('SELECT `id_ebay_order` FROM `'._DB_PREFIX_.'ebay_order` WHERE `id_order_ref` = \''.pSQL($order['id_order_ref']).'\'')) + { $result = Db::getInstance()->getRow('SELECT `id_customer` FROM `'._DB_PREFIX_.'customer` WHERE `active` = 1 AND `email` = \''.pSQL($order['email']).'\' AND `deleted` = 0'.(substr(_PS_VERSION_, 0, 3) == '1.3' ? '' : ' AND `is_guest` = 0')); $id_customer = (isset($result['id_customer']) ? $result['id_customer'] : 0); + // Check for empty name + $order['firstname'] = str_replace('_', '', trim($order['firstname'])); + $order['familyname'] = str_replace('_', '', trim($order['familyname'])); + if (empty($order['familyname'])) + $order['familyname'] = $order['firstname']; + if (empty($order['firstname'])) + $order['firstname'] = $order['familyname']; + + if (Validate::isEmail($order['email']) && !empty($order['firstname']) && !empty($order['familyname'])) + { + // Add customer if he doesn't exist if ($id_customer < 1) { @@ -382,6 +414,11 @@ class Ebay extends Module Db::getInstance()->autoExecute(_DB_PREFIX_.'orders', $updateOrder, 'UPDATE', '`id_order` = '.(int)$id_order); foreach ($order['product_list'] as $product) Db::getInstance()->autoExecute(_DB_PREFIX_.'order_detail', array('product_price' => floatval($product['price']), 'tax_rate' => 0, 'reduction_percent' => 0), 'UPDATE', '`id_order` = '.(int)$id_order.' AND `product_id` = '.(int)$product['id_product'].' AND `product_attribute_id` = '.(int)$product['id_product_attribute']); + + // Register the ebay order ref + Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_order', array('id_order_ref' => pSQL($order['id_order_ref']), 'id_order' => (int)$id_order), 'INSERT'); + } + } } } @@ -1075,11 +1112,13 @@ class Ebay extends Module $nbProductsModeA = Db::getInstance()->getValue(' SELECT COUNT(`id_product`) as nb FROM `'._DB_PREFIX_.'product` - WHERE `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_ebay_category` > 0)'); + WHERE `quantity` > 0 AND `active` = 1 + AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_ebay_category` > 0)'); $nbProductsModeB = Db::getInstance()->getValue(' SELECT COUNT(`id_product`) as nb FROM `'._DB_PREFIX_.'product` - WHERE `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_ebay_category` > 0 AND `sync` = 1)'); + WHERE `quantity` > 0 AND `active` = 1 + AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_ebay_category` > 0 AND `sync` = 1)'); $nbProducts = $nbProductsModeA; if (Configuration::get('EBAY_SYNC_MODE') == 'B') @@ -1213,7 +1252,7 @@ class Ebay extends Module Configuration::updateValue('EBAY_SYNC_MODE', 'A'); // Retrieve product list for eBay (which have matched categories) - $productsList = Db::getInstance()->ExecuteS('SELECT `id_product` FROM `'._DB_PREFIX_.'product` WHERE `active` = 1 AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0)'); + $productsList = Db::getInstance()->ExecuteS('SELECT `id_product` FROM `'._DB_PREFIX_.'product` WHERE `quantity` > 0 AND `active` = 1 AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0)'); // Send each product on eBay $this->_syncProducts($productsList); @@ -1227,7 +1266,7 @@ class Ebay extends Module Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_category_configuration', array('sync' => 0), 'UPDATE', ''); foreach ($_POST['category'] as $id_category) Db::getInstance()->autoExecute(_DB_PREFIX_.'ebay_category_configuration', array('sync' => 1), 'UPDATE', '`id_category` = '.(int)$id_category); - $productsList = Db::getInstance()->ExecuteS('SELECT `id_product` FROM `'._DB_PREFIX_.'product` WHERE `active` = 1 AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0 AND `sync` = 1)'); + $productsList = Db::getInstance()->ExecuteS('SELECT `id_product` FROM `'._DB_PREFIX_.'product` WHERE `quantity` > 0 AND `active` = 1 AND `id_category_default` IN (SELECT `id_category` FROM `'._DB_PREFIX_.'ebay_category_configuration` WHERE `id_category` > 0 AND `id_ebay_category` > 0 AND `sync` = 1)'); // Send each product on eBay $this->_syncProducts($productsList); @@ -1282,6 +1321,7 @@ class Ebay extends Module { $variationsList[$c['group_name']][$c['attribute_name']] = 1; $variations[$c['id_product'].'-'.$c['id_product_attribute']]['id_attribute'] = $c['id_product_attribute']; + $variations[$c['id_product'].'-'.$c['id_product_attribute']]['reference'] = $c['reference']; $variations[$c['id_product'].'-'.$c['id_product_attribute']]['quantity'] = $c['quantity']; $variations[$c['id_product'].'-'.$c['id_product_attribute']]['variations'][] = array('name' => $c['group_name'], 'value' => $c['attribute_name']); $variations[$c['id_product'].'-'.$c['id_product_attribute']]['price_static'] = Product::getPriceStatic((int)$c['id_product'], true, (int)$c['id_product_attribute']); @@ -1322,6 +1362,7 @@ class Ebay extends Module // Generate array and try insert in database $datas = array( 'id_product' => $product->id, + 'reference' => $product->reference, 'name' => str_replace('&', '&', $product->name), 'brand' => $product->manufacturer_name, 'description' => $product->description, @@ -1688,4 +1729,4 @@ class Ebay extends Module } -?> + diff --git a/modules/ebay/sql-install.php b/modules/ebay/sql-install.php index 543291a1c..b4a8b16ed 100755 --- a/modules/ebay/sql-install.php +++ b/modules/ebay/sql-install.php @@ -48,5 +48,32 @@ ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'; + // Create Order Table in Database + $sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ebay_order` ( + `id_ebay_order` int(16) NOT NULL AUTO_INCREMENT, + `id_order_ref` varchar(128) NOT NULL, + `id_order` int(16) NOT NULL, + UNIQUE(`id_order_ref`), + PRIMARY KEY (`id_ebay_order`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'; + + + // Create Sync History Table in Database + $sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ebay_sync_history` ( + `id_ebay_sync_history` int(16) NOT NULL AUTO_INCREMENT, + `is_manual` tinyint(1) NOT NULL, + `datetime` datetime NOT NULL, + PRIMARY KEY (`id_ebay_sync_history`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'; + + + // Create Sync History Product Table in Database + $sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ebay_sync_history_product` ( + `id_ebay_sync_history_product` int(16) NOT NULL AUTO_INCREMENT, + `id_ebay_sync_history` int(16), + `id_product` int(16), + KEY (`id_ebay_sync_history`), + PRIMARY KEY (`id_ebay_sync_history_product`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'; + -?> diff --git a/modules/ebay/sql-uninstall.php b/modules/ebay/sql-uninstall.php index c5c2ed36e..e9d16be3e 100755 --- a/modules/ebay/sql-uninstall.php +++ b/modules/ebay/sql-uninstall.php @@ -5,5 +5,8 @@ $sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'ebay_category`;'; $sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'ebay_category_configuration`;'; $sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'ebay_product`;'; + $sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'ebay_order`;'; + $sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'ebay_sync_history`;'; + $sql[] = 'DROP TABLE IF EXISTS `'._DB_PREFIX_.'ebay_sync_history_product`;'; + -?> diff --git a/modules/ebay/sql-upgrade-1-1.php b/modules/ebay/sql-upgrade-1-1.php new file mode 100644 index 000000000..5b698140b --- /dev/null +++ b/modules/ebay/sql-upgrade-1-1.php @@ -0,0 +1,6 @@ +body_home_logo_link}{/if} {if $homepage_logo}{$editorial->body_title|escape:'htmlall':'UTF-8'|stripslashes}{/if} {if $editorial->body_home_logo_link}{/if} - {if $editorial->body_logo_subheading}

{$editorial->body_logo_subheading|stripslashes}

- {elseif $editorial->body_logo_subheading}

{$editorial->body_logo_subheading}

{/if} + {if $editorial->body_logo_subheading}

{$editorial->body_logo_subheading|stripslashes}

{/if} {if $editorial->body_title}

{$editorial->body_title|stripslashes}

{elseif $editorial->body_title}

{$editorial->body_title|stripslashes}

{/if} {if $editorial->body_subheading}

{$editorial->body_subheading|stripslashes}

@@ -38,4 +37,4 @@ {if $editorial->body_paragraph}
{$editorial->body_paragraph|stripslashes}
{elseif $editorial->body_paragraph}
{$editorial->body_paragraph|stripslashes}
{/if} - \ No newline at end of file + diff --git a/modules/hipay/hipay.php b/modules/hipay/hipay.php index f8eb9a61b..3bb14c6cf 100644 --- a/modules/hipay/hipay.php +++ b/modules/hipay/hipay.php @@ -321,11 +321,13 @@ class Hipay extends PaymentModule { // Delete all configurated zones foreach ($_POST as $key => $val) + { if (strncmp($key, 'HIPAY_AZ_ALL_', strlen('HIPAY_AZ_ALL_')) == 0) { $id = substr($key, -(strlen($key) - strlen('HIPAY_AZ_ALL_'))); Configuration::updateValue('HIPAY_AZ_'.$id, 'ko'); } + } Db::getInstance()->ExecuteS('DELETE FROM `'._DB_PREFIX_.'module_country` WHERE `id_module` = '.(int)$this->id); // Add the new configuration zones @@ -353,17 +355,17 @@ class Hipay extends PaymentModule if (Configuration::get('HIPAY_SITEID_TEST_'.$currency['iso_code']) != Tools::getValue('HIPAY_SITEID_TEST_'.$currency['iso_code'])) Configuration::updateValue('HIPAY_CATEGORY_TEST_'.$currency['iso_code'], false); - Configuration::updateValue('HIPAY_ACCOUNT_'.$currency['iso_code'], Tools::getValue('HIPAY_ACCOUNT_'.$currency['iso_code'])); - Configuration::updateValue('HIPAY_PASSWORD_'.$currency['iso_code'], Tools::getValue('HIPAY_PASSWORD_'.$currency['iso_code'])); - Configuration::updateValue('HIPAY_SITEID_'.$currency['iso_code'], Tools::getValue('HIPAY_SITEID_'.$currency['iso_code'])); + Configuration::updateValue('HIPAY_ACCOUNT_'.$currency['iso_code'], trim(Tools::getValue('HIPAY_ACCOUNT_'.$currency['iso_code']))); + Configuration::updateValue('HIPAY_PASSWORD_'.$currency['iso_code'], trim(Tools::getValue('HIPAY_PASSWORD_'.$currency['iso_code']))); + Configuration::updateValue('HIPAY_SITEID_'.$currency['iso_code'], trim(Tools::getValue('HIPAY_SITEID_'.$currency['iso_code']))); Configuration::updateValue('HIPAY_CATEGORY_'.$currency['iso_code'], Tools::getValue('HIPAY_CATEGORY_'.$currency['iso_code'])); if ($this->prod AND Tools::getValue('HIPAY_ACCOUNT_'.$currency['iso_code'])) $accounts[Tools::getValue('HIPAY_ACCOUNT_'.$currency['iso_code'])] = 1; - Configuration::updateValue('HIPAY_ACCOUNT_TEST_'.$currency['iso_code'], Tools::getValue('HIPAY_ACCOUNT_TEST_'.$currency['iso_code'])); - Configuration::updateValue('HIPAY_PASSWORD_TEST_'.$currency['iso_code'], Tools::getValue('HIPAY_PASSWORD_TEST_'.$currency['iso_code'])); - Configuration::updateValue('HIPAY_SITEID_TEST_'.$currency['iso_code'], Tools::getValue('HIPAY_SITEID_TEST_'.$currency['iso_code'])); + Configuration::updateValue('HIPAY_ACCOUNT_TEST_'.$currency['iso_code'], trim(Tools::getValue('HIPAY_ACCOUNT_TEST_'.$currency['iso_code']))); + Configuration::updateValue('HIPAY_PASSWORD_TEST_'.$currency['iso_code'], trim(Tools::getValue('HIPAY_PASSWORD_TEST_'.$currency['iso_code']))); + Configuration::updateValue('HIPAY_SITEID_TEST_'.$currency['iso_code'], trim(Tools::getValue('HIPAY_SITEID_TEST_'.$currency['iso_code']))); Configuration::updateValue('HIPAY_CATEGORY_TEST_'.$currency['iso_code'], Tools::getValue('HIPAY_CATEGORY_TEST_'.$currency['iso_code'])); if (!$this->prod AND Tools::getValue('HIPAY_ACCOUNT_TEST_'.$currency['iso_code'])) diff --git a/modules/mailalerts/mailalerts.php b/modules/mailalerts/mailalerts.php index ccad650d8..3d1c968af 100644 --- a/modules/mailalerts/mailalerts.php +++ b/modules/mailalerts/mailalerts.php @@ -185,7 +185,7 @@ class MailAlerts extends Module // Filling-in vars for email $template = 'new_order'; - $subject = $this->l('New order', $id_lang); + $subject = $this->l('New order').' - '.sprintf('%06d', $order->id); $templateVars = array( '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, diff --git a/modules/paypal/paypal.php b/modules/paypal/paypal.php index ef7f507ee..b5671cffb 100644 --- a/modules/paypal/paypal.php +++ b/modules/paypal/paypal.php @@ -884,7 +884,7 @@ class PayPal extends PaymentModule Configuration::updateValue('PAYPAL_BUSINESS', trim(Tools::getValue('email_paypal'))); Configuration::updateValue('PAYPAL_HEADER', Tools::getValue('banner_url')); Configuration::updateValue('PAYPAL_API_USER', trim(Tools::getValue('api_username'))); - Configuration::updateValue('PAYPAL_API_PASSWORD', Tools::getValue('api_password')); + Configuration::updateValue('PAYPAL_API_PASSWORD', trim(Tools::getValue('api_password'))); Configuration::updateValue('PAYPAL_API_SIGNATURE', trim(Tools::getValue('api_signature'))); Configuration::updateValue('PAYPAL_EXPRESS_CHECKOUT', (int)(Tools::isSubmit('paypal_express'))); Configuration::updateValue('PAYPAL_MODE_DEBUG', (int)(Tools::isSubmit('paypal_debug'))); diff --git a/modules/socolissimo/socolissimo.php b/modules/socolissimo/socolissimo.php index 3c42088fe..df7a714d4 100644 --- a/modules/socolissimo/socolissimo.php +++ b/modules/socolissimo/socolissimo.php @@ -407,7 +407,7 @@ class Socolissimo extends CarrierModule 'inputs' => $inputs, 'serialsInput' => $serialsInput, 'finishProcess' => $this->l('To choose SoColissimo, click on a delivery method'))); $country = new Country((int)($params['address']->id_country)); - $carriers = Carrier::getCarriers($cookie->id_lang, true , false,false, NULL, ALL_CARRIERS); + $carriers = Carrier::getCarriers($cookie->id_lang, true , false,false, NULL, Carrier::ALL_CARRIERS); $ids = array(); foreach($carriers as $carrier) $ids[] = $carrier['id_carrier']; diff --git a/modules/treepodia/treepodia.php b/modules/treepodia/treepodia.php index e4b91a867..baa2b42ee 100644 --- a/modules/treepodia/treepodia.php +++ b/modules/treepodia/treepodia.php @@ -46,7 +46,7 @@ class Treepodia extends Module { $this->name = 'treepodia'; $this->tab = 'front_office_features'; - $this->version = '1.3'; + $this->version = '1.4'; $this->displayName = 'Treepodia'; parent::__construct(); @@ -123,13 +123,23 @@ XML; foreach ($languages AS $language) $infos->addChild('lang', $language['iso_code']); + $limit_sql = ''; + $limit_start = (int)Tools::getValue('limit_start'); + $limit_end = (int)Tools::getValue('limit_end'); + if ($limit_start > 0) + { + if ($limit_end < $limit_start) + $limit_end = $limit_start + 10; + $limit_sql = ' LIMIT '.(int)$limit_start.','.(int)$limit_end; + } + $sqlProducts = Db::getInstance()->ExecuteS(' SELECT p.id_product, p.reference, p.weight, m.name manufacturer, s.name supplier, p.on_sale, p.id_manufacturer, pd.id_product_download FROM '._DB_PREFIX_.'product p LEFT JOIN '._DB_PREFIX_.'manufacturer m ON (m.id_manufacturer = p.id_manufacturer) LEFT JOIN '._DB_PREFIX_.'supplier s ON (s.id_supplier = p.id_supplier) LEFT JOIN '._DB_PREFIX_.'product_download pd ON (pd.id_product = p.id_product) - WHERE p.active = 1'); + WHERE p.active = 1'.$limit_sql); foreach ($sqlProducts AS $sqlProduct) { diff --git a/themes/prestashop/order-detail.tpl b/themes/prestashop/order-detail.tpl index 663f48b1e..0a0eabede 100644 --- a/themes/prestashop/order-detail.tpl +++ b/themes/prestashop/order-detail.tpl @@ -29,7 +29,10 @@ var baseDir = '{$base_dir_ssl}'; //]]> - +{if !isset($smarty.get.ajax)} +
+
+{/if}
@@ -369,3 +372,7 @@ {else}

 {l s='You can\'t make a merchandise return with a guest account'}

{/if} +{if !isset($smarty.get.ajax)} +
+
+{/if} \ No newline at end of file