How to use Mosets Tree's 'Import Images' tool?

MT Importer is the primary tool that helps you to mass import large number of listings using CSV formatted data. Because it accepts CSV format, only text-based data are supported. Non-text data such as images are not imported.

The new 'Image Images' tool introduced in Mosets Tree 3, helps you to work around this issue by reading URLs from a custom field and convert it to a listing image. This tool together with MT Importer enable you to import text-based data and images. There are 2 typical workflows when using this tool.

Importing image URLs directly from CSV

This method is the easiest and most straightforward, but it requires that your script has the ability to export its images URL as part of their export routine. Once you've manage to prepare the CSV file, import them using the MT Importer tool and finally use the 'Import Images' tool to import the images to your listings.

Importing image URLs through SQL query

An alternative way would be to programatically insert the URL value to by running the following SQL query to your database:

INSERT INTO `jos_mt_cfvalues` (`cf_id`, `link_id`, `value`)
    VALUES (Custom Field ID,Listing ID,'http://example.com/path/image.jpg'); 

Note: Replace 'jos_' with your site's database table prefix, Custom Field ID with the ID of a weblink custom field and Listing ID with the ID of the listing that the image belongs to.

Once you've execute the queries, use the 'Import Images' tool to import the images to your listings.

Was this article helpful?