Product configurator

This commit is contained in:
Preprod mutu 2017-09-22 12:13:42 +02:00
parent 1a4146a653
commit 6f185d6f11

View File

@ -80,33 +80,45 @@
<div id="product-actions" class="lg6 md12 sm6 xxs12">
<div class="bg-pink-dark clearfix">
<!-- Quantité -->
<div id="quantity" class="clear invisible no-print">
<div id="quantity" class="clear invisible no-print {if $product->id_simulator} hidden{/if}">
{if !$PS_CATALOG_MODE}
<label for="quantity_wanted">{l s='Quantité'}</label>
<div id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}>
<div class="valign-middle form-group">
<div class="qtyInputs {if $quantity_discounts|@count > 0}spectific-btn{/if}">
{* Configurator + quantity_discounts => gestion des quantités par palier *}
{if $quantity_discounts|@count > 0}
{if $product->minimal_quantity == 0}
<span>{l s='Quantité(s) non définie sur le produit'}</span>
{*
{if $quantity_discounts|@count > 0}
{if $product->minimal_quantity == 0}
<span>{l s='Quantité(s) non définie sur le produit'}</span>
{else}
<select name="qty" id="quantity_wanted" class="custom-input form-control" data-url="./?controller=product&impactprice=1&ajax=1">
<option value="{$product->minimal_quantity}"{if isset($quantityBackup) && $quantityBackup==$product->minimal_quantity} selected{/if}>{$product->minimal_quantity}</option>
{foreach from=$quantity_discounts key=k item=qty}
<option value="{$qty.quantity}"{if isset($quantityBackup) && $quantityBackup==$qty.quantity} selected{/if}>{$qty.quantity}</option>
{/foreach}
</select>
{/if}
{else}
<select name="qty" id="quantity_wanted" class="custom-input form-control" data-url="./?controller=product&impactprice=1&ajax=1">
<option value="{$product->minimal_quantity}"{if isset($quantityBackup) && $quantityBackup==$product->minimal_quantity} selected{/if}>{$product->minimal_quantity}</option>
{foreach from=$quantity_discounts key=k item=qty}
<option value="{$qty.quantity}"{if isset($quantityBackup) && $quantityBackup==$qty.quantity} selected{/if}>{$qty.quantity}</option>
{/foreach}
</select>
<a href="#" data-field-qty="qty" class="product_quantity_down">
<i class="icon icon-minus"></i>
</a>
<input type="text" name="qty" id="quantity_wanted" class="form-control" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" />
<a href="#" data-field-qty="qty" class="product_quantity_up">
<i class="icon icon-plus"></i>
</a>
{/if}
{else}
<a href="#" data-field-qty="qty" class="product_quantity_down">
<i class="icon icon-minus"></i>
</a>
<input type="text" name="qty" id="quantity_wanted" class="form-control" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" />
<a href="#" data-field-qty="qty" class="product_quantity_up">
<i class="icon icon-plus"></i>
</a>
{/if}
*}
<a href="#" data-field-qty="qty" class="product_quantity_down">
<i class="icon icon-minus"></i>
</a>
<input type="text" name="qty" id="quantity_wanted" class="form-control" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" />
<a href="#" data-field-qty="qty" class="product_quantity_up">
<i class="icon icon-plus"></i>
</a>
</div>
</div>
<!-- minimal quantity wanted -->