Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap
This commit is contained in:
@@ -123,7 +123,7 @@ $(document).ready(function()
|
||||
hideFilterValueAction(this);
|
||||
});
|
||||
|
||||
// To be sure there is no other events attached to the selectPrductSort, change the ID
|
||||
// To be sure there is no other events attached to the selectProductSort, change the ID
|
||||
var id = 1;
|
||||
while ($('#selectPrductSort').length) { // Because ids are duplicated
|
||||
// Unbind event change on #selectPrductSort
|
||||
@@ -134,8 +134,18 @@ $(document).ready(function()
|
||||
$('label[for=selectPrductSort]').attr('for', 'selectPrductSort'+id);
|
||||
id++;
|
||||
}
|
||||
|
||||
while ($('#selectProductSort').length) { // Because ids are duplicated
|
||||
// Unbind event change on #selectProductSort
|
||||
$('#selectProductSort').unbind('change');
|
||||
$('#selectProductSort').attr('onchange', '');
|
||||
$('#selectProductSort').addClass('selectProductSort');
|
||||
$('#selectProductSort').attr('id', 'selectProductSort'+id);
|
||||
$('label[for=selectProductSort]').attr('for', 'selectProductSort'+id);
|
||||
id++;
|
||||
}
|
||||
|
||||
// Since 1.5, event is add to .selectProductSort and not to #selectPrductSort
|
||||
// Since 1.5, event is add to .selectProductSort and not to #selectProductSort
|
||||
setTimeout(function() {
|
||||
$('.selectProductSort').unbind('change');
|
||||
}, 100);
|
||||
|
||||
@@ -1347,7 +1347,9 @@ class BlockLayered extends Module
|
||||
|
||||
|
||||
$this->context->controller->addJS(($this->_path).'blocklayered.js');
|
||||
$this->context->controller->addJQueryUI('ui.slider');
|
||||
$this->context->controller->addJS(_PS_JS_DIR_.'jquery/jquery-ui-1.8.10.custom.min.js');
|
||||
$this->context->controller->addJQueryUI('ui.slider');
|
||||
$this->context->controller->addCSS(_PS_CSS_DIR_.'jquery-ui-1.8.10.custom.css"');
|
||||
$this->context->controller->addCSS(($this->_path).'blocklayered-15.css', 'all');
|
||||
$this->context->controller->addJQueryPlugin('scrollTo');
|
||||
|
||||
@@ -1435,7 +1437,7 @@ class BlockLayered extends Module
|
||||
//<![CDATA[
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(\'#selectPrductSort\').unbind(\'change\').bind(\'change\', function()
|
||||
$(\'#selectProductSort\').unbind(\'change\').bind(\'change\', function()
|
||||
{
|
||||
reloadContent();
|
||||
})
|
||||
@@ -2863,7 +2865,7 @@ class BlockLayered extends Module
|
||||
AND '.$alias.'.active = 1 AND '.$alias.'.`visibility` IN ("both", "catalog")';
|
||||
$sql_query['group'] = ') count_products
|
||||
FROM '._DB_PREFIX_.'category c
|
||||
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category AND cl.id_lang = '.$id_lang.')
|
||||
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category AND cl.`id_shop` = '.(int)Context::getContext()->shop->id.' and cl.id_lang = '.$id_lang.')
|
||||
WHERE c.nleft > '.(int)$parent->nleft.'
|
||||
AND c.nright < '.(int)$parent->nright.'
|
||||
'.($depth ? 'AND c.level_depth <= '.($parent->level_depth+(int)$depth) : '').'
|
||||
@@ -3166,6 +3168,23 @@ class BlockLayered extends Module
|
||||
if (isset($selected_filters['id_feature'][$feature['id_feature_value']]))
|
||||
$feature_array[$feature['id_feature']]['values'][$feature['id_feature_value']]['checked'] = true;
|
||||
}
|
||||
|
||||
//Natural sort
|
||||
foreach ($feature_array as $key => $value)
|
||||
{
|
||||
$temp = array();
|
||||
foreach ($feature_array[$key]['values'] as $keyint => $valueint)
|
||||
$temp[$keyint] = $valueint['name'];
|
||||
|
||||
natcasesort($temp);
|
||||
$temp2 = array();
|
||||
|
||||
foreach ($temp as $keytemp => $valuetemp)
|
||||
$temp2[$keytemp] = $feature_array[$key]['values'][$keytemp];
|
||||
|
||||
$feature_array[$key]['values'] = $temp2;
|
||||
}
|
||||
|
||||
$filter_blocks = array_merge($filter_blocks, $feature_array);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -94,7 +94,7 @@ param_product_url = '';
|
||||
{if $value.nbr || !$hide_0_values}
|
||||
<li class="nomargin {if $smarty.foreach.fe.index >= $filter.filter_show_limit}hiddable{/if}">
|
||||
{if isset($filter.is_color_group) && $filter.is_color_group}
|
||||
<input class="color-option {if isset($value.checked) && $value.checked}on{/if} {if !$value.nbr}disable{/if}" type="button" name="layered_{$filter.type_lite}_{$id_value}" rel="{$id_value}_{$filter.id_key}" id="layered_id_attribute_group_{$id_value}" {if !$value.nbr}disabled="disabled"{/if} style="background: {if isset($value.color)}{if file_exists($col_img_dir|cat:$id_value|cat:'.jpg')}url({$img_col_dir}{$id_value}.jpg){else}{$value.color}{/if}{else}#CCC{/if};" />
|
||||
<input class="color-option {if isset($value.checked) && $value.checked}on{/if} {if !$value.nbr}disable{/if}" type="button" name="layered_{$filter.type_lite}_{$id_value}" rel="{$id_value}_{$filter.id_key}" id="layered_id_attribute_group_{$id_value}" {if !$value.nbr}disabled="disabled"{/if} style="background: {if isset($value.color)}{if file_exists($col_img_dir|cat:$id_value|cat:'.jpg')}url({$img_col_dir}{$id_value}.jpg){else}{$value.color}{/if}{else}#CCC{/if};" title="{$value.name|escape:html:'UTF-8'}" />
|
||||
{if isset($value.checked) && $value.checked}<input type="hidden" name="layered_{$filter.type_lite}_{$id_value}" value="{$id_value}" />{/if}
|
||||
{else}
|
||||
<input type="checkbox" class="checkbox" name="layered_{$filter.type_lite}_{$id_value}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{/if}" value="{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}"{if isset($value.checked)} checked="checked"{/if}{if !$value.nbr} disabled="disabled"{/if} />
|
||||
@@ -115,7 +115,7 @@ param_product_url = '';
|
||||
{if $value.nbr || !$hide_0_values}
|
||||
<li class="nomargin {if $smarty.foreach.fe.index >= $filter.filter_show_limit}hiddable{/if}">
|
||||
{if isset($filter.is_color_group) && $filter.is_color_group}
|
||||
<input class="radio color-option {if isset($value.checked) && $value.checked}on{/if} {if !$value.nbr}disable{/if}" type="button" name="layered_{$filter.type_lite}_{$id_value}" rel="{$id_value}_{$filter.id_key}" id="layered_id_attribute_group_{$id_value}" {if !$value.nbr}disabled="disabled"{/if} style="background: {if isset($value.color)}{if file_exists($col_img_dir|cat:$id_value|cat:'.jpg')}url({$img_col_dir}{$id_value}.jpg){else}{$value.color}{/if}{else}#CCC{/if};"/>
|
||||
<input class="radio color-option {if isset($value.checked) && $value.checked}on{/if} {if !$value.nbr}disable{/if}" type="button" name="layered_{$filter.type_lite}_{$id_value}" rel="{$id_value}_{$filter.id_key}" id="layered_id_attribute_group_{$id_value}" {if !$value.nbr}disabled="disabled"{/if} style="background: {if isset($value.color)}{if file_exists($col_img_dir|cat:$id_value|cat:'.jpg')}url({$img_col_dir}{$id_value}.jpg){else}{$value.color}{/if}{else}#CCC{/if};" title="{$value.name|escape:html:'UTF-8'}"/>
|
||||
{if isset($value.checked) && $value.checked}<input type="hidden" name="layered_{$filter.type_lite}_{$id_value}" value="{$id_value}" />{/if}
|
||||
{else}
|
||||
<input type="radio" class="radio layered_{$filter.type_lite}_{$id_value}" name="layered_{$filter.type_lite}{if $filter.id_key}_{$filter.id_key}{else}_1{/if}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}{/if}" value="{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}"{if isset($value.checked)} checked="checked"{/if}{if !$value.nbr} disabled="disabled"{/if} />
|
||||
|
||||
@@ -38,7 +38,7 @@ class BlockWishList extends Module
|
||||
{
|
||||
$this->name = 'blockwishlist';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = 0.3;
|
||||
$this->version = 0.4;
|
||||
$this->author = 'PrestaShop';
|
||||
$this->need_instance = 0;
|
||||
|
||||
@@ -258,7 +258,7 @@ class BlockWishList extends Module
|
||||
$this->_html .= '
|
||||
<tr>
|
||||
<td class="first_item">
|
||||
<img src="'.$this->context->link->getImageLink($product['link_rewrite'], $product['cover'], 'small').'" alt="'.htmlentities($product['name'], ENT_COMPAT, 'UTF-8').'" style="float:left;" />
|
||||
<img src="'.$this->context->link->getImageLink($product['link_rewrite'], $product['cover'], ImageType::getFormatedName('small')).'" alt="'.htmlentities($product['name'], ENT_COMPAT, 'UTF-8').'" style="float:left;" />
|
||||
'.$product['name'];
|
||||
if (isset($product['attributes_small']))
|
||||
$this->_html .= '<br /><i>'.htmlentities($product['attributes_small'], ENT_COMPAT, 'UTF-8').'</i>';
|
||||
@@ -409,7 +409,7 @@ class BlockWishList extends Module
|
||||
foreach ($products as $key => $val)
|
||||
{
|
||||
$image = Image::getCover($val['id_product']);
|
||||
$products[$key]['image'] = $this->context->link->getImageLink($val['link_rewrite'], $image['id_image'], 'small');
|
||||
$products[$key]['image'] = $this->context->link->getImageLink($val['link_rewrite'], $image['id_image'], ImageType::getFormatedName('small'));
|
||||
}
|
||||
|
||||
$fields_list = array(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<module>
|
||||
<name>blockwishlist</name>
|
||||
<displayName><![CDATA[Wishlist block]]></displayName>
|
||||
<version><![CDATA[0.3]]></version>
|
||||
<version><![CDATA[0.4]]></version>
|
||||
<description><![CDATA[Adds a block containing the customer's wishlists.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<div class="clearfix">
|
||||
<div class="product_image">
|
||||
<a href="{$link->getProductlink($product.id_product, $product.link_rewrite, $product.category_rewrite)|escape:'html'}" title="{l s='Product detail' mod='blockwishlist'}">
|
||||
<img src="{$link->getImageLink($product.link_rewrite, $product.cover, 'medium_default')|escape:'html'}" alt="{$product.name|escape:'html':'UTF-8'}" />
|
||||
<img src="{$link->getImageLink($product.link_rewrite, $product.cover, ImageType::getFormatedName('medium'))|escape:'html'}" alt="{$product.name|escape:'html':'UTF-8'}" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="product_infos">
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<div class="clearfix">
|
||||
<div class="product_image">
|
||||
<a href="{$link->getProductlink($product.id_product, $product.link_rewrite, $product.category_rewrite)|escape:'html'}" title="{l s='Product detail' mod='blockwishlist'}">
|
||||
<img src="{$link->getImageLink($product.link_rewrite, $product.cover, 'medium_default')|escape:'html'}" alt="{$product.name|escape:'html':'UTF-8'}" />
|
||||
<img src="{$link->getImageLink($product.link_rewrite, $product.cover, ImageType::getFormatedName('medium'))|escape:'html'}" alt="{$product.name|escape:'html':'UTF-8'}" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="product_infos">
|
||||
|
||||
Reference in New Issue
Block a user