diff --git a/admin-dev/themes/template/group_shop/form.tpl b/admin-dev/themes/template/group_shop/form.tpl index 3b1a56f87..7a60bb77f 100644 --- a/admin-dev/themes/template/group_shop/form.tpl +++ b/admin-dev/themes/template/group_shop/form.tpl @@ -27,14 +27,34 @@ {block name=script} + function toggleShareOrders() { + + var disabled_customer = ($('#share_customer_on').attr('checked')) ? false : true; + var disabled_stock = ($('#share_stock_on').attr('checked')) ? false : true; + + if (disabled_customer || disabled_stock) + { + $("input[name=share_order]").each(function(i) { + $(this).attr('disabled', 'disabled'); + }); + + $('#share_order_off').attr('checked', true); + } + else + { + $('input[name=share_order]').attr('disabled', ''); + } + } + $(document).ready(function() { - $('input[name=share_order]').attr('disabled', true); + toggleShareOrders(); $('input[name=share_customer]').click(function() { - var disabled = ($('input[name=share_customer]').attr('checked')) ? false : true; - $('input[name=share_order]').attr('disabled', disabled); - if (disabled) - $('#share_order_off').attr('checked', true); + toggleShareOrders(); + }); + $('input[name=share_stock]').click(function() + { + toggleShareOrders(); }); $('#useImportData').click(function() { diff --git a/admin-dev/themes/template/products/quantities.tpl b/admin-dev/themes/template/products/quantities.tpl index 37dd72454..86dd0bb6c 100644 --- a/admin-dev/themes/template/products/quantities.tpl +++ b/admin-dev/themes/template/products/quantities.tpl @@ -2,90 +2,102 @@

{l s='This interface allows you to manage the available quantities for sale of the current product and its combinations on the current shop.'}

{l s='You can manually specify the quantities for the product / each product combinations, or choose to automatically determine these quantities based on your stock.'}

-

{l s='In this case, the quantities correspond to the quantitites of the real stock in the warehouses associated to the current shop.'}

+

{l s='In this case, the quantities correspond to the quantitites of the real stock in the warehouses associated to the current shop or current group of shops.'}


-

{l s='Available quantities for sale'}

+

{l s='Available quantities for sale'}

- - - - - - - - - - - - - - - - - - -
- depends_on_stock == 1 && $stock_management_active == 1}checked="checked" {/if} {if $stock_management_active == 0}disabled="disabled" {/if} type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_1" value="1"/> - -

-
- depends_on_stock == 0 || $stock_management_active == 0}checked="checked" {/if} type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_0" value="0"/> - -

-
- - - - - - - - - - - - - {foreach from=$attributes item=attribute} - - - - - {/foreach} - -
{l s='Quantity'}{l s='Designation'}
- {$available_quantity[$attribute['id_product_attribute']]} - - {$product_designation[$attribute['id_product_attribute']]}
-
- - - - - - - -
- out_of_stock == 0}checked="checked" {/if} id="out_of_stock_1" type="radio" checked="checked" value="0" class="out_of_stock" name="out_of_stock"> - -
- out_of_stock == 1} 'checked="checked" {/if} id="out_of_stock_2" type="radio" value="1" class="out_of_stock" name="out_of_stock"> - -
- out_of_stock == 2} 'checked="checked" {/if} id="out_of_stock_3" type="radio" value="2" class="out_of_stock" name="out_of_stock"> - -
-
+ {if $show_quantities == true} + + + + + + + + + + + + + + + + + + + +
+ depends_on_stock == 1 && $stock_management_active == 1}checked="checked" {/if} {if $stock_management_active == 0}disabled="disabled" {/if} type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_1" value="1"/> + +

+
+ depends_on_stock == 0 || $stock_management_active == 0}checked="checked" {/if} type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_0" value="0"/> + +

+
+ + + + + + + + + + + + + {foreach from=$attributes item=attribute} + + + + + {/foreach} + +
{l s='Quantity'}{l s='Designation'}
+ {$available_quantity[$attribute['id_product_attribute']]} + + {$product_designation[$attribute['id_product_attribute']]}
+
+ + + + + + + +
+ out_of_stock == 0}checked="checked" {/if} id="out_of_stock_1" type="radio" checked="checked" value="0" class="out_of_stock" name="out_of_stock"> + +
+ out_of_stock == 1} 'checked="checked" {/if} id="out_of_stock_2" type="radio" value="1" class="out_of_stock" name="out_of_stock"> + +
+ out_of_stock == 2} 'checked="checked" {/if} id="out_of_stock_3" type="radio" value="2" class="out_of_stock" name="out_of_stock"> + +
+
+ {else} +
+

{l s='It is not possible to manage quantities when : '}

+ +
+ {/if}