diff --git a/admin-dev/themes/default/template/controllers/modules/js.tpl b/admin-dev/themes/default/template/controllers/modules/js.tpl index 19d0935da..799f285b1 100644 --- a/admin-dev/themes/default/template/controllers/modules/js.tpl +++ b/admin-dev/themes/default/template/controllers/modules/js.tpl @@ -247,10 +247,10 @@ catch(e){} return false; } - $('#module_type_filter').change(function() { setFilter(); }); - $('#module_install_filter').change(function() { setFilter(); }); - $('#module_status_filter').change(function() { setFilter(); }); - $('#country_module_value_filter').change(function() { setFilter(); }); + + $(document).on('change', '#module_type_filter, #module_install_filter, #module_status_filter, #country_module_value_filter', function() { + setFilter(); + }); $('.moduleTabPreferencesChoise').change(function() { diff --git a/classes/Search.php b/classes/Search.php index 4edd58879..f578d1743 100644 --- a/classes/Search.php +++ b/classes/Search.php @@ -394,16 +394,47 @@ class SearchCore return $features; } - protected static function getProductsToIndex($total_languages, $id_product = false, $limit = 50) + protected static function getProductsToIndex($total_languages, $id_product = false, $limit = 50, $weight_array = array()) { // Adjust the limit to get only "whole" products, in every languages (and at least one) $max_possibilities = $total_languages * count(Shop::getShops(true)); $limit = max($max_possibilities, floor($limit / $max_possibilities) * $max_possibilities); - return Db::getInstance()->executeS(' - SELECT p.id_product, pl.id_lang, pl.id_shop, pl.name pname, p.reference, p.ean13, p.upc, - pl.description_short, pl.description, cl.name cname, m.name mname, l.iso_code - FROM '._DB_PREFIX_.'product p + $sql = 'SELECT p.id_product, pl.id_lang, pl.id_shop, pl.name pname, p.reference, p.ean13, p.upc, + pl.description_short, pl.description, cl.name cname, m.name mname, l.iso_code'; + + if (is_array($weight_array)) + foreach($weight_array as $key => $weight) + if ((int)$weight) + switch($key) + { + case 'pname': + $sql .= ', pl.name pname'; + break; + case 'reference': + $sql .= ', p.reference'; + break; + case 'ean13': + $sql .= ', p.ean13'; + break; + case 'upc': + $sql .= ', p.upc'; + break; + case 'description_short': + $sql .= ', pl.description_short'; + break; + case 'description': + $sql .= ', pl.description'; + break; + case 'cname': + $sql .= ', cl.name cname'; + break; + case 'mname': + $sql .= ', m.name mname'; + break; + } + + $sql .= ' FROM '._DB_PREFIX_.'product p LEFT JOIN '._DB_PREFIX_.'product_lang pl ON p.id_product = pl.id_product '.Shop::addSqlAssociation('product', 'p').' @@ -416,8 +447,8 @@ class SearchCore WHERE product_shop.indexed = 0 AND product_shop.visibility IN ("both", "search") '.($id_product ? 'AND p.id_product = '.(int)$id_product : '').' - LIMIT '.(int)$limit - ); + LIMIT '.(int)$limit; + return Db::getInstance()->executeS($sql); } public static function indexation($full = false, $id_product = false) @@ -490,15 +521,18 @@ class SearchCore $total_languages = count(Language::getLanguages(false)); // Products are processed 50 by 50 in order to avoid overloading MySQL - while (($products = Search::getProductsToIndex($total_languages, $id_product, 50)) && (count($products) > 0)) + while (($products = Search::getProductsToIndex($total_languages, $id_product, 50, $weight_array)) && (count($products) > 0)) { $products_array = array(); // Now each non-indexed product is processed one by one, langage by langage foreach ($products as $product) { - $product['tags'] = Search::getTags($db, (int)$product['id_product'], (int)$product['id_lang']); - $product['attributes'] = Search::getAttributes($db, (int)$product['id_product'], (int)$product['id_lang']); - $product['features'] = Search::getFeatures($db, (int)$product['id_product'], (int)$product['id_lang']); + if ((int)$weight_array['tags']) + $product['tags'] = Search::getTags($db, (int)$product['id_product'], (int)$product['id_lang']); + if ((int)$weight_array['attributes']) + $product['attributes'] = Search::getAttributes($db, (int)$product['id_product'], (int)$product['id_lang']); + if ((int)$weight_array['features']) + $product['features'] = Search::getFeatures($db, (int)$product['id_product'], (int)$product['id_lang']); // Data must be cleaned of html, bad characters, spaces and anything, then if the resulting words are long enough, they're added to the array $product_array = array(); diff --git a/controllers/admin/AdminSearchConfController.php b/controllers/admin/AdminSearchConfController.php index 88b0eb844..e1b891b60 100644 --- a/controllers/admin/AdminSearchConfController.php +++ b/controllers/admin/AdminSearchConfController.php @@ -130,7 +130,8 @@ class AdminSearchConfControllerCore extends AdminController 'info' => $this->l('The "weight" represents its importance and relevance for the ranking of the products when completing a new search.').'
'.$this->l('A word with a weight of eight will have four times more value than a word with a weight of two.').'

- '.$this->l('We advise you to set a greater weight for words which appear in the name or reference of a product. This will allow the search results to be as precise and relevant as possible.'), + '.$this->l('We advise you to set a greater weight for words which appear in the name or reference of a product. This will allow the search results to be as precise and relevant as possible.').'

+ '.$this->l('Setting a weight to 0 will exclude that field from search index. Re-build of the entire index is required when changing to or from 0'), 'fields' => array( 'PS_SEARCH_WEIGHT_PNAME' => array( 'title' => $this->l('Product name weight'), diff --git a/controllers/front/CompareController.php b/controllers/front/CompareController.php index d88826c8d..09f819c5a 100644 --- a/controllers/front/CompareController.php +++ b/controllers/front/CompareController.php @@ -138,9 +138,10 @@ class CompareControllerCore extends FrontController 'product_features' => $listFeatures, 'products' => $listProducts, 'width' => $width, + 'HOOK_COMPARE_EXTRA_INFORMATION' => Hook::exec('displayCompareExtraInformation', array('list_ids_product' => $ids)), + 'HOOK_EXTRA_PRODUCT_COMPARISON' => Hook::exec('displayProductComparison', array('list_ids_product' => $ids)), 'homeSize' => Image::getSize(ImageType::getFormatedName('home')) )); - $this->context->smarty->assign('HOOK_EXTRA_PRODUCT_COMPARISON', Hook::exec('displayProductComparison', array('list_ids_product' => $ids))); } elseif (isset($this->context->cookie->id_compare)) { diff --git a/install-dev/upgrade/upgrade.php b/install-dev/upgrade/upgrade.php index b51c04d4e..191b66c11 100644 --- a/install-dev/upgrade/upgrade.php +++ b/install-dev/upgrade/upgrade.php @@ -346,7 +346,7 @@ if (empty($fail_result)) if (strpos($phpString, '::') === false) { $func_name = str_replace($pattern[0], '', $php[0]); - require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.$func_name.'.php'); + require_once(_PS_INSTALLER_PHP_UPGRADE_DIR_.Tools::strtolower($func_name).'.php'); $phpRes = call_user_func_array($func_name, $parameters); } /* Or an object method */ diff --git a/themes/default-bootstrap/css/comparator.css b/themes/default-bootstrap/css/comparator.css index 3715b7e0c..44642a120 100644 --- a/themes/default-bootstrap/css/comparator.css +++ b/themes/default-bootstrap/css/comparator.css @@ -20,7 +20,7 @@ table#product_comparison tbody tr td.comparison_infos div.center { table#product_comparison tbody tr td.td_empty { vertical-align: bottom; } -table#product_comparison tbody tr td.td_empty span { +table#product_comparison tbody tr td.td_empty > span { font: 600 18px/22px "Open Sans", sans-serif; text-transform: uppercase; color: #555454; @@ -95,6 +95,51 @@ table#product_comparison .product-rating { margin-bottom: 20px; } +#stOCClose { + width: 29px !important; + height: 29px !important; +} + +.stButton .stFb, .stButton .stTwbutton, .stButton .stMainServices { + height: 22px !important; +} + +.stButton .stButton_gradient { + height: 22px !important; +} + +@media (min-width: 1200px) { + .share { + margin-bottom: 315px; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .share { + margin-bottom: 315px; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .share { + margin-bottom: 315px; + } +} +.share strong { + display: block; + margin-bottom: 10px; +} + +.share > div { + margin-bottom: 8px; +} + +.stArrow { + display: none !important; +} + +.stButton { + margin-left: 0 !important; +} + #product_comparison .comparison_feature .product_name { display: none; } diff --git a/themes/default-bootstrap/footer.tpl b/themes/default-bootstrap/footer.tpl index 63d62cee5..f572a7af1 100644 --- a/themes/default-bootstrap/footer.tpl +++ b/themes/default-bootstrap/footer.tpl @@ -23,16 +23,16 @@ * International Registered Trademark & Property of PrestaShop SA *} {if !$content_only} - - {if isset($right_column_size) && !empty($right_column_size)} - -
- {$HOOK_RIGHT_COLUMN} -
- {/if} - - - + + {if isset($right_column_size) && !empty($right_column_size)} + +
+ {$HOOK_RIGHT_COLUMN} +
+ {/if} + + + - + + {/if} diff --git a/themes/default-bootstrap/header.tpl b/themes/default-bootstrap/header.tpl index c63b54d15..fd7fa552c 100644 --- a/themes/default-bootstrap/header.tpl +++ b/themes/default-bootstrap/header.tpl @@ -27,22 +27,37 @@ - + {$meta_title|escape:'html':'UTF-8'} -{if isset($meta_description) AND $meta_description} - -{/if} -{if isset($meta_keywords) AND $meta_keywords} - -{/if} - - + {if isset($meta_description) AND $meta_description} + + {/if} + {if isset($meta_keywords) AND $meta_keywords} + + {/if} + - - - - - - - - - - - - -{if isset($css_files)} - {foreach from=$css_files key=css_uri item=media} - - {/foreach} -{/if} -{if isset($js_files)} - {foreach from=$js_files item=js_uri} - - {/foreach} -{/if} - - - - - - - - - + {if isset($js_files)} + {foreach from=$js_files item=js_uri} + + {/foreach} + {/if} + + + + + + + + + {$HOOK_HEADER} @@ -103,117 +104,124 @@ {/if}
-
- -
-
-
- {if $page_name !='index' && $page_name !='pagenotfound'} - {include file="$tpl_dir./breadcrumb.tpl"} - {/if} -
+
+ +
+ +
+
+ {if $page_name !='index' && $page_name !='pagenotfound'} + {include file="$tpl_dir./breadcrumb.tpl"} + {/if} +
{if isset($left_column_size) && !empty($left_column_size)} -
+
{$HOOK_LEFT_COLUMN} -
+
{/if} - -
+ +
{/if} \ No newline at end of file diff --git a/themes/default-bootstrap/modules/blockcart/blockcart.tpl b/themes/default-bootstrap/modules/blockcart/blockcart.tpl index af543f92f..39ea46550 100644 --- a/themes/default-bootstrap/modules/blockcart/blockcart.tpl +++ b/themes/default-bootstrap/modules/blockcart/blockcart.tpl @@ -215,7 +215,7 @@ var generated_date = {$smarty.now|intval};
{/if}
- {l s='Total shipping (tax exclu.):' mod='blockcart'} + {l s='Total shipping (tax excl.):' mod='blockcart'} {if $shipping_cost_float == 0}{l s='Free shipping!' mod='blockcart'}{else}{$shipping_cost}{/if}
{if $show_tax && isset($tax_cost)} @@ -230,7 +230,7 @@ var generated_date = {$smarty.now|intval};
diff --git a/themes/default-bootstrap/products-comparison.tpl b/themes/default-bootstrap/products-comparison.tpl index 74e576e4e..76fbf314c 100644 --- a/themes/default-bootstrap/products-comparison.tpl +++ b/themes/default-bootstrap/products-comparison.tpl @@ -36,10 +36,11 @@
- - + + {assign var='taxes_behavior' value=false} {if $use_taxes && (!$priceDisplay || $priceDisplay == 2)} {assign var='taxes_behavior' value=true} @@ -168,5 +169,4 @@ {/if} - + \ No newline at end of file diff --git a/themes/default-bootstrap/sass/comparator.scss b/themes/default-bootstrap/sass/comparator.scss index 811593a8a..e168cee7f 100644 --- a/themes/default-bootstrap/sass/comparator.scss +++ b/themes/default-bootstrap/sass/comparator.scss @@ -30,11 +30,11 @@ table#product_comparison { td.td_empty { vertical-align:bottom; - span { + > span { font:600 18px/22px $font-custom; text-transform:uppercase; color:#555454; - } + } } } } @@ -110,8 +110,46 @@ table#product_comparison { width:auto; } .footer_link { margin-bottom:20px;} - - +#stOCClose { + width:29px !important; + height:29px !important; +} +.stButton .stFb, .stButton .stTwbutton, .stButton .stMainServices { + height:22px !important; +} +.stButton .stButton_gradient { + height:22px !important; +} +@media (min-width: $screen-lg) { // min 1200px + .share { + margin-bottom:315px; + } +} +@media (min-width: $screen-md) and (max-width: $screen-md-max) { // min 992px max 1199px + .share { + margin-bottom:315px; + } +} +@media (min-width: $screen-sm) and (max-width: $screen-sm-max) { // min 768px max 991px + .share { + margin-bottom:315px; + } +} +.share { + strong { + display:block; + margin-bottom:10px; + } +} +.share > div { + margin-bottom:8px; +} +.stArrow { + display:none !important; +} +.stButton { + margin-left:0 !important; +} #product_comparison{ .comparison_feature{ .product_name{display: none;}
- {l s='Features:'} -
+ {$HOOK_COMPARE_EXTRA_INFORMATION} + {l s='Features:'} +