inte page category
This commit is contained in:
parent
c97d4d9f7c
commit
5ad1aa6df0
13
override/controllers/front/CategoryController.php
Normal file
13
override/controllers/front/CategoryController.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
class CategoryController extends CategoryControllerCore
|
||||
{
|
||||
public function initContent()
|
||||
{
|
||||
parent::initContent();
|
||||
$subcategories = Category::getChildren($this->category->id, Context::getContext()->language->id, true);
|
||||
$this->context->smarty->assign(array(
|
||||
'subcategories' => $subcategories,
|
||||
));
|
||||
}
|
||||
}
|
@ -2,16 +2,21 @@
|
||||
<section>
|
||||
{if isset($category)}
|
||||
{if $category->id AND $category->active}
|
||||
{if $category->description || $category->id_image}
|
||||
<header class="page-heading">
|
||||
<div id="breadcrumbs">
|
||||
<div class="container">
|
||||
{include file="$tpl_dir./breadcrumb.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
<header class="page-heading">
|
||||
<div id="breadcrumbs">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-{if $category->id_image}6{else}12{/if}">
|
||||
{include file="$tpl_dir./breadcrumb.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
{if $category->id_image}
|
||||
<div class="col-sm-12 category-img">
|
||||
<img class="img-responsive" src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}" alt="" />
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-sm-12">
|
||||
<div class="content">
|
||||
<h1>
|
||||
{$category->name|escape:'html':'UTF-8'}
|
||||
</h1>
|
||||
@ -19,64 +24,43 @@
|
||||
{$category->description}
|
||||
</div>
|
||||
</div>
|
||||
{if $category->id_image}
|
||||
<div class="col-sm-6 category-img">
|
||||
<img class="img-responsive" src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}" alt="" />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{/if}
|
||||
|
||||
{include file="$tpl_dir./errors.tpl"}
|
||||
|
||||
<!-- Sous-categorie -->
|
||||
{if isset($relatedCategories)}
|
||||
{if (isset($display_subcategories) && $display_subcategories eq 1) || !isset($display_subcategories) }
|
||||
<nav id="subcategories">
|
||||
<ul class="container">
|
||||
{foreach from=$relatedCategories item=subcategory}
|
||||
<li {if $subcategory.current}class="active"{/if}>
|
||||
<h2>
|
||||
<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img">
|
||||
{if $subcategory.id_image}
|
||||
<img class="replace-2x" src="{$img_cat_dir}{$subcategory.icon}" alt="" />
|
||||
{else}
|
||||
<img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-medium_default.jpg" alt="" />
|
||||
{/if}
|
||||
<span>{$subcategory.name|escape:'html':'UTF-8'}</span>
|
||||
</a>
|
||||
</h2>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</nav>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if $products}
|
||||
<div class="products container">
|
||||
<div class="row">
|
||||
{hook h='displayFilters'}
|
||||
<div class="products-list">
|
||||
{include file="./product-list.tpl" products=$products}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="./pagination.tpl" paginationId='bottom'}
|
||||
{/if}
|
||||
</header>
|
||||
|
||||
{include file="$tpl_dir./errors.tpl"}
|
||||
|
||||
<div class="container category_content">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 subcategories">
|
||||
<p class="title title_{$category->id}"><i class="awesome"></i> {$category->name}</p>
|
||||
{if isset($subcategories)}
|
||||
<ul>
|
||||
{foreach from=$subcategories item=subcategory}
|
||||
<li><a href="{$link->getCategoryLink({$subcategory.id_category})}">{$subcategory.name} <span>></span></a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
{if $products}
|
||||
<div class="products">
|
||||
<div class="row">
|
||||
<div class="products-list">
|
||||
{include file="./product-list.tpl" products=$products}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="./pagination.tpl" paginationId='bottom'}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{elseif $category->id}
|
||||
<p class="alert alert-warning container">{l s='This category is currently unavailable.'}</p>
|
||||
{/if}
|
||||
|
||||
{if $category->id}
|
||||
<div class="banner" style="background: url('{$base_dir}{$banner_img}') no-repeat 50% 50%; background-size: 100%">
|
||||
<img class="logo" src="{$img_dir}logo-banner.png" alt="" />
|
||||
<h4>{l s='Best ally to your numeric entertainement'}</h4>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</section>
|
||||
</main>
|
@ -1116,15 +1116,6 @@ body .ac_results {
|
||||
/*************************************************************************************************************
|
||||
*************************************** HOME BOUTIQUE ****************************************
|
||||
**************************************************************************************************************/
|
||||
.separator {
|
||||
border-bottom: 3px solid #333333;
|
||||
height: 3px;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
padding: 15px 0;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
#slider {
|
||||
border:12px solid #fa5793;
|
||||
position: relative;
|
||||
@ -1256,15 +1247,49 @@ body .ac_results {
|
||||
/*************************************************************************************************************
|
||||
*************************************** CATEGORY ****************************************
|
||||
**************************************************************************************************************/
|
||||
#category {
|
||||
|
||||
#category {}
|
||||
#category .category_content {
|
||||
padding-top: 30px;
|
||||
}
|
||||
#category .subcategories {}
|
||||
#category .subcategories .title i { margin-right: 10px; }
|
||||
#category .subcategories .title {
|
||||
background: #6ac5bb;
|
||||
color: #fff;
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
font-family: 'pt_sansbold';
|
||||
font-weight: normal;
|
||||
margin-bottom: 0;
|
||||
padding: 10px;
|
||||
padding-left: 15px;
|
||||
-webkit-border-radius: 0 0 5px 5px;
|
||||
border-radius: 0 0 5px 5px;
|
||||
}
|
||||
#category .subcategories ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
#category .subcategories ul li {
|
||||
list-style: none;
|
||||
}
|
||||
#category .subcategories ul li a {
|
||||
color: #333333;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
#category .subcategories ul li:nth-child(even) a {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
#category .subcategories ul li a span {
|
||||
float: right;
|
||||
font-size: 16px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
header.page-heading h1 { font-size: 36px; margin: 20px 0 }
|
||||
header.page-heading .sub-heading { margin: -10px 0 0 }
|
||||
#category header.page-heading .category-img img { float: none; margin: 0 auto }
|
||||
.products #filters .layered_filter { margin-top: 15px }
|
||||
header.page-heading .description { font-size: 14px; }
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
header.page-heading h1 { font-size: 28px }
|
||||
|
@ -82,6 +82,14 @@ a:focus { outline: none; text-decoration: none; }
|
||||
.valign-middle { font-size: 0 }
|
||||
.valign-middle > div { display: inline-block; float: none; font-size: 16px; vertical-align: middle }
|
||||
|
||||
.separator {
|
||||
border-bottom: 3px solid #333333;
|
||||
height: 3px;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
padding: 15px 0;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
|
||||
.pagination > .active > a, .pagination > .active > a:focus, .pagination > .active > a:hover, .pagination > .active > span, .pagination > .active > span:focus, .pagination > .active > span:hover {
|
||||
@ -319,38 +327,21 @@ span.title {
|
||||
|
||||
|
||||
/* PAGE HEADER */
|
||||
header.page-heading {
|
||||
padding: 25px 0;
|
||||
header.page-heading {}
|
||||
header.page-heading .content {
|
||||
border-bottom: 3px solid #333333;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
header.page-heading.order-process { padding: 25px 0 0 0 }
|
||||
header.page-heading h1 {
|
||||
color: #fff;
|
||||
color: #333333;
|
||||
font-size: 48px;
|
||||
margin: 25px 0 40px;
|
||||
font-family: 'vidaloka';
|
||||
margin: 25px 0 25px;
|
||||
}
|
||||
header.page-heading .sub-heading {
|
||||
color: #fff;
|
||||
margin: -30px 0 0 0;
|
||||
header.page-heading .description {
|
||||
color: #666;
|
||||
}
|
||||
header.page-heading .sub-heading strong {
|
||||
display: block;
|
||||
}
|
||||
header.page-heading .tab-register {
|
||||
font-family: 'pt_sans';
|
||||
font-size: 18px;
|
||||
margin: 10px auto -25px auto;
|
||||
}
|
||||
header.page-heading .tab-register li {
|
||||
background: #000;
|
||||
}
|
||||
header.page-heading .tab-register li > * {
|
||||
display: block;
|
||||
padding: 15px 20px;
|
||||
text-align: center;
|
||||
}
|
||||
header.page-heading .tab-register li a { color: #fff }
|
||||
header.page-heading .tab-register li.active { background: #fff; color: #000 }
|
||||
|
||||
|
||||
/* BLOCK BREADCRUMBS */
|
||||
#breadcrumbs {
|
||||
@ -395,6 +386,17 @@ header.page-heading.order-process { padding: 25px 0 0 0 }
|
||||
overflow: hidden;
|
||||
padding: 0 5px;
|
||||
position: relative;
|
||||
}
|
||||
.product-container .border .price-percent-reduction {
|
||||
position: absolute;
|
||||
background: url('../img/reduction.png') no-repeat top center;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
height: 70px;
|
||||
line-height: 70px;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
width: 70px;
|
||||
}
|
||||
.product-container .product-img img {
|
||||
border: 1px solid #d6d6d6;
|
||||
|
BIN
themes/toutpratique/img/reduction.png
Normal file
BIN
themes/toutpratique/img/reduction.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
@ -25,7 +25,7 @@
|
||||
*}
|
||||
<h2>{l s='Produits les plus populaires' mod='blockbestsellers'}</h2>
|
||||
{if isset($best_sellers) && $best_sellers}
|
||||
{include file="$tpl_dir./product-list.tpl" products=$best_sellers class='blockbestsellers tab-pane' id='blockbestsellers'}
|
||||
{include file="$tpl_dir./product-list.tpl" products=$best_sellers class='blockbestsellers tab-pane' id='blockbestsellers' position='homestore'}
|
||||
{else}
|
||||
<ul id="blockbestsellers" class="blockbestsellers tab-pane">
|
||||
<li class="alert alert-info">{l s='No best sellers at this time.' mod='blockbestsellers'}</li>
|
||||
|
@ -27,7 +27,7 @@
|
||||
{assign var='requestNb' value=$link->getPaginationLink(false, false, true, false, false, true)}
|
||||
{/if}
|
||||
<!-- Pagination -->
|
||||
<div id="pagination{if isset($paginationId)}_{$paginationId}{/if}" class="container clearfix">
|
||||
<div id="pagination{if isset($paginationId)}_{$paginationId}{/if}" class="clearfix">
|
||||
<div class="col-md-12">
|
||||
{if $nb_products > $products_per_page && $start!=$stop}
|
||||
<form class="showall" action="{if !is_array($requestNb)}{$requestNb}{else}{$requestNb.requestUrl}{/if}" method="get">
|
||||
|
@ -4,15 +4,11 @@
|
||||
{foreach from=$products item=product name=products key=key}
|
||||
{if (isset($nbProduct) && $key < $nbProduct) || !isset($nbProduct)}
|
||||
|
||||
<!-- Calcul de la réduction -->
|
||||
{assign var=percentReduction value=0}
|
||||
|
||||
{if isset($nbProduct) && $nbProduct < 2}
|
||||
<div class="product-container col-xs-12" itemscope itemtype="http://schema.org/Product">
|
||||
{else}
|
||||
<div class="product-container col-md-{if isset($nbProduct)}{12/$nbProduct}{else}2{/if} col-sm-4 col-xs-6 col-xxs-12" itemscope itemtype="http://schema.org/Product">
|
||||
{/if}
|
||||
<div class="product-container col-md-{if isset($position)}2{else}3{/if} col-sm-4 col-xs-6 col-xxs-12" itemscope itemtype="http://schema.org/Product">
|
||||
<div class="border {if isset($percentReduction) && $percentReduction > 0} discount{/if}">
|
||||
{if $product.specific_prices.reduction_type == 'percentage'}
|
||||
<span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span>
|
||||
{/if}
|
||||
<!-- Image -->
|
||||
<a class="product-img" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url">
|
||||
<img class="img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{$product.name|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="image" />
|
||||
|
Loading…
Reference in New Issue
Block a user