Jump to content

CSV Import Products; Discount Percent Error; Image URLs - Image filename with space chars


jprr773

Recommended Posts

Hi,

 

I'm having an issue importing products. Here is my CSV:

3982    ;1    ;Parrot LS tee;    110,    ;30.89430894    ;53    ;    ;1    ;    ;60    ;"2014-04-10"    ;"2016-04-10"    ;BrandA    ;    ;    ;BrandA    ;    ;    ;    ;    ;    ;    ;    ;    ;1    ;both    ;    ;    ;    ;Parrot LS tee    ;100% cotton    ;    ;    ;    ;    ;    ;    ;    ;1    ;    ;"2013-12-31"    ;1    ;'http://localhost/ProductImages/productimage%20name%20.jpg'    ;1    ;    ;0    ;new    ;0    ;0    ;0    ;    ;    ;    ;    ;

Issue 1: Discount Percent field:
post-477028-0-84258700-1437571865_thumb.jpgIn the CSV, the discount field value is 60  . I have tried other values like '60'  '0.60' , but whatever value I use, I always get the error  «Property SpecificPrice->reduction is not valid».
Is there a proper way to add the discount Percent ?

Issue 2:  Image URLs - Image filename with space chars

In the CSV, the Image URL field value is prepared with url encode, even so, I get the error

«Error copying image: 'http://localhost/ProductImages/productimage%20name%20.jpg
I also tried using the image url value without url encode, but had no success either.
Is it possible to import images / filenames with special chars in the name like space?

I would appreciate any help you can give.
Thank you

 

Link to comment
Share on other sites

I ended up changing some piece of code at  AdminImportController.php:

//original code
//$specific_price->reduction = (isset($info['reduction_price']) && $info['reduction_price']) ? $info['reduction_price'] : $info['reduction_percent'] / 100;

//changed code
$specific_price->reduction =  $info['reduction_percent'] / 100 ;

discount field value in CSV is indicated e.g,  60  or 40

Thanks


 

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

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