我目前正在通过创建自己的脚本来导入.csv文件(产品,客户端...),但是我已经阅读到可以通过WebService进行导入,但是很遗憾,网上没有任何信息。
有人可以指导我这个话题吗?
有可能吗?我该怎么办?
谢谢!
我当前正在使用此脚本,并且我想使用WebService进行相同操作:
$context = Context::getContext();
$employee = new Employee(1);
$context->employee = $employee;
function loadProductsPost() {
$_POST = array (
'tab' => 'AdminImport',
'forceIDs' => '0',
'skip' => '1',
'csv' => 'productos.csv',
'entity' => '1',
'separator' => ';',
'multiple_value_separator' => ',',
'iso_lang' => 'es',
'convert' => '',
'import' => 'Importar datos csv',
'type_value' => array(
0 => 'id',
1 => 'active',
2 => 'no', //revisar
3 => 'category',
4 => 'price_tex',
5 => 'id_tax_rules_group',
6 => 'on_sale',
7 => 'reduction_price',
8 => 'reduction_percent',
9 => 'reduction_from',
10 => 'reduction_to',
11 => 'reference',
12 => 'supplier_reference',
13 => 'supplier',
14 => 'ean13',
15 => 'height',
16 => 'width',
17 => 'depth',
18 => 'weight',
19 => 'quantity',
20 => 'no',
21 => 'minimal_quantity',
22 => 'no',
23 => 'no',
24 => 'description',
25 => 'no',
26 => 'no',
27 => 'no',
28 => 'meta_title',
29 => 'no',
30 => 'no',
31 => 'no',
32 => 'image',
33 => 'customizable',
34 => 'visibility',
35 => 'delivery_time',
36 => 'features',
37 => 'no',
38 => 'no',
39 => 'no',
40 => 'no',
41 => 'manufacturer',
),
);
}
$import = New AdminImportController();
loadProductsPost();
$import->productImport();