GoMage.com DOES NOT provide any CSV or XML templates!
This section is used to configure the content of the feed file. How many fields the feed file is going to have, what delimiters will be used, whether or not the headers will be included, by which attributes the products will be added to the feed - all this information is specified under Content Settings. Depending on the feed type being used, the content can be filled for CSV or XML format.
Content
If XML format is selected for the feed file, the structure of this file is entered in the corresponding text area according to the template provided by the target shopping system or based on the general requirements for XML files.
Usually, Search Engine Services provide a template of the xml file. Ask your Search Engine provider about the preferred XML template.
Screenshot: XML content
Important! The Attribute code must be enclosed in curly brackets and contain "var:" variable (see example): {{var:Attribute_Code}}.
{{block}} – required block containing tags and attributes code.
For example:
{{block}} <part_number>{{var:sku}}</part_number> ............................. OR ................................... <g:price>{{var:price output="float" g:price> {{/block}}
You can find all Attribute codes in the list of Magento® attributes (Stores → Attributes → Product section in Magento® 2 admin panel).
Screenshot: Attribute Codes
You can also use static values.
For example:
{{block}} <g:condition>New</g:condition> {{/block}}
Important! The Attribute code for a Dynamic attribute must be enclosed in curly brackets and contain "var:" and "custom:" variables: {{var:custom:Attribute_Code}}.
For example:
{{block}} <category>{{var:custom:amazon_category}}</category> ................................ OR ................................... <price_vat>{{var:custom:price_vat output="float"}}</g:price_vat> {{/block}}
For configuration of Output Type the following filters can be used:
integer
float
strip_tags
special_encode
special_decode
delete_space
big_to_small
remove_lb
For example: output="float".
Several filters can be used together: output="strip_tags,big_to_small".
Custom XML Attribute Codes
Option |
XML code |
Description |
|
---|---|---|---|
Category > SubCategory |
{{var:category_subcategory}} |
Includes category and subcategory of product. For example: Apparel > Shoes > Mens |
|
Decode special chars |
output="htmlspecialchars_decode" |
||
Delete Space |
output="delete_space" |
||
Dynamic Attribute |
var:custom:dynamic_attribute_code |
||
Encode special chars |
output="htmlspecialchars" |
||
Final Price |
{{var:final_price}} |
Allows you to get the "latest" prices for your products.
|
|
Float |
output="float" |
||
Image 2 - 5 |
{{var:image_2}} |
Use these attributes to upload the additional images of the products to the Feed file. |
|
Integer |
output="integer" |
||
Parent Base Image | parent_base_image | Allows you to get the "parent" base image url from Configurable product for all simple products that belong to it. | |
Parent attribute value |
{{var:parent:name_of_attribute}} |
If the product is a child product, list the value of its parent product attribute in the feed. |
|
Store Price |
{{var:store_price}} |
Allows you to get the prices in local currency of the chosen store |
|
Striptags |
output="striptags" |
||
Symbols Limit |
limit="10" |
||
URL (Parent Product) |
{{var:parent:product_url}} |
Allows you to get the "parent" url from Configurable product for all simple products that belong to it. |
XML Examples
Example 1: Encode Special Characters + Symbols Limit
{{/block}} <name>{{var:name output="htmlspecialchars" limit="10"}}</name> {{/block}}
Example 2: Parent SKU
{{/block}} <g:item_group_id>{{var:parent:sku}}</g:item_group_id> {{/block}}
Example 3 (for Google Shopping): Additional images into the Feed file.
{{/block}} <g:image_2>{{var:image_2}}</g:image_2> <g:image_3>{{var:image_3}}</g:image_3> <g:image_4>{{var:image_4}}</g:image_4> <g:image_5>{{var:image_5}}</g:image_5> {{/block}}
Example 4: Special Chars (Example for specialchars and urlencode / urldecode)
{{/block}} <attribute>{{var:attr output="htmlspecialchars"}}</attribute> ................................ OR ................................... <attribute>{{var:attr output="htmlspecialchars_decode"}}</attribute> {{/block}}
Example 5: Pulling out the category or attribute from Parent Configurable Product and adding it to Child Simple Product
<name>{{var:parent:name}}</name>
Comments
0 comments
Please sign in to leave a comment.