Developer forum

Forum » PIM » Not all product properties available in a feed

Not all product properties available in a feed

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

I there,

I have a PIM feed that's configured to output the Weight of a product:

 

When I use an XSLT template and the XML provider, lots of properties, including Weight are missing. For example, with this simple template that copies everything:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"
                version="1.0" exclude-result-prefixes="msxsl">
  <xsl:output method="xml" indent="yes" xml:space="preserve"/>
  <xsl:param name="domain-name"/>
  <xsl:param name="product-catalog-page-id"/>

  <xsl:template match="/Root">
    <xsl:element name="Products">
      <xsl:apply-templates select="Products"/>
    </xsl:element>
  </xsl:template>
  
    <xsl:template match="@*|node()">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    
  </xsl:template>
</xsl:stylesheet>

the configured Weight field is missing in the output:

However, if I switch to the Template provider and use the Json template and make no other changes, the data is there:

What am I missing? (Other than the Weight property ;-) )

Imar

 

 

 

 


Replies

 
Michael Knudsen
Reply

Hello Imar,

- if you are using the "XML feed provider" without the XSLT, are "Weight" then available in the feed?

Br. Michael Knudsen

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Ah, good idea. Didn't know the transformation file wasn't required. But yes, I get the same result when not selecting any file, so it seems Weight is not available in the original XML.

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Anyone from the development team who can comment on why this is?

 
Søren Jensen Dynamicweb Employee
Søren Jensen
Reply

Hi Imar,

I have tested on my DW9 (9.17.16), and it seems to work correct .. (look below)

Which version are you on ?

/Søren

 
Søren Jensen Dynamicweb Employee
Søren Jensen
Reply
This post has been marked as an answer

Hi Imar,

There are two Weight fields .. both in Systemfields & Stock fields ..

Try to select System fields ..

/Søren

 

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

>> There are two Weight fields .. both in Systemfields & Stock fields ..

Oh! That was it. Once I selected Weight there, it appeared. But how do I get the weight field from the Stock Unit to show up in the XML? Or are stock units not returned in the feed?

Thanks!

Imar

 
Søren Jensen Dynamicweb Employee
Søren Jensen
Reply

Hi Imar,

If you use Stock Units on product, with Weight set, it will appear in XML ..

Just remember, that field "Product Weight" and "Stock units Weight", are two different fields and values

/Søren

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Thanks Soren. Yes, I understand Product Weight and Stock Unit Weight are two different things.

I think I tracked it down to variant info on the stock unit. When I set up a unit like this:

I get the correct stock unit info on the master and ALL variants:

However, as soon as I change the info to be for a specific variant like so:

the data disappears from the feed entirely for all products:

Shouldn't it show up for that one variant that I assigned the stock unit to?

Imar

 

 

You must be logged in to post in the forum