Jump to content

[Solved] Error 500 during import product csv


rb10

Recommended Posts

40 minutes ago, ManuelAva said:

Can you share your override of AdminImportController?
 

Sure

 

<?php
@ini_set('max_execution_time', 0);

define('MAX_LINE_SIZE', 0);

define('UNFRIENDLY_ERROR', false);

define('MAX_COLUMNS', 6);

@ini_set('auto_detect_line_endings', '1');
class AdminImportController extends AdminImportControllerCore
{
        'active' => array('AdminImportController', 'getBoolean'),
        'tax_rate' => array('AdminImportController', 'getPrice'),
        
        'price_tex' => array('AdminImportController', 'getPrice'),
        
        'price_tin' => array('AdminImportController', 'getPrice'),
        'reduction_price' => array('AdminImportController', 'getPrice'),
        'reduction_percent' => array('AdminImportController', 'getPrice'),
        'wholesale_price' => array('AdminImportController', 'getPrice'),
        'ecotax' => array('AdminImportController', 'getPrice'),
        'name' => array('AdminImportController', 'createMultiLangField'),
        'description' => array('AdminImportController', 'createMultiLangField'),
        'description_short' => array('AdminImportController', 'createMultiLangField'),
        'meta_title' => array('AdminImportController', 'createMultiLangField'),
        'meta_keywords' => array('AdminImportController', 'createMultiLangField'),
        'meta_description' => array('AdminImportController', 'createMultiLangField'),
        'link_rewrite' => array('AdminImportController', 'createMultiLangField'),
        'available_now' => array('AdminImportController', 'createMultiLangField'),
        'available_later' => array('AdminImportController', 'createMultiLangField'),
        'category' => array('AdminImportController', 'split'),
        'online_only' => array('AdminImportController', 'getBoolean'),
    );
}

 

  • Like 1
Link to comment
Share on other sites

9 minutes ago, rb10 said:

Sure

 

<?php
@ini_set('max_execution_time', 0);

define('MAX_LINE_SIZE', 0);

define('UNFRIENDLY_ERROR', false);

define('MAX_COLUMNS', 6);

@ini_set('auto_detect_line_endings', '1');
class AdminImportController extends AdminImportControllerCore
{
        'active' => array('AdminImportController', 'getBoolean'),
        'tax_rate' => array('AdminImportController', 'getPrice'),
        
        'price_tex' => array('AdminImportController', 'getPrice'),
        
        'price_tin' => array('AdminImportController', 'getPrice'),
        'reduction_price' => array('AdminImportController', 'getPrice'),
        'reduction_percent' => array('AdminImportController', 'getPrice'),
        'wholesale_price' => array('AdminImportController', 'getPrice'),
        'ecotax' => array('AdminImportController', 'getPrice'),
        'name' => array('AdminImportController', 'createMultiLangField'),
        'description' => array('AdminImportController', 'createMultiLangField'),
        'description_short' => array('AdminImportController', 'createMultiLangField'),
        'meta_title' => array('AdminImportController', 'createMultiLangField'),
        'meta_keywords' => array('AdminImportController', 'createMultiLangField'),
        'meta_description' => array('AdminImportController', 'createMultiLangField'),
        'link_rewrite' => array('AdminImportController', 'createMultiLangField'),
        'available_now' => array('AdminImportController', 'createMultiLangField'),
        'available_later' => array('AdminImportController', 'createMultiLangField'),
        'category' => array('AdminImportController', 'split'),
        'online_only' => array('AdminImportController', 'getBoolean'),
    );
}

 

Thanks. Did you do that? I guess you are trying to override $validators property but it is not syntactillay correct. You might try this 

<?php
@ini_set('max_execution_time', 0);

define('MAX_LINE_SIZE', 0);

define('UNFRIENDLY_ERROR', false);

define('MAX_COLUMNS', 6);

@ini_set('auto_detect_line_endings', '1');

