• For anyone trying to use filenames and the “image path” field to include images…

    You will need to alter spi_model.php
    in the function “execute_mega_query()” look for the following code (line 397 currently):

    foreach ($map_product->images as $imageObject) {
    	if(intval($imageObject->value) > 0){
    		$has_image = true;
    	}
    }

    As you can see, it is checking for an integer value > 0, which is not satisfied by a string, which results in has_image == false and the importer thinks there are no images to import.

    foreach ($map_product->images as $imageObject) {
    	if(intval($imageObject->value) > 0 || $imageObject->value != ''){
    		$has_image = true;
    	}
    }

    Now, we are also checking for a non-empty string, and voila, our images get imported. I hope this helps someone, or I hope the plugin maintainer can fix it, as it’s slightly misleading to have this option available but not functional. Took me a while to figure this out.

    Otherwise, great plugin!

Viewing 4 replies - 1 through 4 (of 4 total)
  • @tonesfrommars

    Thanks for youre solution. I was stuck with this problem.
    Also love this plugin!

    mohsinmk

    (@mohsinmk)

    Hi tonesfrommars,
    I tried your solution but it did not solve my problem.
    What I did was in the image path setting I had entered the E:\wamp\www\aafe/img/{val}.jpg and in csv file in image column used the name of file exist in this folder like himg1.jpg but it is not working.
    Need you help, please guide.

    Thanks

    mohsinmk

    (@mohsinmk)

    Hey,
    It worked, the mistake was the name of the image in the csv file it should be himg1 and not himg1.jpg.

    But now I am struggling with subcategories. I tried the solution that in the category column I had used values like cat1/cat2 where cat1 is main category and cat2 is its subcategory but this is not working do u have any solution. Please help.

    Thanks,

    Thread Starter tonesfrommars

    (@tonesfrommars)

    Hi mohsinmk:

    I haven’t handled this plugin for some time now, but IIRC I didn’t have success with the subcategories either.

    However, you can use separate categories (multiple ones in separate fields) and then assign them as children of other categories after import. It seems to be an acceptable workaround assuming your csv document is manageable.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Shopp Importer image ID fix’ is closed to new replies.