Jump to content

log per AdminImportController


Recommended Posts

 

 

Ho costruito uno script php che lancia l'importazione degli articoli in prestashop, allego il codice php

 

 

 


  echo "Token : ".$token.PHP_EOL;


    // Send POST datas just like the admin form would do it, those datas depends on what you want to do : check the import admin page.
    $request->setPost(array(
        "controller"               => "AdminImport",
        "token"                    => $token,
        "skip"                     => 1,
        "csv"                      => $csvname,
        "convert"                  => '',
        "regenerate"               => '',
        "entity"                   => 1, //1 is for products import
        "iso_lang"                 => "it",
        "truncate"                 => 0,
        "forceIDs"                 => 1,
        "match_ref"                => 1,
        "separator"                => ";",
        "multiple_value_separator" => ",",
        "import"                   => 1,
        "type_value" => Array( 0 => 'active', 1 => 'name', 2 => 'category', 3 => 'price_tin', 4 => 'id_tax_rules_group', 5 => 'wholesale_price', 6 => 'on_sale', 7 => 'reduction_price', 8 => 'reduction_percent', 9 => 'reduction_from', 10 => 'reduction_to', 11 => 'reference', 12 => 'supplier_reference', 13 => 'supplier', 14 => 'manufacturer', 15 => 'ean13', 16 => 'upc', 17 => 'ecotax', 18 => 'width', 19 => 'height', 20 => 'depth', 21 => 'weight', 22 => 'quantity', 23 => 'minimal_quantity', 24 => 'visibility', 25 => 'additional_shipping_cost', 26 => 'unity', 27 => 'unit_price', 28 => 'description_short', 29 => 'description', 30 => 'tags', 31 => 'meta_title', 32 => 'meta_keywords', 33 => 'meta_description', 34 => 'link_rewrite', 35 => 'available_now', 36 => 'available_later', 37 => 'available_for_order', 38 => 'available_date', 39 => 'date_add', 40 => 'show_price', 41 => 'image', 42 => 'delete_existing_images', 43 => 'features', 44 => 'online_only', 45 => 'condition', 46 => 'customizable', 47 => 'uploadable_files', 48 => 'text_fields', 49 => 'out_of_stock', 50 => 'advanced_stock_management', 51 => 'depends_on_stock', 52 => 'warehouse')
)
    );


echo "<br>";
    echo "call AdminImport and POST datas...".PHP_EOL;


    $request->call($adminUrl."index.php?controller=AdminImport&token=".$token);

 

Il problema è il seguente:

 

Se AdminImport termina il suo lavoro mi ritrovo nei log di prestashop la segnalazione di importazione

Se AdminImport termina con errori non trovo nessuna segnalazione sui log nemmeno dell'inizio della procedura.

 

Ovviamente vorrei la segnalazione dell'errore nei log di prestashop

Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...