add REF to product_sale_element loop and fix product tempalte

This commit is contained in:
Manuel Raynaud
2013-11-27 10:07:58 +01:00
parent e1bd2872d1
commit b3d3d61602
2 changed files with 21 additions and 14 deletions

View File

@@ -174,6 +174,7 @@ class ProductSaleElements extends BaseLoop implements PropelSearchLoopInterface
->set("IS_NEW" , $PSEValue->getNewness() === 1 ? 1 : 0) ->set("IS_NEW" , $PSEValue->getNewness() === 1 ? 1 : 0)
->set("IS_DEFAULT" , $PSEValue->getIsDefault() === 1 ? 1 : 0) ->set("IS_DEFAULT" , $PSEValue->getIsDefault() === 1 ? 1 : 0)
->set("WEIGHT" , $PSEValue->getWeight()) ->set("WEIGHT" , $PSEValue->getWeight())
->set("REF" , $PSEValue->getRef())
->set("EAN_CODE" , $PSEValue->getEanCode()) ->set("EAN_CODE" , $PSEValue->getEanCode())
->set("PRICE" , $price) ->set("PRICE" , $price)
->set("PRICE_TAX" , $taxedPrice - $price) ->set("PRICE_TAX" , $taxedPrice - $price)

View File

@@ -159,9 +159,13 @@
{form_field form=$form field='product_sale_elements_id'} {form_field form=$form field='product_sale_elements_id'}
<select name="{$name}" class="form-control"> <select name="{$name}" class="form-control">
{loop name="stock" type="product_sale_elements" product="$ID" order="min_price"} {loop name="stock" type="product_sale_elements" product="$ID" order="min_price"}
{loop name="combi" type="attribute_combination" product_sale_elements="$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"}">
<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}</option> {$REF}
{/loop} ({loop name="combi" type="attribute_combination" product_sale_elements="$ID" order="alpha"}
{if $LOOP_COUNT > 1}-{/if}
{$ATTRIBUTE_AVAILABILITY_TITLE}
{/loop})
</option>
{/loop} {/loop}
</select> </select>
{/form_field} {/form_field}
@@ -192,17 +196,19 @@
{strip} {strip}
{capture "additional"} {capture "additional"}
{ifloop rel="feature_value_info"} {ifloop rel="feature_info"}
<ul> {ifloop rel="feature_value_info"}
{loop name="feature_info" type="feature" product="{$ID}"} <ul>
<li> {loop name="feature_info" type="feature" product="{$ID}"}
<strong>{$TITLE}</strong> : <li>
{loop name="feature_value_info" type="feature_value" feature="{$ID}" product="{product attr="id"}"} <strong>{$TITLE}</strong> :
{$TITLE} {loop name="feature_value_info" type="feature_value" feature="{$ID}" product="{product attr="id"}"}
{/loop} {$TITLE}
</li> {/loop}
{/loop} </li>
</ul> {/loop}
</ul>
{/ifloop}
{/ifloop} {/ifloop}
{/capture} {/capture}
{/strip} {/strip}