How to Make an XML Product Feed?

Before starting this topic please make sure you have read this doc: How to Make a WooCommerce Product Feed with CTX Feed Plugin?

Now if you select XML as your file type the three more extra options will be available. You can create/edit attribute schema for your feed.

When you use pre-installed templates, you need to check if the attributes from the template response for the same values as your store attributes. If this attribute doesn’t exist in your store, set appropriate product attribute or pattern for the same line.

Content Settings

Before creating an XML Feed, you need to map the appropriate channel attributes with your product attributes:

Usually Comparison Shopping Engines provide a template of the xml file. Based on this template, you need to configure the feed.

  • Items Wrapper – Default value is products. Items Wrapper enclose all products into a single XML element. Check  appropriate items wrapper for your channel. See the use of items wrapped into XML file below

<pre class="prettyprint prettyprinted" style=""><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"utf-8"</span><span class="pln"> </span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;<b style="color:red;">products</b>&gt;</span><span class="pln">
      </span><span class="tag">&lt;product&gt;</span><span class="pln">
        </span><span class="tag">&lt;attribute_1&gt;</span><span class="pln">&lt;![CDATA[{attribute_1}]]&gt;</span><span class="tag">&lt;/attribute_1&gt;</span><span class="pln">
        </span><span class="tag">&lt;attribute_2&gt;</span><span class="pln">&lt;![CDATA[{attribute_2}]]&gt;</span><span class="tag">&lt;/attribute_2&gt;</span><span class="pln">
        .....
      </span><span class="tag">&lt;/product&gt;</span><span class="pln">
</span><span class="tag">&lt;/<b style="color:red;">products</b>&gt;</span><span class="pln">
	</span></pre>
    
  • Single Item Wrapper –  Default value is the product. Single Item Wrapper encloses each product information in this node. Check  appropriate single item wrapper for your merchant. See the use of single item wrapper into XML file below .
<pre class="prettyprint prettyprinted" style=""><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"utf-8"</span><span class="pln"> </span><span class="pun">?&gt;</span><span class="pln"> </span><span class="tag">&lt;products&gt;</span><span class="pln">       </span><span class="tag">&lt;<b style="color:red;">product</b>&gt;</span><span class="pln">         </span><span class="tag">&lt;attribute_1&gt;</span><span class="pln">&lt;![CDATA[{attribute_1}]]&gt;</span><span class="tag">&lt;/attribute_1&gt;</span><span class="pln">         </span><span class="tag">&lt;attribute_2&gt;</span><span class="pln">&lt;![CDATA[{attribute_2}]]&gt;</span><span class="tag">&lt;/attribute_2&gt;</span><span class="pln">         .....       </span><span class="tag">&lt;/<b style="color:red;">product</b>&gt;</span><span class="pln">       </span><span class="tag">&lt;<b style="color:red;">product</b>&gt;</span><span class="pln">         </span><span class="tag">&lt;attribute_1&gt;</span><span class="pln">&lt;![CDATA[{attribute_1}]]&gt;</span><span class="tag">&lt;/attribute_1&gt;</span><span class="pln">         </span><span class="tag">&lt;attribute_2&gt;</span><span class="pln">&lt;![CDATA[{attribute_2}]]&gt;</span><span class="tag">&lt;/attribute_2&gt;</span><span class="pln">         .....       </span><span class="tag">&lt;/<b style="color:red;">product</b>&gt;</span><span class="pln"> </span><span class="tag">&lt;/products&gt;</span><span class="pln"> </span></pre>

Extra Header –  This is optional. If your merchant supports any extra XML header then you can add here

FEED CONFIG:

Into the feed config section, you can add/remove rows, change rows ordering, set output type, Output limit. Each row in the feed config table is an element in the XML feed file.

For adding a new column to your XML feed, you need to create a new row and map your channel attribute with the product attribute:

  • [Merchant Name] Attributes – the header column name.
  • Prefix – allows you place prefix before each value in the column.The prefix Special for attribute Name will return values Special Product Name 1Special Product Name 2
  • Type – following types available:
    • Attribute – allows selecting any store attribute from the drop-down list.
    • Pattern – this option allows you to enter static value
  • Value – you need to select the attributes  or put pattern
  • Suffix – allows you place suffix after each value in a column. Same as prefix but suffix value will appear after the attribute or pattern value
  • Output Type – following types available:
    • Default – value not will be changed
    • Integer – value will be converted to ceil number. For example: 12.59 ==> Integer ==> 13
    • Price – value will be converted to price format (000.00). For example: 200.0000 ==> Price ==> 200.00                               OR 200 ==> Price ==> 200.00
    • Strip Tags –  clear text from html tags. For Example: <p> any string </p> ==> Strip Tags ==> any string
    • htmlentities – Convert all applicable characters to HTML entities. For example: & ==> htmlentities ==>  &amp;                  OR  >  ==> htmlentities ==> &gt;
    • UTF-8 Encode – Encodes an ISO-8859-1 string to UTF-8
    • Remove Space – remove space from value
    • CDATA – value will be enclosed with the cdata section.
    • Remove ShortCodes – remove shortcodes from a string.  For example, if you want to remove Visual Composer or others shortcodes from the product description.
    • Remove Special Character – remove any non-utf-8 character from a string.
  • Output Limit – limit on number of character in value
  • Command – Using the output formatting command its possible to format any attribute value like converting the product title to Uppercase, Lowercase, String Replace etc. Learn more from here: How to use command to format attribute output?

Make an XML Product Feed with CTX Feed
Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.