Jump to content

Recommended Posts

Hola a todos, estoy usando este script para importar mis productos a la tienda, todo funciona perfecto pero las imágenes no las importa. ¿Necesito otro controlador para que lo haga?

 

Estoy usando prestashop 1.5.4.1

 

<?php

define('_PS_ADMIN_DIR_', getcwd());
include_once('../config/config.inc.php');
include_once('../config/defines.inc.php');
include_once('../admin3094/functions.php');
include_once '../controllers/admin/AdminImportController.php';
include_once '../controllers/admin/AdminImagesController.php';

$import1 = New AdminImportController();
loadProductsPost();
$import1->productImport();

function loadProductsPost() {
 $_POST = array (
'tab' => 'AdminImport',
'skip' => '0',
'csv' => 'products1.csv',
'convert' => '',
'entity' => '1',
'separator' => ';',
'multiple_value_separator' => ',',
'import' => 'Importar datos CSV',
'type_value' =>
array (
  0 => 'id',
  1 => 'active',
  2 => 'name',
  3 => 'category',
  4 => 'price_tex',
  5 => 'id_tax_rules_group',
  6 => 'wholesale_price',
  7 => 'on_sale',
  8 => 'reduction_price',
  9 => 'reduction_percent',
  10 => 'reduction_from',
  11 => 'reduction_to',
  12 => 'reference',
  13 => 'supplier_reference',
  14 => 'supplier',
  15 => 'manufacturer',
  16 => 'ean13',
  17 => 'upc',
  18 => 'ecotax',
  19 => 'weight',
  20 => 'quantity',
  21 => 'description_short',
  22 => 'description',
  23 => 'tags',
  24 => 'meta_title',
  25 => 'meta_keywords',
  26 => 'meta_description',
  27 => 'link_rewrite',
  28 => 'available_now',
  29 => 'available_later',
  30 => 'available_for_order',
  31 => 'date_add',
  32 => 'show_price',
  33 => 'image',
  34 => 'delete_existing_images',
  35 => 'features',
  36 => 'online_only',
  37 => 'condition',
  38 => 'shop',
),
 );
}

?>

 

Gracias!

Edited by alberto510a (see edit history)
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...