Skip to content
autotelik edited this page Mar 18, 2013 · 1 revision

Spree Image loading can be achieved by ensuring SKU or class Name features in Image filename.

Lookup is performed either via the SKU being prepended to the image name, or by the image name being equal to the name attribute of the klass in question.

Images can be attached to any class defined with a suitable association. The class to use can be configured in rake task via parameter klass=Xyz.

In the Spree tasks, this defaults to Product, so attempts to attach Image to a Product via Product SKU or Name.

A report is generated in the current working directory detailing any Images in the paths that could not be matched with a Product.

thor  datashift:spree:images input=C:\images\product_images skip_if_no_assoc=true

thor datashift:spree:images input=C:\images\taxon_icons skip_if_no_assoc=true klass=Taxon
Clone this wiki locally