< Back
Print

SC::Shopware – Transfer media files with attributes

With the plugin SC::Shopware – Transfer media files with attributes – Shopware image attributes can be synchronized as defined in Shopware “s_articles_img_attributes”:

Example

In the Shopware source data set, section “Standard attribute mapping” select the plugin “SC::Shopware – Transfer media files with attributes”.

Click on the gearwheel symbol to open up the settings:

Notice:
mediaImage -> cs formatted value is a mandatory field
This plugin does not work for single variant images (complex articles)

Parameter:
mediaImage
name
description
attribute.. as defined in Shopware “s_articles_img_attributes”

Plugin Configuration:

Meaning of the settings for the variant in Shopware

Label Description Example
Album ID in Shopware (e.g.. -1 for product images) Album ID e.g. for product images:-1 or for download pdf -6 -1
Format for particular attributes (dynamic value, e.g.attribute_key_{count}) mediaImage – mandatory! Format: cs formatted value
name –  defines the image name Label, Format: SC::Reference – send specific value of a MAM reference
description – image text displayed in the frontend File name, Format: SC::Reference – send specific value of a MAM reference
attribute… Image attributes, Format: SC::Reference – send specific value of a MAM reference

Result of the image export to Shopware

Wenn es das Bild in der Shopware Medianverwaltung noch nicht gibt, werden “name” und “description” übertragen, gibt es das Bild bereits, bleiben “name” und “description” unverändert.


Send data [POST]:media
Detailed informationen
Array
(
    [0] => http://192.168.1.98/dev/shopware5.5.x/api/media
    [1] => POST
    [2] => Array
        (
            [album] => -1
            [file] => http://sc-trunkcs17.dev-int.saws-office.de/admin/../admin/ImageServer.php?ID=bffd3a8862@CSLive&rand=73ec5bd53d08ee8f2a71957c874de669&lang=2&width=400&height=400&format=jpg&dpi=72&omitPreview=true&CSPIN=Y3RzVXNlcj1hZG1pbiZjdHNXZWJzaXRlPUNTTGl2ZSZjdHNQSU5EYXRlPTE1NjA5NDU3MTMmY3RzUElOPWM5NDU4MDY5OWRhZTI5YmRiYjczZDkxZjZiMzRlMDM5&/47b9aa939f32962f99fceb659870836ctv-n.jpg
            [name] => TV-N.jpg
            [description] => TV-N.jpg
        )

Shopware response:

Client Response[POST]:media
Detailed informationen
Array
(
    [id] => 1351
    [location] => http://192.168.1.98/dev/shopware5.5.x/api/media/1351
)

Die aus der Bild Übertragung resultierende MedienId wird zusammen mit den gemappten Attributen dem Produkt mitgegeben.


    [images] => Array
                        (
                            [1351] => Array
                                (
                                    [mediaId] => 1351
                                    [attribute] => Array
                                        (
                                            [attribute1] => 8862
                                            [attribute2] => TV-N.jpg
                                        )

                                )

Result in the Media Manager

Result in the article

Further information

If you want to provide variant images with attributes, then the images must be mapped with this plugin in the variant head and additionally also in the variant plugin:

Example

Mapping in the standard attribute mapping table:

Mapping in the shopware plugin “SC::Shopware Format Variant article”

Details/limitations

Attention:
If the same images are also mapped for other attributes, e.g. in attribute fields, please first synchronize via this plugin, so the attributes for “name” and “description” are transferred to the Shopware Media manager. This means, please configure “images” with the Plugin “SC::Shopware – Transfer media files with attributes” at the top of the mapping table.

 

Was this article helpful?
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Table of Contents