[-] BO: Fix #PSCFV-5706 save of product availability on global context
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
{if isset($product->id)}
|
{if isset($product->id)}
|
||||||
<input type="hidden" name="submitted_tabs[]" value="Quantities" />
|
<input type="hidden" name="submitted_tabs[]" value="Quantities" />
|
||||||
<h4>{l s='Available quantities for sale'}</h4>
|
<h4>{l s='Available quantities for sale'}</h4>
|
||||||
|
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Quantities"}
|
||||||
<div class="separation"></div>
|
<div class="separation"></div>
|
||||||
<div class="hint" style="display:block; position:'auto';">
|
<div class="hint" style="display:block; position:'auto';">
|
||||||
<p>{l s='This interface allows you to manage the available quantities for sale of the current product and its combinations on the current shop.'}</p>
|
<p>{l s='This interface allows you to manage the available quantities for sale of the current product and its combinations on the current shop.'}</p>
|
||||||
@@ -206,8 +207,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="col-left"><label>{l s='Displayed text when in-stock:'}</label></td>
|
<td class="col-left">
|
||||||
<td style="padding-bottom:5px;">
|
{include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"}
|
||||||
|
<label>{l s='Displayed text when in-stock:'}</label>
|
||||||
|
</td>
|
||||||
|
<td style="padding-bottom:5px;" class="col-right">
|
||||||
{include file="controllers/products/input_text_lang.tpl"
|
{include file="controllers/products/input_text_lang.tpl"
|
||||||
languages=$languages
|
languages=$languages
|
||||||
input_value=$product->available_now
|
input_value=$product->available_now
|
||||||
@@ -216,8 +220,11 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="col-left"><label>{l s='Displayed text when allowed to be back-ordered:'}</label></td>
|
<td class="col-left">
|
||||||
<td style="padding-bottom:5px;">
|
{include file="controllers/products/multishop/checkbox.tpl" field="available_later" type="default" multilang="true"}
|
||||||
|
<label>{l s='Displayed text when allowed to be back-ordered:'}</label>
|
||||||
|
</td>
|
||||||
|
<td style="padding-bottom:5px;" class="col-right">
|
||||||
{include file="controllers/products/input_text_lang.tpl"
|
{include file="controllers/products/input_text_lang.tpl"
|
||||||
languages=$languages
|
languages=$languages
|
||||||
input_value=$product->available_later
|
input_value=$product->available_later
|
||||||
|
|||||||
@@ -1226,6 +1226,8 @@ product_tabs['Quantities'] = new function(){
|
|||||||
self.refreshQtyAvailabilityForm();
|
self.refreshQtyAvailabilityForm();
|
||||||
self.ajaxCall({actionQty: 'out_of_stock', value: $(this).val()});
|
self.ajaxCall({actionQty: 'out_of_stock', value: $(this).val()});
|
||||||
});
|
});
|
||||||
|
if (display_multishop_checkboxes)
|
||||||
|
ProductMultishop.checkAllQuantities();
|
||||||
|
|
||||||
self.refreshQtyAvailabilityForm();
|
self.refreshQtyAvailabilityForm();
|
||||||
};
|
};
|
||||||
@@ -1574,6 +1576,15 @@ var ProductMultishop = new function()
|
|||||||
ProductMultishop.checkField($('input[name=\'multishop_check[link_rewrite]['+v.id_lang+']\']').prop('checked'), 'link_rewrite_'+v.id_lang);
|
ProductMultishop.checkField($('input[name=\'multishop_check[link_rewrite]['+v.id_lang+']\']').prop('checked'), 'link_rewrite_'+v.id_lang);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.checkAllQuantities = function()
|
||||||
|
{
|
||||||
|
$.each(languages, function(k, v)
|
||||||
|
{
|
||||||
|
ProductMultishop.checkField($('input[name=\'multishop_check[available_later]['+v.id_lang+']\']').prop('checked'), 'available_later_'+v.id_lang);
|
||||||
|
ProductMultishop.checkField($('input[name=\'multishop_check[available_now]['+v.id_lang+']\']').prop('checked'), 'available_now_'+v.id_lang);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
this.checkAllAssociations = function()
|
this.checkAllAssociations = function()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user