update 05.11.13
This commit is contained in:
1 parent
de8bd97831
commit
55cd7c4c34
70 files changed
+3931
-563
No files matched your search
@@ -31,11 +31,14 @@
|
||||
|
||||
{if $page_name !='index' && $page_name !='product'}
|
||||
{assign var='nbItemsPerLine' value=3}
|
||||
{assign var='nbItemsPerLineTablet' value=2}
|
||||
{assign var='nbItemsPerLineMobile' value=3}
|
||||
{else}
|
||||
{assign var='nbItemsPerLine' value=4}
|
||||
{assign var='nbItemsPerLineTablet' value=3}
|
||||
{assign var='nbItemsPerLineMobile' value=2}
|
||||
{/if}
|
||||
{*define numbers of product per line in other page for tablet*}
|
||||
{assign var='nbItemsPerLineTablet' value=2}
|
||||
{assign var='nbLi' value=$products|@count}
|
||||
{math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines}
|
||||
{math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet}
|
||||
@@ -44,9 +47,11 @@
|
||||
{foreach from=$products item=product name=products}
|
||||
{math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo}
|
||||
{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet}
|
||||
{math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineMobile assign=totModuloMobile}
|
||||
{if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if}
|
||||
{if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if}
|
||||
<li class="ajax_block_product col-xs-3 {if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if} {if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)}last-line{/if} {if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0}last-item-of-tablet-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1}first-item-of-tablet-line{/if} {if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloTablet)}last-tablet-line{/if}">
|
||||
{if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if}
|
||||
<li class="ajax_block_product {if $page_name == 'index' || $page_name == 'product'}col-xs-12 col-sm-4 col-md-3{/if} {if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if} {if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)}last-line{/if} {if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0}last-item-of-tablet-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1}first-item-of-tablet-line{/if} {if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0}last-item-of-mobile-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1}first-item-of-mobile-line{/if} {if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)}last-mobile-line{/if}">
|
||||
<div class="product-container">
|
||||
<div class="left-block">
|
||||
<div class="product-image-container">
|
||||
@@ -133,8 +138,8 @@
|
||||
<script type="text/javascript"><!--
|
||||
function display(view) {
|
||||
if (view == 'list') {
|
||||
$('ul.product_list').removeClass('grid row').addClass('list row');
|
||||
$('.product_list > li').removeClass('col-xs-12 col-xs-4 col-sm-6 col-md-4').addClass('col-xs-12');
|
||||
$('ul.product_list').removeClass('grid').addClass('list row');
|
||||
$('.product_list > li').removeClass('col-xs-12 col-sm-6 col-md-4').addClass('col-xs-12');
|
||||
$('.product_list > li').each(function(index, element) {
|
||||
html = '';
|
||||
html = '<div class="product-container"><div class="row">';
|
||||
@@ -170,8 +175,8 @@
|
||||
if (typeof quick_view != 'undefined') // qick view button reload
|
||||
quick_view();
|
||||
} else {
|
||||
$('ul.product_list').removeClass('list row').addClass('grid row');
|
||||
$('.product_list > li').removeClass('col-xs-12 col-xs-4').addClass('col-xs-12 col-sm-6 col-md-4');
|
||||
$('ul.product_list').removeClass('list').addClass('grid row');
|
||||
$('.product_list > li').removeClass('col-xs-12').addClass('col-xs-12 col-sm-6 col-md-4');
|
||||
$('.product_list > li').each(function(index, element) {
|
||||
html = '';
|
||||
html += '<div class="product-container">';
|
||||
|
||||
Reference in new issue
Block a user