Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
commit
e1fa26d002
2 files changed
+28
-30
No files matched your search
@@ -74,38 +74,36 @@
|
|||||||
</form>
|
</form>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA
|
//<![CDATA
|
||||||
$(document).ready(function()
|
function position_exception_textchange()
|
||||||
{
|
{
|
||||||
function position_exception_textchange(obj)
|
// TODO : Add & Remove automatically the "custom pages" in the "em_list_x"
|
||||||
{
|
var obj = $(this);
|
||||||
var shopID = obj.attr('id').replace(/\D/g, '');
|
var shopID = obj.attr('id').replace(/\D/g, '');
|
||||||
var list = obj.parent().find('#em_list_' + shopID);
|
var list = obj.parent().find('#em_list_' + shopID);
|
||||||
var values = obj.val().split(',');
|
var values = obj.val().split(',');
|
||||||
var len = values.length;
|
var len = values.length;
|
||||||
|
|
||||||
list.find('option').prop('selected', false);
|
list.find('option').prop('selected', false);
|
||||||
for (var i = 0; i < len; i++)
|
for (var i = 0; i < len; i++)
|
||||||
list.find('option[value="' + $.trim(values[i]) + '"]').prop('selected', true);
|
list.find('option[value="' + $.trim(values[i]) + '"]').prop('selected', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function position_exception_listchange(obj)
|
function position_exception_listchange()
|
||||||
{
|
{
|
||||||
var shopID = obj.attr('id').replace(/\D/g, '');
|
var obj = $(this);
|
||||||
var str = '';
|
var shopID = obj.attr('id').replace(/\D/g, '');
|
||||||
obj.find('option:selected').each(function(){
|
var str = obj.val().join(', ');
|
||||||
str += obj.val()+', ';
|
|
||||||
});
|
|
||||||
|
|
||||||
if (str.length > 2)
|
obj.parent().find('#em_text_' + shopID).val(str);
|
||||||
str = str.substr(0, str.length - 2);
|
}
|
||||||
obj.parent().find('#em_text_' + shopID).val(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
$('form[id="hook_module_form"] input[id^="em_text_"]').on('change', function(){
|
$(document).ready(function(){
|
||||||
position_exception_textchange($(this));
|
$('form[id="hook_module_form"] input[id^="em_text_"]').each(function(){
|
||||||
}).change();
|
$(this).change(position_exception_textchange).change();
|
||||||
$('form[id="hook_module_form"] select[id^="em_list_"]').on('change', function(){
|
});
|
||||||
position_exception_listchange($(this));
|
|
||||||
|
$('form[id="hook_module_form"] select[id^="em_list_"]').each(function(){
|
||||||
|
$(this).change(position_exception_listchange);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
//]]>
|
//]]>
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ function set_product_suppliers()
|
|||||||
`id_currency`)
|
`id_currency`)
|
||||||
VALUES
|
VALUES
|
||||||
("'.(int)$row['id_product'].'", "0", "'.(int)$row['id_supplier'].'",
|
("'.(int)$row['id_product'].'", "0", "'.(int)$row['id_supplier'].'",
|
||||||
"'.(int)$row['supplier_reference'].'", "'.(int)$row['wholesale_price'].'",
|
"'.pSQL($row['supplier_reference']).'", "'.(int)$row['wholesale_price'].'",
|
||||||
"'.(int)$ps_currency_default.'"
|
"'.(int)$ps_currency_default.'")
|
||||||
');
|
');
|
||||||
|
|
||||||
//Try to get product attribues
|
//Try to get product attribues
|
||||||
@@ -68,7 +68,7 @@ function set_product_suppliers()
|
|||||||
`product_supplier_price_te`, `id_currency`)
|
`product_supplier_price_te`, `id_currency`)
|
||||||
VALUES
|
VALUES
|
||||||
("'.(int)$row['id_product'].'", "'.(int)$attribute['id_product_attribute'].'",
|
("'.(int)$row['id_product'].'", "'.(int)$attribute['id_product_attribute'].'",
|
||||||
"'.(int)$row['id_supplier'].'", "'.(int)$attribute['supplier_reference'].'",
|
"'.(int)$row['id_supplier'].'", "'.pSQL($attribute['supplier_reference']).'",
|
||||||
"'.(int)$attribute['wholesale_price'].'", "'.(int)$ps_currency_default.'")
|
"'.(int)$attribute['wholesale_price'].'", "'.(int)$ps_currency_default.'")
|
||||||
');
|
');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user