entity: product_configurator_setting mappings: - file_column: "id" entity_path: "id" - file_column: "product id" entity_path: "productId" - file_column: "option id" entity_path: "optionId" - file_column: "position" entity_path: "position" - file_column: "media id" entity_path: "mediaId" - file_column: "media url" entity_path: "media?.url" - file_column: "media folder id" entity_path: "media?.mediaFolderId" - file_column: "media type" entity_path: "media?.mediaType" - file_column: "default media title" key: "default_media_title" - file_column: "default media alt" key: "default_media_alt" - file_column: "default price net" key: "default_price_net" - file_column: "default price gross" key: "default_price_gross" serialize_script: | row = #{ default_media_title: entity.media?.translated?.title, default_media_alt: entity.media?.translated?.alt }; if entity.price == () { row.default_price_net = ""; row.default_price_gross = ""; } else { let default_currency = get_default("CURRENCY"); let price = entity.price.find(|p| p.currencyId == default_currency); row.default_price_net = price.net; row.default_price_gross = price.gross; } deserialize_script: | let default_language = get_default("LANGUAGE_SYSTEM"); entity = #{ price: [#{ net: row.default_price_net, gross: row.default_price_gross, linked: true, currencyId: get_default("CURRENCY") }], media: #{ translations: [#{ languageId: default_language, title: row.default_media_title, alt: row.default_media_alt }] } };