And63 Posted May 17, 2016 Share Posted May 17, 2016 Jak zrobić aby na liście produktów po kliknięciu w kategorię wyświetlały się tylko te produkty dla których kliknięta kategoria jest kategorią domyślną - obecnie wyświetlają się wszystkie produkty, które są w tej kategorii. Prestashop 1.6.1.5 Link to comment Share on other sites More sharing options...
0 endriu107 Posted May 18, 2016 Share Posted May 18, 2016 Nie sprawdzałem ale w category.php powinna być funkcja getProducts() która pobiera produkty i wydaje mi sie że w niej należy przerobić zapytanie do bazy. Link to comment Share on other sites More sharing options...
0 And63 Posted May 31, 2016 Author Share Posted May 31, 2016 (edited) Zrobiłem tę modyfikację, co prawda nie w ten sposób jak chciałem, ale efekt końcowy jest taki jak w założeniu. W plku /themes/używany szablon/category.tpl dodałem warunek sprawdzający czy subkategoria jest taka sama jak kategoria defaultowa produktu. przed tym kodem: {if $products} <div class="content_sortPagiBar"> <div class="sortPagiBar clearfix"> {include file="./product-sort.tpl"} {include file="./nbr-product-page.tpl"} </div> coś tam dalej... dodałem warunek: {if $product.category_default == $subcategories} Finalnie to wygląda tak: {if $product.category_default == $subcategories} {if $products} <div class="content_sortPagiBar"> <div class="sortPagiBar clearfix"> {include file="./product-sort.tpl"} {include file="./nbr-product-page.tpl"} </div> coś tam dalej... Może się jeszcze komuś przyda Edited May 31, 2016 by And63 (see edit history) Link to comment Share on other sites More sharing options...
0 endriu107 Posted June 1, 2016 Share Posted June 1, 2016 Rozwiązanie z pewnością się komuś przyda jak nie dzisiaj to w przyszłości Link to comment Share on other sites More sharing options...
Question
And63
Link to comment
Share on other sites
3 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