Developer forum

Forum » Integration » EcomVariantGroupProductRelation missing in Ecom provider

EcomVariantGroupProductRelation missing in Ecom provider

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I am importing products using the Ecom provider. To get my products to be linked to variants correctly, I need to add data to EcomVariantGroupProductRelation. However, that table doesn't exist as a target in the Ecom provider. Is that mussing by accident or on purpose? Looks like currently I'll have to use the Dynamicweb provider instead...

Thanks in advance for any insights.

Imar


Replies

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply
This post has been marked as an answer

Hi Imar,

The Ecom Provider handles the relationships for you. The virtual fields to consider are: VariantGroups, ProductVariantID, and VariantOptions. I usually map the ProductVariantID on the left twice, to both ProductVariantID and VariantOptions on the right since the same value can be used for both.

If you prefer to do it yourself by explicitely mapping the relationship data, then the Dynamicweb provider is the way to go.

Scott

 

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Scott,

Thanks for that. How would you mape VariantGroups then? My source data looks like this. It shows one master, one variant (with 0107.013 as the variant ID) and then the data for the variant options:

<item table="EcomProducts">
  <column columnName="ProductID"><![CDATA[10021]]></column>
  <column columnName="ProductVariantID"><![CDATA[]]></column>
  <column columnName="ProductNumber"><![CDATA[]]></column>
  <column columnName="ProductName"><![CDATA[Vase 1]]></column>
</item>
<item table="EcomProducts">
  <column columnName="ProductID"><![CDATA[10021]]></column>
  <column columnName="ProductVariantID"><![CDATA[0107.013]]></column>
  <column columnName="ProductNumber"><![CDATA[1002113]]></column>
  <column columnName="ProductName"><![CDATA[Vase 1 Blue Large]]></column>
</item>

...

<item table="EcomVariantsOptions">
  <column columnName="VariantOptionId"><![CDATA[0107]]></column>
  <column columnName="VariantOptionLanguageId"><![CDATA[ENU]]></column>
  <column columnName="VariantOptionGroupId"><![CDATA[Color]]></column>
  <column columnName="VariantOptionName"><![CDATA[Blue]]></column>
</item>
<item table="EcomVariantsOptions">
  <column columnName="VariantOptionId"><![CDATA[013]]></column>
  <column columnName="VariantOptionGroupId"><![CDATA[Size]]></column>
  <column columnName="VariantOptionName"><![CDATA[Large]]></column>
</item>
 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply
This post has been marked as an answer

Hi Imar,

That looks good for the data. VariantGroups just defines which groups a particular variant family will use, so they are the Ids for the groups. In your example it is "Color,Size".

Essentially, the mappings should be:

  • Map EcomVariantsOptions just like you have it, mapping the left to the same fields on the right
  • Map EcomProducts just like you have it, mapping the left to the right. Also add:
    • VariantGroups should be: "Color,Size" in your example
    • In addition to the ProductVariantId -> ProductVariantId, also map ProductVariantId -> VariantOptions
    • It's good that you have both the parent and child. That's the right structure.

I believe that should do it.

Scott

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Oh, I see. Nice, thanks. I hardcoded VariantGroups to Color,Size (I always have these two, and only these two) and it works great.

Imar

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Good deal. That works. Glad that that is a good solution. 

Scott

 

You must be logged in to post in the forum