SHOW:
|
|
- or go back to the newest paste.
1 | <div class="productEntity" | |
2 | - | <{if $product->getProductId()}> |
2 | + | <{if $attributes|@count == 1}> |
3 | - | data-item_id="<{$product->getProductId()}>" |
3 | + | <{section name="j" loop=$attributes}> |
4 | data-item_id="<{$checkoutproduct->getProductId()}>:<{$attributes[j].value_id}>" | |
5 | - | <{if $product->getName()}> |
5 | + | data-item_variant="<{$attributes[j].value}>" |
6 | - | data-item_name="<{$product->getName()|escape}>" |
6 | + | <{/section}> |
7 | <{else}> | |
8 | <{if $product->getProductId()}> | |
9 | data-item_id="<{$product->getProductId()}>" | |
10 | <{/if}> | |
11 | <{/if}> | |
12 | <{if $webshop->getName()}> | |
13 | data-affiliation="<{$webshop->getName()|escape}>" | |
14 | - | data-item_brand="<{$product->getBrandName()}>" |
14 | + | |
15 | data-currency="<{$webshop->getCurrency()}>" | |
16 | data-index="<{$smarty.section.i.index}>" | |
17 | <{if $product->getBrand()}> | |
18 | data-item_brand="<{$product->getBrandName()|escape}>" | |
19 | <{/if}> | |
20 | <{if $product->getMainCategory()}> | |
21 | <{assign var="prodmaincat" value=$product->getMainCategory()}> | |
22 | <{if $prodmaincat->getParents()}> | |
23 | <{assign var="prodmaincatparents" value=$prodmaincat->getParents()}> | |
24 | <{assign var="catlevel" value=0}> | |
25 | <{section name="parents" loop=$prodmaincatparents max=5}> | |
26 | <{math assign="catlevel" equation=x+1 x=$catlevel}> | |
27 | <{if $smarty.section.parents.first}> | |
28 | data-item_category="<{$prodmaincatparents[parents]->getName()|escape}>" | |
29 | <{else}> | |
30 | data-item_category<{$catlevel}>="<{$prodmaincatparents[parents]->getName()|escape}>" | |
31 | <{/if}> | |
32 | <{/section}> | |
33 | <{math assign="catlevel" equation=x+1 x=$catlevel}> | |
34 | data-item_category<{$catlevel}>="<{$product->getMainCategoryName()|escape}>" | |
35 | <{else}> | |
36 | data-item_category="<{$product->getMainCategoryName()|escape}>" | |
37 | <{/if}> | |
38 | <{elseif $product->getCategory()}> | |
39 | <{assign var="prodcat" value=$product->getCategory()}> | |
40 | <{if $prodcat->getParents()}> | |
41 | <{assign var="prodcatparents" value=$prodcat->getParents()}> | |
42 | <{assign var="catlevel" value=0}> | |
43 | <{section name="parents" loop=$prodcatparents max=5}> | |
44 | <{math assign="catlevel" equation=x+1 x=$catlevel}> | |
45 | <{if $smarty.section.parents.first}> | |
46 | data-item_category="<{$prodcatparents[parents]->getName()|escape}>" | |
47 | <{else}> | |
48 | data-item_category<{$catlevel}>="<{$prodcatparents[parents]->getName()|escape}>" | |
49 | <{/if}> | |
50 | <{/section}> | |
51 | <{math assign="catlevel" equation=x+1 x=$catlevel}> | |
52 | data-item_category<{$catlevel}>="<{$product->getCategoryName()|escape}>" | |
53 | - | <{if $category}> |
53 | + | |
54 | - | <{if $category->getName()}> |
54 | + | |
55 | - | data-item_list_name="<{$category->getName()|escape}>" |
55 | + | |
56 | <{/if}> | |
57 | - | <{if $category->getCategoryId()}> |
57 | + | <{if $product->hasVariant()}> |
58 | - | data-item_list_id="<{$category->getCategoryId()}>" |
58 | + | <{assign var="variant" value=$basket[i].attributes}> |
59 | data-item_variant="<{foreach from=$variant item=a}><{$a.value|escape}><{/foreach}>" | |
60 | - | <{elseif $landing_page}> |
60 | + | |
61 | - | <{if $landing_page->getName()}> |
61 | + | data-item_list_name="basket" |
62 | - | data-item_list_name="<{$landing_page->getName()|escape}>" |
62 | + | |
63 | data-price="<{$product->getRealPrice()|number_format:2:".":""}>" | |
64 | - | <{if $landing_page->getLandingPageId()}> |
64 | + | |
65 | - | data-item_list_id="<{$landing_page->getLandingPageId()}>" |
65 | + | data-quantity="<{$basket[i].amount}>" |
66 | > |