malin_pl Posted February 4, 2015 Share Posted February 4, 2015 (edited) Witam, Mam taką prośbe o pomoc. Jak wymusić w tym module aby wyświetlał na głównej stronie listę produktów a nie grid'a ? wersja modulu 1.6.2 z gory dzieki pozdrawiam Edited February 4, 2015 by malin_pl (see edit history) Link to comment Share on other sites More sharing options...
0 malin_pl Posted February 5, 2015 Author Share Posted February 5, 2015 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 More sharing options...
0 design4VIP Posted February 5, 2015 Share Posted February 5, 2015 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 More sharing options...
Question
malin_pl
Witam,
Mam taką prośbe o pomoc. Jak wymusić w tym module aby wyświetlał na głównej stronie listę produktów a nie grid'a ?
wersja modulu 1.6.2
z gory dzieki
pozdrawiam
Edited by malin_pl (see edit history)Link to comment
Share on other sites
2 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now