Prestaraf Posted March 1, 2018 Share Posted March 1, 2018 Jak sprawdzić czy dany produkt jest w "najczęściej kupowanych" (blockbestsellers). Generalnie chciałem dodać napis "Bestseller" przy produktach. Pomysł: najpierw sprawdzić czy produkt należy do bestsellea, jeśli tak to nawet js dodać to info. Link to comment Share on other sites More sharing options...
atomek Posted March 1, 2018 Share Posted March 1, 2018 np. tak: dla listy produktów (1.6) {assign var="bestseller" value=ProductSale::getNbrSales($product.id_product)} {if $bestseller >= 1} <span class="bestseller-label">{l s='Bestseller'}</span> {/if} 1 Link to comment Share on other sites More sharing options...
Prestaraf Posted March 1, 2018 Author Share Posted March 1, 2018 Działa, dzięki Link to comment Share on other sites More sharing options...
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