// Combinations are now saved using the global save product action (#PSTEST-354)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12417 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
var msg_combination_1 = '{l s='Please choose an attribute'}';
|
||||
var msg_combination_2 = '{l s='Please choose a value'}';
|
||||
var msg_combination_3 = '{l s='You can only add one combination per type of attribute'}';
|
||||
var msg_new_combination = '{l s='New combination'}';
|
||||
|
||||
</script>
|
||||
|
||||
@@ -322,9 +323,6 @@
|
||||
<tr>
|
||||
<td style="width:150px"> </td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<span style="float: left;">
|
||||
<input type="submit" name="submitProductAttribute" id="submitProductAttribute" value="{l s='Add this combination'}" class="button" onclick="attr_selectall(); this.form.action += '&addproduct&tabs=3';" add="{l s='Add this combination'}" update="{l s='Update this combination'}" />
|
||||
</span>
|
||||
<span id="ResetSpan" style="float:left;margin-left:8px;display:none;">
|
||||
<input type="reset" name="ResetBtn" id="ResetBtn" onclick="init_elems();getE('id_product_attribute').value = 0;" class="button" value="{l s='Cancel modification'}" />
|
||||
</span>
|
||||
@@ -332,6 +330,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="separation"></div>
|
||||
</div>
|
||||
|
||||
{$list}
|
||||
|
||||
@@ -204,7 +204,6 @@
|
||||
if (btn_name == "Combinations")
|
||||
{
|
||||
$('#desc-product-new').hide();
|
||||
disableSave();
|
||||
$('#desc-product-newCombination').show();
|
||||
populate_attrs();
|
||||
}
|
||||
|
||||
@@ -1469,6 +1469,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
$this->processSuppliers($token);
|
||||
$this->processWarehouses($token);
|
||||
$this->processFeatures($token);
|
||||
$this->processProductAttribute($token);
|
||||
$languages = Language::getLanguages(false);
|
||||
if (!$this->updatePackItems($object))
|
||||
$this->errors[] = Tools::displayError('An error occurred while adding products to the pack.');
|
||||
|
||||
@@ -40,7 +40,6 @@ function removeButtonCombination(item)
|
||||
$('#add_new_combination').show();
|
||||
$('.process-icon-newCombination').removeClass('toolbar-new');
|
||||
$('.process-icon-newCombination').addClass('toolbar-cancel');
|
||||
$('#submitProductAttribute').val($('#submitProductAttribute').attr(item));
|
||||
$('#desc-product-newCombination div').html($('#ResetBtn').val());
|
||||
$('id_product_attribute').val(0);
|
||||
init_elems();
|
||||
@@ -52,8 +51,7 @@ function addButtonCombination(item)
|
||||
$('#add_new_combination').hide();
|
||||
$('.process-icon-newCombination').removeClass('toolbar-cancel');
|
||||
$('.process-icon-newCombination').addClass('toolbar-new');
|
||||
$('#submitProductAttribute').val($('#submitProductAttribute').attr(item));
|
||||
$('#desc-product-newCombination div').html($('#submitProductAttribute').val());
|
||||
$('#desc-product-newCombination div').html(msg_new_combination);
|
||||
posC = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@ virtual_product_nb_days, is_shareable)
|
||||
|
||||
getE('attribute_ean13').value = ean;
|
||||
getE('attribute_upc').value = upc;
|
||||
getE('submitProductAttribute').value = modifyattributegroup;
|
||||
getE('attribute_wholesale_price').value = Math.abs(wholesale_price);
|
||||
getE('attribute_price').value = Math.abs(price_impact);
|
||||
getE('attribute_weight').value = Math.abs(weight_impact);
|
||||
@@ -120,8 +119,7 @@ virtual_product_nb_days, is_shareable)
|
||||
|
||||
$("#virtual_product_filename_attribute").val(virtual_product_filename_attribute);
|
||||
$("#add_new_combination").show();
|
||||
|
||||
|
||||
|
||||
/* Reset all combination images */
|
||||
combinationImages = $('#id_image_attr').find("input[id^=id_image_attr_]");
|
||||
combinationImages.each(function() {
|
||||
@@ -131,13 +129,13 @@ virtual_product_nb_days, is_shareable)
|
||||
/* Check combination images */
|
||||
if (typeof(combination_images[id_product_attribute]) != 'undefined')
|
||||
for (i = 0; i < combination_images[id_product_attribute].length; i++)
|
||||
getE('id_image_attr_' + combination_images[id_product_attribute][i]).checked = true;
|
||||
|
||||
$('#id_image_attr_' + combination_images[id_product_attribute][i]).attr('checked', 'checked');
|
||||
check_impact();
|
||||
check_weight_impact();
|
||||
check_unit_impact();
|
||||
|
||||
var elem = getE('product_att_list');
|
||||
|
||||
for (var i = 0; i < old_attr.length; i++)
|
||||
{
|
||||
var opt = document.createElement('option');
|
||||
@@ -370,3 +368,6 @@ function openCloseLayer(whichLayer)
|
||||
style.display = style.display == 'none' ? 'block' : 'none';
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#product_form').submit(function(){attr_selectall();console.log('couou');});
|
||||
});
|
||||
Reference in New Issue
Block a user