This commit is contained in:
sThiebaut
2011-12-08 17:07:55 +00:00
parent 79dba6a64d
commit e49b875a1a
10 changed files with 36 additions and 17 deletions
@@ -31,6 +31,7 @@
#best-sellers_block_right li p { #best-sellers_block_right li p {
float:left; float:left;
margin-left:7px; margin-left:7px;
padding:0;
width:125px; width:125px;
font-weight:bold; font-weight:bold;
font-size:12px font-size:12px
+15 -5
View File
@@ -167,10 +167,20 @@ class BlockCategories extends Module
$id_lang = (int)($params['cookie']->id_lang); $id_lang = (int)($params['cookie']->id_lang);
$smartyCacheId = 'blockcategories|'.$id_current_shop.'_'.$groups.'_'.$id_lang.'_'.$id_product.'_'.$id_category; $smartyCacheId = 'blockcategories|'.$id_current_shop.'_'.$groups.'_'.$id_lang.'_'.$id_product.'_'.$id_category;
Tools::enableCache(); /*Tools::enableCache();
if (!$this->isCached('blockcategories.tpl', $smartyCacheId)) if (!$this->isCached('blockcategories.tpl', $smartyCacheId))
{ {*/
$maxdepth = Configuration::get('BLOCK_CATEG_MAX_DEPTH'); $maxdepth = Configuration::get('BLOCK_CATEG_MAX_DEPTH');
/*p('
SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite
FROM `'._DB_PREFIX_.'category` c
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.$id_lang.$this->context->shop->addSqlRestrictionOnLang('cl').')
LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`)
WHERE (c.`active` = 1 OR c.`id_category` = 1)
'.((int)($maxdepth) != 0 ? ' AND `level_depth` <= '.(int)($maxdepth) : '').'
AND cg.`id_group` IN ('.pSQL($groups).')
GROUP BY id_category
ORDER BY `level_depth` ASC, '.(Configuration::get('BLOCK_CATEG_SORT') ? 'cl.`name`' : 'c.`position`').' '.(Configuration::get('BLOCK_CATEG_SORT_WAY') ? 'DESC' : 'ASC'));*/
if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite
FROM `'._DB_PREFIX_.'category` c FROM `'._DB_PREFIX_.'category` c
@@ -193,10 +203,10 @@ class BlockCategories extends Module
$resultParents[$row['id_parent']][] = &$row; $resultParents[$row['id_parent']][] = &$row;
$resultIds[$row['id_category']] = &$row; $resultIds[$row['id_category']] = &$row;
} }
//p($resultParents);
$blockCategTree = $this->getTree($resultParents, $resultIds, Configuration::get('BLOCK_CATEG_MAX_DEPTH')); $blockCategTree = $this->getTree($resultParents, $resultIds, Configuration::get('BLOCK_CATEG_MAX_DEPTH'));
unset($resultParents, $resultIds); unset($resultParents, $resultIds);
//d($blockCategTree);
$isDhtml = (Configuration::get('BLOCK_CATEG_DHTML') == 1 ? true : false); $isDhtml = (Configuration::get('BLOCK_CATEG_DHTML') == 1 ? true : false);
if (Tools::isSubmit('id_category')) if (Tools::isSubmit('id_category'))
{ {
@@ -220,7 +230,7 @@ class BlockCategories extends Module
else else
$this->context->smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'blockcategories/category-tree-branch.tpl'); $this->context->smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'blockcategories/category-tree-branch.tpl');
$this->context->smarty->assign('isDhtml', $isDhtml); $this->context->smarty->assign('isDhtml', $isDhtml);
} //}
$this->context->smarty->cache_lifetime = 31536000; // 1 Year $this->context->smarty->cache_lifetime = 31536000; // 1 Year
$display = $this->display(__FILE__, 'blockcategories.tpl', $smartyCacheId); $display = $this->display(__FILE__, 'blockcategories.tpl', $smartyCacheId);
Tools::restoreCacheSettings(); Tools::restoreCacheSettings();
@@ -25,11 +25,11 @@
*} *}
<li {if isset($last) && $last == 'true'}class="last"{/if}> <li {if isset($last) && $last == 'true'}class="last"{/if}>
<a href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a> <a href="{$node.link|escape:'htmlall':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'htmlall':'UTF-8'}">{$node.name|escape:'htmlall':'UTF-8'}</a>
{if $node.children|@count > 0} {if $node.children|@count > 0}
<ul> <ul>
{foreach from=$node.children item=child name=categoryTreeBranch} {foreach from=$node.children item=child name=categoryTreeBranch}
{if isset($smarty.foreach.categoryTreeBranch) && $smarty.foreach.categoryTreeBranch.last} {if $smarty.foreach.categoryTreeBranch.last}
{include file="$branche_tpl_path" node=$child last='true'} {include file="$branche_tpl_path" node=$child last='true'}
{else} {else}
{include file="$branche_tpl_path" node=$child last='false'} {include file="$branche_tpl_path" node=$child last='false'}
Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

