XML with stock from each variable

[ad_1]

Hello,

To create a sprouts feed, please, Go to Make feed > Select Custom template 2 > Paste the below code and generate the feed – 

NB: Custom template 2 is not available in the free version.

<?xml version="1.0" encoding="utf-8" ?>
<mywebstore>
   <created_at>{(return date('d.m.Y H:i:s');)}</created_at>
   <products>
    {{each product start}}
      <product>
        <PRODUCTID><![CDATA[{id}]]></PRODUCTID>
        <title><![CDATA[{title}]]></title>
        <link><![CDATA[{link}]]></link>
        <price>{(return $price;)} USD</price>
        <description><![CDATA[{description,[strip_tags]}]]></description>
        <category><![CDATA[{product_type}]]></category>
        <image>{image}</image>
        <additional_imageurl>{image_1}</additional_imageurl>
        <availability>In Stock</availability>
        <size><![CDATA[{wf_attr_pa_size}]]></size>
        <color><![CDATA[{wf_attr_pa_color}]]></color>
        {{if variation available}}
         <variations>
           {{each variation start}}
           <variation>
            <variationid><![CDATA[{id}]]></variationid>
            <link><![CDATA[{link}]]></link>
            <availability>In Stock</availability>
            <manufacturersku><![CDATA[{sku}]]></manufacturersku>
            <pricevat>{price_with_tax}</pricevat>
             <size><![CDATA[{wf_attr_pa_size}]]></size>
            <quantity>{quantity}</quantity>
          </variation>
           {{each variation end}}
        </variations>
        {{endif variation}}
      </product>
    {{each product end}}
  </products>
</mywebstore>

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer