Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="productEntity"
- <{if $attributes|@count == 1}>
- <{section name="j" loop=$attributes}>
- data-item_id="<{$checkoutproduct->getProductId()}>:<{$attributes[j].value_id}>"
- data-item_variant="<{$attributes[j].value}>"
- <{/section}>
- <{else}>
- <{if $product->getProductId()}>
- data-item_id="<{$product->getProductId()}>"
- <{/if}>
- <{/if}>
- <{if $webshop->getName()}>
- data-affiliation="<{$webshop->getName()|escape}>"
- <{/if}>
- data-currency="<{$webshop->getCurrency()}>"
- data-index="<{$smarty.section.i.index}>"
- <{if $product->getBrand()}>
- data-item_brand="<{$product->getBrandName()|escape}>"
- <{/if}>
- <{if $product->getMainCategory()}>
- <{assign var="prodmaincat" value=$product->getMainCategory()}>
- <{if $prodmaincat->getParents()}>
- <{assign var="prodmaincatparents" value=$prodmaincat->getParents()}>
- <{assign var="catlevel" value=0}>
- <{section name="parents" loop=$prodmaincatparents max=5}>
- <{math assign="catlevel" equation=x+1 x=$catlevel}>
- <{if $smarty.section.parents.first}>
- data-item_category="<{$prodmaincatparents[parents]->getName()|escape}>"
- <{else}>
- data-item_category<{$catlevel}>="<{$prodmaincatparents[parents]->getName()|escape}>"
- <{/if}>
- <{/section}>
- <{math assign="catlevel" equation=x+1 x=$catlevel}>
- data-item_category<{$catlevel}>="<{$product->getMainCategoryName()|escape}>"
- <{else}>
- data-item_category="<{$product->getMainCategoryName()|escape}>"
- <{/if}>
- <{elseif $product->getCategory()}>
- <{assign var="prodcat" value=$product->getCategory()}>
- <{if $prodcat->getParents()}>
- <{assign var="prodcatparents" value=$prodcat->getParents()}>
- <{assign var="catlevel" value=0}>
- <{section name="parents" loop=$prodcatparents max=5}>
- <{math assign="catlevel" equation=x+1 x=$catlevel}>
- <{if $smarty.section.parents.first}>
- data-item_category="<{$prodcatparents[parents]->getName()|escape}>"
- <{else}>
- data-item_category<{$catlevel}>="<{$prodcatparents[parents]->getName()|escape}>"
- <{/if}>
- <{/section}>
- <{math assign="catlevel" equation=x+1 x=$catlevel}>
- data-item_category<{$catlevel}>="<{$product->getCategoryName()|escape}>"
- <{else}>
- data-item_category="<{$product->getCategoryName()|escape}>"
- <{/if}>
- <{/if}>
- <{if $product->hasVariant()}>
- <{assign var="variant" value=$basket[i].attributes}>
- data-item_variant="<{foreach from=$variant item=a}><{$a.value|escape}><{/foreach}>"
- <{/if}>
- data-item_list_name="basket"
- <{if $product->getRealPrice()}>
- data-price="<{$product->getRealPrice()|number_format:2:".":""}>"
- <{/if}>
- data-quantity="<{$basket[i].amount}>"
- >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement