Shopp Importer image ID fix
-
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)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Shopp Importer image ID fix’ is closed to new replies.