Shopp Importer
Shopp Importer image ID fix (5 posts)

  1. tonesfrommars
    Posted 3 years ago #

    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!

  2. Albert Boddema
    Posted 3 years ago #


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

  3. mohsinmk
    Posted 2 years ago #

    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.


  4. mohsinmk
    Posted 2 years ago #

    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.


  5. tonesfrommars
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Shopp Importer
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.