Developer forum

Forum » PIM » Product feed to Google Merchant Center: product link

Product feed to Google Merchant Center: product link

Jonas Nielsen
Reply

Hi,
I need to create a feed for Google Merchant Center. I followed the DW official "guide" palced here:  (https://doc.dynamicweb-cms.com/documentation-9/how-tos/general/setting-up-a-google-merchant-product-feed)

One of Google’s requirements is the product URL (product link) which is critically important.

I’ve gone through all the attributes several times on the create feeds page (see attached image), but I can’t seem to find a product link anyehre.

How can I include it in the feed?

attributes.jpg

Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

A product can have multiple links depending on where and how many times it is published - e.g. on different websites etc.

So in your feed template you would have to manually create the link. In the feed where you loop the products, you have the productid and group id available. Then you need the pageid where you want your google feed to link to. Then contruct a URL like Defaultl.aspx?ID={pageid}&groupid=group1&productid=prod1

BR Nicolai

 
Jonas Nielsen
Reply

Hej Nicolai,

Jeg har dette i min template fil: <xsl:template name="link">
    <xsl:element name="link">
      <xsl:value-of select="concat($domain-name,'/default.aspx?ID=',$product-catalog-page-id,'&amp;ProductId=', Id)"/>
    </xsl:element>
  </xsl:template>

 

Er det korrekt? 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

And does it produce output?

Have you specified the content of the product-catalog-page-id variable? It is a setting on the feed...

 

You must be logged in to post in the forum