1

I have two product XML look like:

1:- product-1.xml

 .

 .

 .

 .

 <images merge-mode="add">

      <image-group view-type="large">

           <image path="product-123.jpg" />

      </image-group>

 </images>

 .

 .

2:- product-1-1.xml

 .

 .

 .

 .

 <images merge-mode="add">

      <image-group view-type="large">

           <image path="product-124.jpg" />

           <image path="product-125.jpg" />

      </image-group>

 </images>

 .

 .

I am importing both the files and I want to append the images for the same product (PRODUCT123) as

 <images merge-mode="add">

      <image-group view-type="large">

           <image path="product-123.jpg" />

           <image path="product-124.jpg" />

           <image path="product-125.jpg" />

      </image-group>

 </images>

but it's not appending the images.

I used merge-mode="merge" also for the same but not getting the result as I expected.

Could anyone help me out that where I am doing wrong?

4

2 回答 2

1

遗憾的是,Salesforce B2C Commerce 平台目前不支持您想要实现的目标。您不能将一个图像组的图像拆分为多个文件并期望它们被合并。确实,文件导入模式应该是MERGE,但是merge-mode="add"不支持你尝试的元素,导入文件时应该会收到警告。

如果您从文档中查看catalog.xsd架构,您会在complexType.Product.Images类型定义下看到以下内容:

    <xsd:attribute name="merge-mode" type="simpleType.MergeMode" default="merge" use="optional">
        <xsd:annotation>
            <xsd:documentation>
                Used to control if specified image groups will be merged to or replace the existing image specification.
                The values "merge" and "replace" are the only ones supported for the "merge-mode" attribute.
                Attribute should only be used in import MERGE and UPDATE modes. In import REPLACE mode, using the "merge-mode" attribute is not
                sensible, because existing image groups will always be removed before importing the image groups
                specified in the import file.
            </xsd:documentation>
        </xsd:annotation>
    </xsd:attribute>

PS 我建议您寻找一种替代解决方案来合并有关图像的数据,然后再将其发送到 Salesforce B2C Commerce 实例。

于 2019-01-11T20:41:42.440 回答
1

您在使用ImportCatalog管道吗?请检查作业配置,导入模式应为MERGE

于 2019-01-04T08:30:39.473 回答