class AdminImportController extends AdminImportControllerCore
{
   public static $validators = array('active' => array('AdminImportController', 'getBoolean'),
        'tax_rate' => array('AdminImportController', 'getPrice'),
        
        'price_tex' => array('AdminImportController', 'getPrice'),
        
        'price_tin' => array('AdminImportController', 'getPrice'),
        'reduction_price' => array('AdminImportController', 'getPrice'),
        'reduction_percent' => array('AdminImportController', 'getPrice'),
        'wholesale_price' => array('AdminImportController', 'getPrice'),
        'ecotax' => array('AdminImportController', 'getPrice'),
        'name' => array('AdminImportController', 'createMultiLangField'),
        'description' => array('AdminImportController', 'createMultiLangField'),
        'description_short' => array('AdminImportController', 'createMultiLangField'),
        'meta_title' => array('AdminImportController', 'createMultiLangField'),
        'meta_keywords' => array('AdminImportController', 'createMultiLangField'),
        'meta_description' => array('AdminImportController', 'createMultiLangField'),
        'link_rewrite' => array('AdminImportController', 'createMultiLangField'),
        'available_now' => array('AdminImportController', 'createMultiLangField'),
        'available_later' => array('AdminImportController', 'createMultiLangField'),
        'category' => array('AdminImportController', 'split'),
        'online_only' => array('AdminImportController', 'getBoolean'),
    );
}

 

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

11 minutes ago, ManuelAva said:

Thanks. Did you do that? I guess you are trying to override $validators property but it is not syntactillay correct. You might try this 

<?php
@ini_set('max_execution_time', 0);

define('MAX_LINE_SIZE', 0);

define('UNFRIENDLY_ERROR', false);

define('MAX_COLUMNS', 6);

@ini_set('auto_detect_line_endings', '1');

class AdminImportController extends AdminImportControllerCore
{
   public static $validators = array('active' => array('AdminImportController', 'getBoolean'),
        'tax_rate' => array('AdminImportController', 'getPrice'),
        
        'price_tex' => array('AdminImportController', 'getPrice'),
        
        'price_tin' => array('AdminImportController', 'getPrice'),
        'reduction_price' => array('AdminImportController', 'getPrice'),
        'reduction_percent' => array('AdminImportController', 'getPrice'),
        'wholesale_price' => array('AdminImportController', 'getPrice'),
        'ecotax' => array('AdminImportController', 'getPrice'),
        'name' => array('AdminImportController', 'createMultiLangField'),
        'description' => array('AdminImportController', 'createMultiLangField'),
        'description_short' => array('AdminImportController', 'createMultiLangField'),
        'meta_title' => array('AdminImportController', 'createMultiLangField'),
        'meta_keywords' => array('AdminImportController', 'createMultiLangField'),
        'meta_description' => array('AdminImportController', 'createMultiLangField'),
        'link_rewrite' => array('AdminImportController', 'createMultiLangField'),
        'available_now' => array('AdminImportController', 'createMultiLangField'),
        'available_later' => array('AdminImportController', 'createMultiLangField'),
        'category' => array('AdminImportController', 'split'),
        'online_only' => array('AdminImportController', 'getBoolean'),
    );
}

 

thanks, 🙂 now seem works fine

can i share with you also file csv for check is good...

importa_esempio.csv

Link to comment
Share on other sites

31 minutes ago, rb10 said:

thanks, 🙂 now seem works fine

can i share with you also file csv for check is good...

importa_esempio.csv 483 B · 2 downloads

Looks ok.
There are examples in prestashop, where you import your products/categories/etc, that you can download. I'd suggest that you check them for comparison.
Don't forget to mark this topyc as solved :)
 

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

2 hours ago, ManuelAva said:

Looks ok.
There are examples in prestashop, where you import your products/categories/etc, that you can download. I'd suggest that you check them for comparison.
Don't forget to mark this topyc as solved :)

ok, thanks !!! :):)

Edited by rb10 (see edit history)
  • Like 1
Link to comment
Share on other sites

  • rb10 changed the title to [Solved] Error 500 during import product csv

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...