Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {assign var="pr" value=$product}
- {if $collection_list_item}
- {assign var="pr" value=$collection_list_item}
- {/if}
- {assign var=amount_min value=$pr.params.amount_min}
- {assign var=multiplicity value=$pr.params.amount_multiplicity|default:1}
- {if !$amount_min}
- {if $multiplicity}
- {assign var=amount_min value=$multiplicity}
- {else}
- {assign var=amount_min value=$shop2.my.amount_default|default:1}
- {/if}
- {/if}
- {if $pr.amount < 1 && $pr.amount != 0}
- {assign var=amount_min value=$shop2.my.amount_default|default:$pr.amount}
- {/if}
- {if !$shop2.my.mode_catalog}
- <div class="{$class}{if $pr.buy_mode == 1 && $shop2.my.enable_disabled_class} shop2-product-amount-disabled{/if}">
- {if !$hideCaption}
- <div class="amount-title">{#SHOP2_AMOUNT#}:</div>
- {/if}
- {if $pr.buy_mode == 1}
- <div class="shop2-product-amount disabled">
- <button type="button" disabled="disabled">−</button><input type="text" maxlength="4" disabled="disabled" value="{$amount_min}" /><button type="button" disabled="disabled">+</button>
- </div>
- {else}
- <div class="shop2-product-amount">
- <button type="button" class="amount-minus">−</button><input type="text" name="amount" data-kind="{$pr.kind_id}" data-max="{$pr.amount}" data-min="{$amount_min}" data-multiplicity="{$multiplicity}" maxlength="4" value="{$amount_min}" /><button type="button" class="amount-plus">+</button>
- </div>
- {if ($amount_min != 0 || $multiplicity != 0) && ($pr.params.amount_min || $pr.params.amount_multiplicity)}
- <div class="amount-min">
- {#FILTER_INT_FROM#|mb_strtolower} {$amount_min} {$pr.params.unit}
- {#FILTER_BY#|mb_strtolower} {if $multiplicity}{$multiplicity}{else}{if $pr.amount < 1 && $pr.amount != 0}{$pr.amount}{else}1{/if}{/if} {$pr.params.unit}
- </div>
- {/if}
- {/if}
- </div>
- {/if}
Add Comment
Please, Sign In to add comment