Advertisement
Shoporama

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

Nov 24th, 2020 (edited)
407
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data Copied
Advertisement