Advertisement
Shoporama

Vis mest populære produkter fra samme hovedkategori som relaterede produkter

Nov 24th, 2020 (edited)
2,220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Smarty 0.43 KB | None | 0 0
  1. <{assign var="c" value=$product->getMainCategory()}>
  2.     <{if $c}>
  3.         <{assign var="popularproducts" value=$c->getPopularProducts()}>
  4.         <{if $popularproducts}>
  5.             <{section name="i" loop=$popularproducts start=0 max=8}>
  6.                 <{if $popularproducts[i]->getIsInStock() || $popularproducts[i]->getAllowNegativeStock()}>
  7.                     <{include file="inner_product.html" product=$popularproducts[i]}>
  8.                 <{/if}>
  9.             <{/section}>
  10.         <{/if}>
  11.     <{/if}>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement