Jump to content
  • 0

modul homefeatured presta 1.6.0.11


malin_pl

Question

2 answers to this question

Recommended Posts

  • 0

Hej,

 

Dzięki pomocy kolegi: deejay3

 

udało się zrobić liste na pierwszej stronie, korzytsałem z tutoriala Vekia : https://www.prestashop.com/forums/topic/323464-tutorial-change-default-grid-products-display-method-to-list/

 

dalej, należy w pliku global.js linię:

 

	if (typeof page_name != 'undefined' && !in_array(page_name, ['index', 'product']))
zaminieć na linię:

 

if (typeof page_name != 'undefined' && !in_array(page_name, ['product']))
 

 

następnie w pliku product-list.tpl linię:

 

<li class="ajax_block_product{if $page_name == 'index' || $page_name == 'product'} col-xs-12 col-sm-4 col-md-3{else} col-xs-12 col-sm-6 col-md-4{/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}">
zamienić na linię:

	<li class="ajax_block_product{if $page_name == 'product'} col-xs-12 col-sm-4 col-md-3{else} col-xs-12 col-sm-6 col-md-4{/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}">

 

i powinno działać, przynajmniej u mnie działa :).

 

pozdrawiam

Link to comment
Share on other sites

  • 0

jeszcze dodam od siebie. jako, ze w z powyzszego na stronie home brakuje paru zmiennych w formacie 'list' m.in dla bloku .functional-buttons (porownanie, do listy zyczen....) nalezy go wylaczyc. 

 

plik global.js
linia ~256

html += '<div class="functional-buttons clearfix col-sm-12">' + $(element).find('.functional-buttons').html() + '</div>';

przed nia dodac

if (typeof page_name != 'undefined' && !in_array(page_name, ['index', 'product']))

czyli ma to wygladac tak:

html += '<div class="button-container col-xs-7 col-md-12">'+ $(element).find('.button-container').html() +'</div>';

if (typeof page_name != 'undefined' && !in_array(page_name, ['index', 'product']))
html += '<div class="functional-buttons clearfix col-sm-12">' + $(element).find('.functional-buttons').html() + '</div>';

html += '</div>';
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...