Jump to content
  • 0

Zmiana zawartości listy produktów po kliknięciu w kategorię


And63

Question

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

3 answers to this question

Recommended Posts

  • 0
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 by And63 (see edit history)
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...