[Front office] Modifying upsell products
Display off upsell products is now based on accessory loop but not promo products
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
<li class="item">
|
||||
{assign var="hasSubmit" value = false}
|
||||
{assign var="productTitle" value="{$TITLE}"}
|
||||
|
||||
{if not $product_id}
|
||||
{assign var="$product_id" value=$ID}
|
||||
{/if}
|
||||
<article itemscope itemtype="http://schema.org/Product">
|
||||
<!-- Use the meta tag to specify content that is not visible on the page in any way -->
|
||||
{loop name="brand.feature" type="feature" product=$ID title="brand"}
|
||||
{loop name="brand.value" type="feature_value" feature=$ID product=$product_id}
|
||||
{loop name="brand.feature" type="feature" product=$product_id title="brand"}
|
||||
{loop name="brand.value" type="feature_value" feature=$product_id product=$product_id}
|
||||
<meta itemprop="brand" content="{$TITLE}">
|
||||
{/loop}
|
||||
{/loop}
|
||||
{loop name="brand.feature" type="feature" product=$ID title="isbn"}
|
||||
{loop name="brand.feature" type="feature" product=$product_id title="isbn"}
|
||||
{loop name="brand.value" type="feature_value" feature=$ID product=$product_id}
|
||||
<meta itemprop="productID" content="isbn:{$TITLE}">
|
||||
{/loop}
|
||||
{/loop}
|
||||
|
||||
<a href="{$URL}" itemprop="url" tabindex="-1" class="product-image">
|
||||
{loop name="product_thumbnail" type="image" product=$ID width="{$width}" height="{$height}" resize_mode="borders" limit="1"}
|
||||
{loop name="product_thumbnail" type="image" product=$product_id width="{$width}" height="{$height}" resize_mode="borders" limit="1"}
|
||||
<img itemprop="image" src="{$IMAGE_URL}" alt="{$productTitle}">
|
||||
{/loop}
|
||||
{elseloop rel="product_thumbnail"}
|
||||
@@ -48,8 +50,8 @@
|
||||
online_only : http://schema.org/OnlineOnly
|
||||
-->
|
||||
{if $IS_PROMO }
|
||||
{loop name="productSaleElements_promo" type="product_sale_elements" product=$ID limit="1" order="min_price"}
|
||||
{assign var="default_product_sale_elements" value=$ID}
|
||||
{loop name="productSaleElements_promo" type="product_sale_elements" product=$product_id limit="1" order="min_price"}
|
||||
{assign var="default_product_sale_elements" value=$product_id}
|
||||
<span class="special-price"><span itemprop="price" class="price-label">{intl l="Special Price:"} </span><span class="price">{format_number number=$TAXED_PROMO_PRICE} {currency attr="symbol"}</span></span>
|
||||
<span class="old-price"><span class="price-label">{intl l="Regular Price:"} </span><span class="price">{format_number number=$TAXED_PRICE} {currency attr="symbol"}</span></span>
|
||||
{/loop}
|
||||
@@ -63,7 +65,7 @@
|
||||
<form id="form-product-details" action="{url path="/cart/add" }" method="post" class="form-product">
|
||||
{form_hidden_fields form=$form}
|
||||
<input type="hidden" name="view" value="product">
|
||||
<input type="hidden" name="product_id" value="{$ID}">
|
||||
<input type="hidden" name="product_id" value="{$product_id}">
|
||||
|
||||
{if $form_error}<div class="alert alert-error">{$form_error_message}</div>{/if}
|
||||
|
||||
@@ -71,13 +73,13 @@
|
||||
{if $default_product_sale_elements }
|
||||
<input type="hidden" name="{$name}" value="{$default_product_sale_elements}" {$attr}>
|
||||
{else}
|
||||
{loop name="productSaleElements_promo" type="product_sale_elements" product="{$ID}" limit="1"}
|
||||
{loop name="productSaleElements_promo" type="product_sale_elements" product="{$product_id}" limit="1"}
|
||||
<input type="hidden" name="{$name}" value="{$ID}" {$attr}>
|
||||
{/loop}
|
||||
{/if}
|
||||
{/form_field}
|
||||
{form_field form=$form field="product"}
|
||||
<input id="{$label_attr.for}" type="hidden" name="{$name}" value="{$ID}" {$attr} >
|
||||
<input id="{$label_attr.for}" type="hidden" name="{$name}" value="{$product_id}" {$attr} >
|
||||
{/form_field}
|
||||
|
||||
<fieldset class="product-options hide">
|
||||
@@ -86,11 +88,11 @@
|
||||
<label for="options" class="option-heading">Options</label>
|
||||
<div class="option-content">
|
||||
<select name="options" class="form-control">
|
||||
{loop name="stock" type="product_sale_elements" product="$ID" order="min_price"}
|
||||
{loop name="stock" type="product_sale_elements" product="$product_id" order="min_price"}
|
||||
{if $LOOP_TOTAL == 1}
|
||||
{assign var="hasSubmit" value = true}
|
||||
{/if}
|
||||
{loop name="combi" type="attribute_combination" product_sale_elements="$ID" order="alpha"}
|
||||
{loop name="combi" type="attribute_combination" product_sale_elements="$product_id" order="alpha"}
|
||||
<option value="{$ID}" data-quantity="{$QUANTITY}" data-price="{format_number number="{$BEST_TAXED_PRICE}"} {currency attr="symbol"}" data-old-price="{format_number number="{$TAXED_PRICE}"} {currency attr="symbol"}">{$ATTRIBUTE_AVAILABILITY_TITLE}</small></option>
|
||||
{/loop}
|
||||
{/loop}
|
||||
@@ -133,4 +135,4 @@
|
||||
{/if}
|
||||
</div>
|
||||
</article><!-- /product -->
|
||||
</li>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user