Jump to content

error import product


Recommended Posts

guys I have a problem

 

I put the products on the site

I did export

and it creates a csv file

of a few columns

change the amount

save the file

I do care and I get this message

 

but what is wrong ?

 

p.s. sorry my english

 

thanks

 

[ PrestaShopException ]

Property ProductSupplier -> id_product is not valid

at line 837 in file classes / ObjectModel.php

831 .

832 . $ Message = $ this-> validateField ( $ field , $ this-> $ field ) ;

833. If ( $ message ! == True)

834 . {

835 . If ($ day)

836. Throw new PrestaShopException ( $ message ) ;

837 . Return $ error_return ? $ message : false ;

838 .}

839 .}

840 .

841 . Return true;

ObjectModelCore -> validateFields - [ line 255 - classes / ObjectModel.php ] - [0 Argument ]

249 . *

250 . * @ Return array All object fields

251 . * /

252. GetFields public function ()

253 . {

254. $ This -> validateFields ();

255. $ Fields = $ this-> formatFields ( self :: FORMAT_COMMON ) ;

256.

257 . / / For back compatibility

258 . If ( Shop :: isTableAssociated ( $ this- > def [ 'table' ]))

259 . $ Fields = array_merge ( $ fields , $ this-> getFieldsShop ());

ObjectModelCore -> getFields - [ line 455 - classes / ObjectModel.php ] - [0 Argument ]

449. / / Database insertion

450 . If ( isset ($ this-> id ) && ! Tools :: getValue ( ' forceIDs ' ) )

451. Unset ($ this-> id ) ;

452. If ( Shop :: checkIdShopDefault ( $ this- > def [ 'table' ]))

453. $ This -> id_shop_default = min ( $ id_shop_list ) ;

454. If (! :: ObjectModel $ result = $ db -> insert ( $ this- > def [ 'table' ], $ this-> getFields ( ), $ null_values ​​) )

455. Return false;

456 .

457 . / / Get object id in database

458 . $ This -> id = ObjectModel :: $ db -> insert_id ();

459 .

ObjectModelCore -> add - [ line 417 - classes / ObjectModel.php ] - [2 Arguments ]

411. * @ Param bool $ AutoDate

412. * @ Return boolean Insertion result

413 . * /

414. Public function save ( $ null_values ​​= false , $ AutoDate = true)

415 . {

416. Return ( int) $ this -> id > 0 ? $ this- > update ($ null_values ​​) : $ this -> add ($ AutoDate , $ null_values ​​) ;

417 .}

418 .

419. / **

420 . * Add current object to database

421 . *

Argument [0]

1

Argument [1]

 

ObjectModelCore -> save - [ line 1459 - controllers / admin / AdminImportController.php ] - [0 Argument ]

1453. $ Product_supplier -> id_product = $ product -> id ;

1454. $ Product_supplier - > id_product_attribute = 0;

In 1455 . $ Product_supplier -> id_supplier = $ product -> id_supplier ;

1456. $ Product_supplier -> product_supplier_price_te = $ product -> wholesale_price ;

1457. $ Product_supplier -> product_supplier_reference = $ product -> supplier_reference ;

1458. $ Product_supplier -> save ();

, 1459. }

1460.

1461. / / SpecificPrice ( only the basic reduction feature is supported by the import)

1462. If (! Shop :: isFeatureActive ())

1463. $ Info [ ' shop ' ] = 1;

AdminImportControllerCore -> productImport - [ line 3007 - controllers / admin / AdminImportController.php ] - [0 Argument ]

3001 . Homes $ this -> entities [$ import_type = $ this-> l ( ' Categories ' ) ] :

3002. $ This -> categoryImport ();

3003 . $ This -> clearSmartyCache ();

3004. Breaks ;

3005 . Homes $ this -> entities [$ import_type = $ this-> l ( ' Products ' ) ] :

3006 . $ This -> productImport ();

3007 . $ This -> clearSmartyCache ();

3008 . Breaks ;

3009 . Homes $ this -> entities [$ import_type = $ this-> l ( ' Customers ' ) ] :

3010 . $ This -> customerImport ();

3011 . Breaks ;

AdminImportControllerCore -> PostProcess - [ line 158 - classes / controller / Controller.php ] - [0 Argument ]

152. / / SetMedia MUST be called before PostProcess

153 . If (! $ This -> content_only && ($ this-> display_header | | ( isset ($ this-> className ) && $ this -> className )))

154 . $ This -> setMedia ();

155 .

156 . / / PostProcess handles ajaxProcess

157 . $ This -> postprocess ();

158 .

159 . If (! Empty ($ this-> redirect_after ) )

160 . $ This -> redirect () ;

161 .

162 . If (! $ This -> content_only && ($ this-> display_header | | ( isset ($ this-> className ) && $ this -> className )))

ControllerCore - > run - [ line 348 - classes / Dispatcher.php ] - [0 Argument ]

342 . / / Execute hook dispatcher

343 . If ( isset ($ params_hook_action_dispatcher ) )

344 . Hook :: exec ( ' actionDispatcher ' , $ params_hook_action_dispatcher ) ;

345 .

346 . / / Running controller

347 . $ Controller -> run () ;

348 .}

349 . Catch ( PrestaShopException $ e)

350 . {

351. $ E -> displayMessage ();

352 .}

DispatcherCore -> dispatch - [ line 53 - admin1472583690/index.php ] - [0 Argument ]

Link to comment
Share on other sites

×
×
  • Create New...