dynamic delivery modules on delivery front template

This commit is contained in:
Etienne Roudeix
2013-12-20 12:14:20 +01:00
parent b3ac365b45
commit 22efc21bfe
4 changed files with 64 additions and 22 deletions

View File

@@ -0,0 +1,22 @@
{form name="thelia.order.delivery"}
{loop type="delivery" name="deliveries" force_return="true" country=$country}
{assign var="isDeliveryMethodChecked" value="0"}
<div class="radio">
{form_field form=$form field='delivery-module'}
{if $isPost}
{if $value == $ID}
{assign var="isDeliveryMethodChecked" value="1"}
{/if}
{elseif $LOOP_COUNT == 1}
{assign var="isDeliveryMethodChecked" value="1"}
{/if}
<label for="delivery-method_{$ID}">
<input type="radio" name="{$name}" id="delivery-method_{$ID}"{if $isDeliveryMethodChecked} checked="checked"{/if} value="{$ID}">
<strong>{$TITLE}</strong> / {$POSTAGE} {currency attr="symbol"}
</label>
{/form_field}
</div>
{/loop}
{elseloop rel="deliveries"}<div class="deliveries-warning">{intl l="<strong>Sorry!</strong> We are not able to give you a delivery method for your order."}</div>{/elseloop}
{/form}