diff --git a/modules/filtervp/filter.tpl b/modules/filtervp/filter.tpl index df7f2a34..8276d653 100755 --- a/modules/filtervp/filter.tpl +++ b/modules/filtervp/filter.tpl @@ -1,15 +1,23 @@ -{if count($sizes) > 0} +{if count($attr) > 0}
-

{l s='Recherche par' mod='filtervp'} {$name}

+

{l s='Recherche par' mod='filtervp'}

-
    - {foreach from=$sizes item=size} +
    {$attr[0]['group']}
    + {assign var="current_name" value=$attr[0]['group']} +
      + {foreach from=$attr key=key item=attribute} + {if $key!=0 && $current_name!=$attribute['group']} +
    +
    {$attribute['group']}
    +
      + {/if}
    • - - + +
    • + {assign var="current_name" value=$attribute['group']} {/foreach}
diff --git a/modules/filtervp/filtervp.php b/modules/filtervp/filtervp.php index 1af9035a..6fb49f01 100755 --- a/modules/filtervp/filtervp.php +++ b/modules/filtervp/filtervp.php @@ -1,7 +1,8 @@ name = 'filtervp'; @@ -23,36 +24,98 @@ class Filtervp extends Module { return TRUE; } - public function hookdisplayLeftVP($params) { - global $smarty; - $sizes = self::getAllValueAttr(Filtervp::FILTER_ID, Tools::getValue('id_category')); + public function hookPrivateSales_Edit($params) { - if (empty($sizes)) { - $sizes = self::getAllValueAttr(self::FILTER_SIZE, Tools::getValue('id_category')); - $name = self::getAttrName(self::FILTER_SIZE); - } else { - $name = self::getAttrName(self::FILTER_ID); + $attr_groups = Db::getInstance()->ExecuteS(' + SELECT + al.`name`, + a.`id_attribute_group`'.($params['sale'] !== NULL? ', ( + SELECT IFNULL(s.`id_sale`, NULL) + FROM `'._DB_PREFIX_.'attribute_group_ps` s + WHERE a.`id_attribute_group` = s.`id_attribute_group` AND s.`id_sale` = '.$params['sale']->id.' + ) AS `id_sale`': '').' + FROM ps_attribute_group a + LEFT JOIN ps_attribute_group_lang al ON al.id_attribute_group = a.id_attribute_group + WHERE al.`id_lang` = 2 + '); + + echo ' +
+ +
+ +
+
+ + +
+ +
+
'; + } + + public function hookPrivateSales_Delete($params) { + Db::getInstance()->Execute(' + DELETE FROM `'._DB_PREFIX_.'attribute_group_ps` + WHERE `id_sale` = '.$params['sale']->id + ); + } + + public function hookPrivateSales_Create($params) { + if($attr_groups = Tools::getValue('attr_groups')) { + foreach($attr_groups as $group) { + Db::getInstance()->Execute(' + INSERT INTO `'._DB_PREFIX_.'attribute_group_ps` VALUES ( + '.(int) $group.', '.$params['sale']->id.' + ) + '); + } } + } - if($name == 'Tailles') { - $name = 'Taille'; - }; - + public function hookPrivateSales_Update($params) { + Db::getInstance()->Execute(' + DELETE FROM `'._DB_PREFIX_.'attribute_group_ps` + WHERE `id_sale` = '.$params['sale']->id + ); + $this->hookPrivateSales_Create($params); + } + + public function hookdisplayLeftVP($params) { + global $smarty; + $attributes = self::getAllAttrByGroup(Tools::getValue('id_category')); $smarty->assign(array( - 'name' => $name, - 'sizes' => $sizes, + 'attr' => $attributes, )); - return $this->display(__FILE__, 'filter.tpl'); - } + return $this->display(__FILE__, 'filter.tpl'); + } - public static function getAllValueAttr($id_attr, $id_cat){ + + public static function getAllValueAttr($id_attr, $id_cat){ global $cookie; - + $id_lang = $cookie->id_lang; $results = Db::getInstance()->ExecuteS(' - SELECT - al.`name`, + SELECT + al.`name`, a.`id_attribute` FROM `'._DB_PREFIX_.'attribute` a @@ -61,23 +124,52 @@ class Filtervp extends Module { LEFT JOIN '._DB_PREFIX_.'product p ON cp.id_product = p.id_product INNER JOIN '._DB_PREFIX_.'product_attribute pa ON pa.id_product = cp.id_product INNER JOIN '._DB_PREFIX_.'product_attribute_combination pac ON pac.id_attribute = a.id_attribute AND pac.id_product_attribute = pa.id_product_attribute - WHERE - a.id_attribute_group = "'.$id_attr.'" + WHERE + a.id_attribute_group = "'.$id_attr.'" GROUP BY a.`id_attribute` ORDER BY - al.`name` ASC + al.`name` ASC '); return $results; } - public static function getAttrName($id_attr){ + public function getAllAttrByGroup($id_cat) + { + global $cookie; + + $id_lang = $cookie->id_lang; + $results = Db::getInstance()->ExecuteS(' + SELECT + al.`name`, + a.`id_attribute`, + agl.`name` as `group` + FROM + `'._DB_PREFIX_.'attribute` a + LEFT JOIN '._DB_PREFIX_.'attribute_lang al ON al.id_lang = '.(int)$id_lang.' AND al.id_attribute = a.id_attribute + LEFT JOIN '._DB_PREFIX_.'attribute_group_lang agl ON agl.id_attribute_group = a.id_attribute_group AND agl.id_lang = '.(int)$id_lang.' + LEFT JOIN '._DB_PREFIX_.'attribute_group_ps agp ON agp.id_attribute_group = agl.id_attribute_group + LEFT JOIN '._DB_PREFIX_.'privatesale_category pc ON pc.id_sale = agp.id_sale + LEFT JOIN '._DB_PREFIX_.'category_product cp ON cp.id_category = pc.id_category + LEFT JOIN '._DB_PREFIX_.'product p ON cp.id_product = p.id_product + INNER JOIN ps_product_attribute pa ON pa.id_product = cp.id_product + INNER JOIN ps_product_attribute_combination pac ON pac.id_attribute = a.id_attribute AND pac.id_product_attribute = pa.id_product_attribute + WHERE agp.id_sale IS NOT NULL AND pc.id_category = '.(int)$id_cat.' + GROUP BY + a.`id_attribute` + ORDER BY + agl.`name` ASC, al.`name` ASC + '); + return $results; + } + + public static function getAttrName($id_attr){ global $cookie; $id_lang = $cookie->id_lang; - return Db::getInstance()->getValue(' - SELECT - `public_name` - FROM `'._DB_PREFIX_.'attribute_group_lang` + return Db::getInstance()->getValue(' + SELECT + `public_name` + FROM `'._DB_PREFIX_.'attribute_group_lang` WHERE `id_attribute_group` = "'.(int)$id_attr.'" AND `id_lang` = "'.(int)$id_lang.'" '); diff --git a/modules/logistics/carriers/mondialrelay/cron_shipping.php b/modules/logistics/carriers/mondialrelay/cron_shipping.php index 79c383ef..af171c78 100755 --- a/modules/logistics/carriers/mondialrelay/cron_shipping.php +++ b/modules/logistics/carriers/mondialrelay/cron_shipping.php @@ -264,7 +264,7 @@ if(count($lines)) { array(495, 10, 'DT', 'DATFAC', date('d.m.Y')), array(505, 10, 'DT', 'DATCDE', date('d.m.Y')), array(515, 5, 'A', 'CALPHA', $address['lastname']), - array(520, 5, 'A', 'PRTMIS', ''), + array(520, 5, 'A', 'PRTMIS', '3BTK'), array(525, 1, 'A', 'COLLEC', ''), array(526, 1, 'A', 'TOPMDM', 'N'), array(527, 2, 'A', 'TOPEMB', ''), diff --git a/modules/mondialrelay/views/templates/front/checkout_process_widget.tpl b/modules/mondialrelay/views/templates/front/checkout_process_widget.tpl index 3c68c5a1..123415b2 100755 --- a/modules/mondialrelay/views/templates/front/checkout_process_widget.tpl +++ b/modules/mondialrelay/views/templates/front/checkout_process_widget.tpl @@ -29,7 +29,7 @@ var PS_MRData = {$MR_Data}; var id_address = '{$address->id|intval}'; var ssl = {$ssl}; - var weight = {$cart->getTotalWeight()|floatval} * 1000; // en Kg + var weight = parseInt({$cart->getTotalWeight()|floatval} * 1000); // en Kg if( weight == 0 ) weight = 100; //var weight = 999999; // en Kg var iso_code = '{$country->iso_code|escape:'htmlall':'UTF-8'}'; diff --git a/modules/mondialrelay/views/templates/front/selection_process_widget.tpl b/modules/mondialrelay/views/templates/front/selection_process_widget.tpl index 4117e9ac..5f639ec7 100755 --- a/modules/mondialrelay/views/templates/front/selection_process_widget.tpl +++ b/modules/mondialrelay/views/templates/front/selection_process_widget.tpl @@ -25,7 +25,7 @@ *} diff --git a/modules/philea_magistor/script/recept_expedition.php b/modules/philea_magistor/script/recept_expedition.php index 1700c082..fb21617f 100644 --- a/modules/philea_magistor/script/recept_expedition.php +++ b/modules/philea_magistor/script/recept_expedition.php @@ -229,7 +229,7 @@ VALUES ( '.(int) $id_order_detail.', '.(int) $row['detail_quantity'].', - "'.pSQL($shipping_number['number']).'", + "'.pSQL(trim($shipping_number['number'])).'", "'.$shipping_number['date'].'" ) '); @@ -339,6 +339,15 @@ ') as $row) { $sent_products[(int) $row['id_order_detail']] = (int) $row['quantity']; } + foreach(Db::getInstance()->ExecuteS(' + SELECT l.`id_order_detail`, SUM(l.`quantity`) AS `quantity` + FROM `'._DB_PREFIX_.'mondialrelay_parcel` l + LEFT JOIN `'._DB_PREFIX_.'order_detail` d ON (l.`id_order_detail` = d.`id_order_detail`) + WHERE d.`id_order` IN ('.implode(', ', $id_orders).') + GROUP BY l.`id_order_detail` + ') as $row) { + $sent_products[(int) $row['id_order_detail']] = (int) $row['quantity']; + } foreach(Db::getInstance()->ExecuteS(' SELECT l.`id_order_detail`, SUM(l.`quantity`) AS `quantity` FROM `'._DB_PREFIX_.'philea_parcel` l diff --git a/modules/privatesales/Sale.php b/modules/privatesales/Sale.php index 236ea5e1..278411ba 100755 --- a/modules/privatesales/Sale.php +++ b/modules/privatesales/Sale.php @@ -949,7 +949,7 @@ class Sale { foreach ($sales_order as $sale) { if (!in_array($sale, $id_sales)) { foreach(Db::getInstance()->executeS(' - GREATEST(d.`product_quantity` - d.`product_quantity_refunded`, 0) as `p_quantity` + SELECT GREATEST(d.`product_quantity` - d.`product_quantity_refunded`, 0) as `p_quantity` FROM `'._DB_PREFIX_.'product_ps_cache` c LEFT JOIN `'._DB_PREFIX_.'order_detail` d ON (d.`product_id` = c.`id_product`) WHERE d.`id_order` = '.(int)$key.' diff --git a/themes/site/css/style.css b/themes/site/css/style.css index 247dfecf..cd96eb08 100755 --- a/themes/site/css/style.css +++ b/themes/site/css/style.css @@ -7438,4 +7438,11 @@ table#carrierTable tbody td { #cart_remove_gift_message{ float:right; background: #e26ea2; +} + +.block_filter .content_filter h5{ + font-size: 15px; + text-decoration: underline; + color: #514E8C; + margin:10px 0px; } \ No newline at end of file diff --git a/themes/site/lang/es.php b/themes/site/lang/es.php index 0a4b3943..cc6da72b 100755 --- a/themes/site/lang/es.php +++ b/themes/site/lang/es.php @@ -652,6 +652,7 @@ $_LANG['product_801ab24683a4a8c433c6eb40c48bcd9d'] = 'Descargar'; $_LANG['product_98edb85b00d9527ad5acebe451b3fae6'] = 'Accesorios'; $_LANG['product_b16b1fd8f9d7e9a2e13f46d8ab5c460d'] = 'Plazo de entrega estimado de'; $_LANG['product_2cb89a2218fd65eb7ff6cadee6971805'] = '3 semanas'; +$_LANG['product_36c60995077a3b5eb5ff416b80cc5091'] = 'Retraso específico según la marca'; $_LANG['product_77d3431a7762a970d92fbf926d292a38'] = 'Haz un pedido de varias marcas'; $_LANG['product_2d39cbe34b52916e3cf9adcbe16a1b60'] = '= pagarás sólo una vez los gastos de envío !'; $_LANG['product_dba25e6675be5fa38a43f015fd6f91d4'] = 'Pago'; @@ -757,6 +758,8 @@ $_LANG['shopping-cart_f7b96335c6a33477579e43f3da368507'] = 'Disfrutar de nuestra $_LANG['shopping-cart_4bfddaa41fee050e0c15efa9a5cb4c65'] = 'Ahorros conseguidos :'; $_LANG['shopping-cart_7bb63c7de5a5ee79356083a12f21e1e8'] = 'en vez de'; $_LANG['shopping-cart_e261a45e4cec10be2d5abcd2049f8ac7'] = 'Los gastos de envío se calcurán en el paso 3'; +$_LANG['shopping-cart_ea3bd794dfeb4537c194ee43899516ed'] = 'Mi pedido es un regalo. Esta opción, genera una factura sin los precios indicados y permite añadir una pequeña dedicatoria sobre esta. ¡Ideal para enviar tu regalo directamente a casa de tus familiares o amigos! '; +$_LANG['shopping-cart_b4e59f3a4554655a099738382ebedbff'] = 'Si lo desea, puede añadir una nota al regalo:'; $_LANG['shopping-cart_af0f5bdc5be121b9307687aeeae38c17'] = 'Dirección de envío'; $_LANG['shopping-cart_601d8c4b9f72fc1862013c19b677a499'] = 'Dirección de facturación'; $_LANG['shopping-cart_f8617a92ba0a0a4eabee724eab7c9f48'] = 'Transportista:'; diff --git a/themes/site/lang/fr.php b/themes/site/lang/fr.php index d97768e7..67b390f1 100755 --- a/themes/site/lang/fr.php +++ b/themes/site/lang/fr.php @@ -737,6 +737,8 @@ $_LANG['shopping-cart_f7b96335c6a33477579e43f3da368507'] = 'Profitez de nos offr $_LANG['shopping-cart_4bfddaa41fee050e0c15efa9a5cb4c65'] = 'Les économies réalisées :'; $_LANG['shopping-cart_7bb63c7de5a5ee79356083a12f21e1e8'] = 'au lieu de'; $_LANG['shopping-cart_e261a45e4cec10be2d5abcd2049f8ac7'] = 'Les frais de port sont calculés en étape 3'; +$_LANG['shopping-cart_ea3bd794dfeb4537c194ee43899516ed'] = 'Ma commande est un cadeau. Elle me permet de bénéficier d\'une facture sans prix et d\'insérer un petit mot sur cette dernière. C\'est idéal pour expédier votre cadeau directement chez vos proches !'; +$_LANG['shopping-cart_b4e59f3a4554655a099738382ebedbff'] = 'Vous pouvez ajouter un message d\'accompagnement à votre commande.'; $_LANG['shopping-cart_af0f5bdc5be121b9307687aeeae38c17'] = 'Adresse de livraison'; $_LANG['shopping-cart_601d8c4b9f72fc1862013c19b677a499'] = 'Adresse de facturation'; $_LANG['shopping-cart_f8617a92ba0a0a4eabee724eab7c9f48'] = 'Transporteur :'; diff --git a/themes/site/modules/categoryscroll/es.php b/themes/site/modules/categoryscroll/es.php index 60a91812..394e765a 100644 --- a/themes/site/modules/categoryscroll/es.php +++ b/themes/site/modules/categoryscroll/es.php @@ -17,4 +17,4 @@ $_MODULE['<{categoryscroll}site>product-list_78945de8de090e90045d299651a68a9b'] $_MODULE['<{categoryscroll}site>product-list_4351cfebe4b61d8aa5efa1d020710005'] = 'Ver'; $_MODULE['<{categoryscroll}site>product-list_4391a5fd21c767037fbb3bcad0c1f595'] = 'Producto agotado'; $_MODULE['<{categoryscroll}site>product-list_763ea78c330dfb4adafcaf118747de76'] = 'Comprar expreso'; -$_MODULE['<{categoryscroll}site>product-list_77798ad342555ffa834758a2aaa6fc11'] = 'Comparar'; \ No newline at end of file +$_MODULE['<{categoryscroll}site>product-list_77798ad342555ffa834758a2aaa6fc11'] = 'Comparar';