// fixed CSV import

This commit is contained in:
bMancone
2012-01-25 15:04:25 +00:00
parent 2ff6c693dd
commit 2bfa89c0ea
2 changed files with 18 additions and 20 deletions
@@ -270,19 +270,26 @@
$(".import_products_categories").hide(); $(".import_products_categories").hide();
$("#entitie").html($("#entity > option:selected").text().toLowerCase()); $("#entitie").html($("#entity > option:selected").text().toLowerCase());
$.getJSON("ajax.php", { $.ajax({
url: 'ajax.php',
data: {
getAvailableFields:1, getAvailableFields:1,
entity: $("#entity").val() entity: $("#entity").val()
}, },
function(j) { dataType: 'json',
success: function(j) {
var fields = ""; var fields = "";
$("#availableFields").empty(); $("#availableFields").empty();
for (var i = 0; i < j.length; i++) for (var i = 0; i < j.length; i++)
fields += j[i].field; fields += j[i].field;
$("#availableFields").html(fields); $("#availableFields").html(fields);
activeClueTip(); activeClueTip();
} },
); error: function(j) {
}
});
}); });
</script> </script>
+7 -16
View File
@@ -113,12 +113,10 @@ class AdminImportControllerCore extends AdminController
'no' => array('label' => $this->l('Ignore this column')), 'no' => array('label' => $this->l('Ignore this column')),
'id_product' => array('label' => $this->l('Product ID').'*'), 'id_product' => array('label' => $this->l('Product ID').'*'),
'group' => array( 'group' => array(
'label' => $this->l('Group (Name:Position)').'*', 'label' => $this->l('Group (Name:Position)').'*'
'help' => $this->l('Position of the group attribute.')
), ),
'attribute' => array( 'attribute' => array(
'label' => $this->l('Attribute (Value:Position)').'*', 'label' => $this->l('Attribute (Value:Position)').'*'
'help' => $this->l('Position of the attribute in the attribute group.')
), ),
'reference' => array('label' => $this->l('Reference')), 'reference' => array('label' => $this->l('Reference')),
'supplier_reference' => array('label' => $this->l('Supplier reference')), 'supplier_reference' => array('label' => $this->l('Supplier reference')),
@@ -131,14 +129,11 @@ class AdminImportControllerCore extends AdminController
'weight' => array('label' => $this->l('Weight')), 'weight' => array('label' => $this->l('Weight')),
'default_on' => array('label' => $this->l('Default')), 'default_on' => array('label' => $this->l('Default')),
'image_position' => array( 'image_position' => array(
'label' => $this->l('Image position'), 'label' => $this->l('Image position')
'help' => $this->l('Position of the product image to use for this combination. If you use this field, leave image URL empty.')
), ),
'image_url' => array('label' => $this->l('Image URL')), 'image_url' => array('label' => $this->l('Image URL')),
'delete_existing_images' => array( 'delete_existing_images' => array(
'label' => $this->l('Delete existing images (0 = no, 1 = yes)'), 'label' => $this->l('Delete existing images (0 = no, 1 = yes)')
'help' => $this->l('If you do not specify this column and you specify the column images,
all images of the product will be replaced by those specified in the import file')
), ),
); );
@@ -222,17 +217,13 @@ class AdminImportControllerCore extends AdminController
'show_price' => array('label' => $this->l('Show price')), 'show_price' => array('label' => $this->l('Show price')),
'image' => array('label' => $this->l('Image URLs (x,y,z...)')), 'image' => array('label' => $this->l('Image URLs (x,y,z...)')),
'delete_existing_images' => array( 'delete_existing_images' => array(
'label' => $this->l('Delete existing images (0 = no, 1 = yes)'), 'label' => $this->l('Delete existing images (0 = no, 1 = yes)')
'help' => $this->l('If you do not specify this column and you specify the column images,
all images of the product will be replaced by those specified in the import file')
), ),
'features' => array('label' => $this->l('Feature(Name:Value:Position)'), 'features' => array('label' => $this->l('Feature(Name:Value:Position)')),
'help' => $this->l('Position of the feature.')),
'online_only' => array('label' => $this->l('Only available online')), 'online_only' => array('label' => $this->l('Only available online')),
'condition' => array('label' => $this->l('Condition')), 'condition' => array('label' => $this->l('Condition')),
'shop' => array( 'shop' => array(
'label' => $this->l('ID / Name of shop'), 'label' => $this->l('ID / Name of shop')
'help' => $this->l('Ignore this field if you don\'t use multishop tool. If you leave this field empty, default shop will be used'),
), ),
); );