+3
View File
@@ -31,6 +31,9 @@
text-indent:-5000px; text-indent:-5000px;
background:url(img/icon/less.gif) no-repeat 2px 2px; background:url(img/icon/less.gif) no-repeat 2px 2px;
} }
#layered_block_left span.closed a {
background:url(img/icon/more.gif) no-repeat 2px 2px;
}
#layered_block_left .layered_subtitle { #layered_block_left .layered_subtitle {
display: inline-block; display: inline-block;
+2
View File
@@ -240,11 +240,13 @@ function openCloseFilter()
{ {
$('#'+$(this).attr('rel')).show(); $('#'+$(this).attr('rel')).show();
$(this).html('v'); $(this).html('v');
$(this).parent().removeClass('closed');
} }
else else
{ {
$('#'+$(this).attr('rel')).hide(); $('#'+$(this).attr('rel')).hide();
$(this).html('&lt;'); $(this).html('&lt;');
$(this).parent().addClass('closed');
} }
e.preventDefault(); e.preventDefault();
@@ -60,7 +60,7 @@ ul.sf-menu li.sfHover li ul {
} }
ul.sf-menu li li:hover ul, ul.sf-menu li li:hover ul,
ul.sf-menu li li.sfHover ul { ul.sf-menu li li.sfHover ul {
left: 10em; /* match ul width */ left: 9.7em; /* match ul width */
top: 0; top: 0;
} }
ul.sf-menu li li:hover li ul, ul.sf-menu li li:hover li ul,
@@ -94,7 +94,7 @@ ul.sf-menu li li li.sfHover ul {
background: rgba(113, 113, 113, 0.9); background: rgba(113, 113, 113, 0.9);
} }
.sf-menu li li li { .sf-menu li li li {
background: #ebebed; background: rgba(113, 113, 113, 0.9);
} }
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
background: transparent url(../img/bg_blocktopmenu_li_hover.png) repeat-x 0 0; background: transparent url(../img/bg_blocktopmenu_li_hover.png) repeat-x 0 0;
+11 -8
View File
@@ -97,17 +97,20 @@
text-align:right text-align:right
} }
#mywishlist td.wishlist_delete {text-align:center} #mywishlist td.wishlist_delete {
text-align:center;
border-right: 1px solid #999
}
#mywishlist td.wishlist_delete a { #mywishlist td.wishlist_delete a {
display:inline-block; display:inline-block;
font-size:8px; font-size:8px;
padding:1px 2px; padding:1px 2px;
-moz-border-radius:3px; -moz-border-radius:3px;
-webkit-border-radius:3px; -webkit-border-radius:3px;
border-radius:3px; border-radius:3px;
color:#666; color:#666;
text-shadow:0 1px 0 #fff; text-shadow:0 1px 0 #fff;
text-transform:uppercase; text-transform:uppercase;
background: none repeat scroll 0 0 #ccc; background: none repeat scroll 0 0 #ccc;
} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B