User Tools

Site Tools


Sidebar

magento_2:product_feed

For more details see the Product Feed extension page.

Guide for Product Feed for Magento 2

Create product feeds for Google Shopping, Nextag, Bing, Amazon and many other comparison shopping engines to attract more customers and drive sales to your Magento store.

  • Ready-made feed templates for most popular shopping engines
  • Automatic and manual feed generation
  • Flexible feed configuration to comply with all shopping engines
  • Ability to set particular time for feed generation
  • Unlimited number of product feeds

Creation of product feeds

To create a product feed, please go to Catalog → 'Feeds' section → Profiles.

When you create a feed, you can use ready-made templates. In this case, the feed will contain all the basic settings for the certain shopping search engine. You can do any custom adjustments while creating a feed or you can do them later.

To duplicate, generate and delete feeds in bulk select the feeds you need, click the button Actions and choose the action.

The link to the generated the feed is displayed on the grid. Click the Copy Link button to immediately get it.

Set up feed for Google and Facebook with Feed wizard

Since Facebook is using the same feed format and tags as Google, the feed profile we're going to create here will work for both Google and Facebook.

Go to Feeds and click the Setup Google Feed button.

Step 1: General settings

To start setting up Google Feed, configure the General Settings.

Feed Name - specify feed name.

File name - fill in the feed file name.

Status - here you can activate or deactivate the feed.

Store View - select which store view to take attribute values from. It's very useful when you have a multilingual store, for example, so you can create feeds using the names or descriptions in specific languages.

Price Currency - specify the currency. If you have a multistore configuration with different currencies set for each store, then this setting will make the Feed fetch product prices in the currency assigned to the specific store.

Exclude Disabled Products - set to Yes to exclude products with the disabled status from the feed.

Exclude Out of Stock Products - enable the option if you don't want to include out of stock products to the feed.

Exclude Not Visible Products - set to Yes to skip not visible products so that they won't be included in the feed.

Step 2: Exclude Categories

Carefully review all the categories listed below and select those you want to exclude from your product feed by checking the corresponding checkbox(es). Excluded categories will not be mapped to Google Taxonomies and won't be included in the generated feed.

Step 3: Rename Categories

To map your category to category in Google taxonomy, simply click on the category name and insert suitable category path from Google taxonomy.

To match Google requirements, set the necessary Google Taxonomy source and easily rename the categories with the autocomplete function.

Step 4: Basic Product Information

Specify the basic attributes you want to output in the feed.

Wizard will have all fields already filled for you so you can skip to the next step if you don't want to make any changes. But in case you want, for example, to use short description instead of the description in your feed, choose it from the dropdown menu:

The same can be applied to all other attributes.

Step 5: Optional Product Information

Here specify the optional product attributes to output in the feed.

Just as in previous step here we see a list of attributes. But this time which attributes to use greatly depends on what you are selling. Google has different requirements for data that should be included in the feed. The requirements depend on your store location and the type of products you export.

For example, if you sell apparel and the Condition tag is set to New in your products, you will need to have attributes gtin, mpn and brand in the feed.

Brand should be set manually. For example, in our case, we have the brand info saved in the manufacturer attribute, so we choose it in the drop-down.

Step 6. Schedule Settings

Choose the automatic feed updating or set the necessary frequency manually. When you choose to generate feed by schedule, also specify the precise day or several days and time of its generation.

Step 7. Upload to Google Server

In the following example we're going to set up a feed to be uploaded to the Google servers daily, once a day, using SFTP in fully-automatic mode. We should start from the Google Merchant account setup. Add a new feed:

A test feed will do for now, but please keep in mind that test feeds can't be used in AdWords campaigns:

Since we're going to upload our feed files to Google server, Upload is what we need here:

The next one is important because the name of the feed file you set here should match the actual name of the file you're going to upload to Google. File name should correspond the one you specified in the Step 1.

In the Google Merchant dashboard, go to Settings (near your profile avatar) > SFTP / FTP / GCS:

Click Reset password and save the password. Now, on the SFTP settings page we can get the server address and login:

Return to the Product Feed extension, step 7. Set Enable tab to Yes.

Enter the data you have received from the Google Merchant dashboard.

Here also goes the filename you've set in the Google Merchant feed settings.

In the tab Protocol choose the upload method. If FTP is set, you can enable or disable the Passive Mode below. Here’s how the configured step 7 may look like:

As you click Save and Start Generation, the feed profile will open and the feed generation will start, and because we configured the SFTP upload, the feed will go to the Google server, too.

After the file is uploaded to the Google server, it will be automatically processed.

It is also possible to generate feed via CLI. To get the list of profiles, use the following command:
feed\:profile:list

To start the generation of the profile, execute this one:

feed\:profile:generate PROFILE_ID 

Add New Feed

To choose a template or to create a custom feed, go to the Catalog → 'Feeds' section → Profiles and click Add New Feed.

General

Specify the General Information about a new feed.

Name - specify feed name.

File name - fill in the feed file name.

Type - choose product feed format (XML, CSV or TXT).

Store - select for which store view you want to create the feed.

Status - here you can activate or deactivate the feed.

Compress - you can set to compress the feed to Zip, Gz or Bz format when it generates and uploads to the server.

Exclude Disabled Products - set to Yes to exclude products with the disabled status from the feed.

Exclude Out of Stock Products - enable the option if you don't want to include out of stock products to the feed.

Exclude Not Visible Products - set to Yes to skip not visible products so that they won't be included in the feed.

Content

The Content tab allows configuring product data that are included in the product feed. The functionality of the tab depends on the format you select at the ‘General’ tab. If you choose CSV or TXT format, you will get fields for entering the feed header, attribute, format and parent information.

Columns Names - set to Yes to show columns names.

Header - fill in the information about the header.

Fields enclosed by - choose the symbols to enclose the fields (Double Quote (“), Quote (‘), Space, None).

Fields separated by - specify the symbols to separate the fields (Comma (,), Semicolon (;), Pipe (|), Tab).

Attribute - when you configure product data, you can add a new attribute, image and other entity. For example, add a Price with TAX(VAT) attribute to get more relevant information on the product prices.

Format - here you choose a format of the attribute field (as it is, data format or price format).

Parent - when enabled, simple products which are associated with configurable products will output attribute value from the parent configurable product.

It is also possible to add various modifiers, show or hide them. For example, if the value of the selected attribute is not specified, you can apply 'If Empty' modifier. In this case, the value from this field will be filled in.

If the values of the attribute are specified, but you want to replace them, choose 'If Not Empty' modifier.

Keep in mind, that two different modifiers can't be applied as they will replace each other. So, if you want to replace the values in both cases, choose 'If Empty/Not Empty' modifier.

If you choose XML format, you will get fields for entering the feed header, footer and product information.

Header - used to place some info into the XML header.

The time of the feed generation automatically adds to the header. If you don't need it, you can remove it from the header at any time.

Item - a tag which will wrap each product in the feed.

Content - an XML editor where XML tags and attribute codes are inserted.

Tag - XML tag for the entity set up below. To add a line of data to a feed, please enter the attribute XML tag according to the specification of a particular shopping search engine (e.g. for google.com XML tag will be g:price).

Optional (available only for XML feeds) - use the option to exclude an attribute which have an empty value for a product from the feed. When set to Yes: the attribute will not be added to the feed for a product for which it has an empty value.

Footer - used to place some info into XML footer.

Also specify the Attribute, Format and Parent.

It is possible to add modifiers for cases when you need to modify the original values of an attribute. To do this, use ‘Add modifier’ action; select one action from the available range:

  • Strip tags - delete HTML and PHP tags from the line;
  • HTML escape - escape special symbols from the product description;
  • Lowercase - convert all attribute letters to lower case;
  • Uppercase - convert all attribute letters to upper case;
  • Capitalize - make the first uppercase letter;
  • Round - round the number down to a whole following the mathematical rounding rules (0.5 - upwards to 1);
  • If Empty - specify the value to use instead of an empty attribute's value;
  • If Not Empty - fill in the value that will replace the original attribute's value;
  • If Empty/Not Empty - set the algorithm according to which both empty and specified values will be replaced;
  • To secure URL - replace http with https;
  • To unsecure URL - replace https with http.

When you've chosen the modifier, click the Insert button to apply it.

In this example, we apply “HTML Escape” modifier to escape special symbols from the product description. It is important for XML format as special symbols can be treated as part of XML markup and break feed file.

For your convenience, attributes' codes are displayed when selecting an attribute to insert into the product feed.

You can also use a category mapping for any shopping platform. All you need to do is to add a new attribute from the list:

To learn more about category mapping, please, go to the Configure Category Mapping for shopping platforms section.

Format settings

In the Formats section, you can specify the date format for the feed file, choose how many digits should be displayed after delimiter for decimal prices. You can also specify price currency and abbreviation for it.

Conditions

It's also possible to create a feed for specific products. For example, you can add configurable products in one feed, and simple products to another. At the Conditions tab, you can specify the products that will be included into the feed you are editing.

In our example, we specified the conditions to generate the feed only for the products from the Category 36 and with the Attribute Set 'Bag'.

Schedule

Decide whether to generate feed manually or by schedule. When you choose to generate feed by schedule, also specify the precise day or several days and time of its generation.

FTP Settings

Enable feed download on the ‘FTP Settings’ tab and enter FTP account credentials where the feed will be uploaded.

Host - FTP\SFTP server hostname or IP address.

User - FTP\SFTP username.

Password - FTP\SFTP password.

Path - path to directory on FTP\SFTP server. Please note: this path is set relative to FTP\SFTP user home directory. If the home directory is already set to desired feed destination then you don't need to set Path.

Passive Mode - can enable Passive mode for FTP connections. More on FTP modes here.

Click the Test connection button to check whether the data for the FTP\SFTP connection is correct.

Analytics

These settings allow you to set utm-parameters, that will be added to the urls in your feed. Thus, you can collect all the statistics to your Google Analytics account.

The fields Campaign Source, Campaign Medium and Campaign Name are REQUIRED.

When the feed is configured, press the Preview Feed button to preview the feed before its generation:


Configure Category Mapping for shopping platforms

If you need to make changes to your store’s categories to suit the requirements of the platform where you would like to upload your feed (for example, Amazon), please go to сategories section.

Go to Catalog → 'Feed' section → Categories

To create new category mapping, please hit on the Add New Categories Mapping button and specify the name and code here.

Exclude Categories and Rename Categories to add them in one click while creating the custom feed. Then click Save.

How does it work?

To IGNORE and exclude particular categories from the feed, CHECK the necessary boxes.

For example, if a product is assigned to the categories “Bags” and “Sale”, the extension will choose the category with the biggest value by default. In our case, it can be “Sale”. If you want to assign the product only to the “Bags” category - select the “Sale” checkbox to ignore it.

If you want to manage a category that will be selected for the product in the feed by yourself, select the categories that you would like to ignore. In this case, if the product is assigned to more than 1 category, the extension will ignore the checked checkboxes.

Custom fields

To create a new custom field, please, go to Catalog → 'Feed' section → Custom Fields → Add Custom Field button.

Custom fields are used to cover special cases: for example, when you need to change some attributes values or replace prices when meeting special conditions. You have the ability to create rule-based values for these fields.

In the example below, we've configured the rule-based custom field: when the product's Size attribute value is XS, the Price attribute for this product will be discounted for 10%.

Let's check the configuration steps:

In the General section, specify the Code and the Name for your custom field.

Then, determine Conditions for Output Value. On this step, choose attributes and their values that will be a trigger for applying the Output Value, configured below, instead of the original.

To configure the Output Value, choose the Attribute that should be changed when conditions apply, and specify the Modification to it (text, percentage or fixed value). If the Modification field contains text, the value of the custom field will be replaced with this text.

You can also specify the Default Output Value, that will be used if none of the conditions applies.

When a custom field is configured, you can insert it as an attribute to your product feed (available for all formats: xml, csv, txt):

Here are some more examples of custom fields you can configure:

Example #1

When the “Price” value equals or greater than 50, replace the “Tax Class” value to “Taxable Goods”.

Example #2

Replace the “Size” attribute value for “All Sizes”, when the “Gender” attribute is either “Women” or “Girls”.

General Settings

Go to Admin Panel – Stores – Configuration – Amasty Extensions – Product Feed

Batch Size - specify how many products will be handled during one iteration.

URL with category - to generate an appropriate product feed, switch between shortest and longest URL paths.

Shortest Path — uses the shortest possible path in product URL;

Longest Path — uses the longest possible path in product URL;

Default Rule — utilizes the default Magento 2 rule for URLs, deactivates the extension.

For example, you have a product that is listed in 2 categories, therefore, it's available via two links:

1) store.com/category1/product.html

and

2) store.com/category2/subcategory2/product.html

If you choose the Shortest Path, the extension will use the first link, if you select the Longest Path - the second URL will be used.

Products in Feed Preview - specify the number of products you want to be displayed in the feed preview.

In the Email Notifications section, specify:

  • Email Sender - choose an email sender from a list of configured email senders in Magento;
  • Email - specify an email to which notifications should be sent. If there are several e-mails, separate them by a comma;
  • Notification Events - select events to send notifications upon;
  • Successful/Unsuccessful Email Template - choose email templates to use for notifications on successful/unsuccessful feed generation by cron.

In the Cronjob Information section, check the information on the latest cron jobs.

To prevent affecting the execution of other cron tasks, the feed cron job is moved to a separate cron group. It is possible to launch feed cron job by the bin/magento cron:run – group=“amasty_feed” command.

How to submit configurable products to Google Merchant

Related help article on Google support site.

To let Google know that simple and configurable products you submit in the feed are related, you should use g:item_group_id tag. Add this tag to your feed profile, set it to output SKU attribute and enable Parent option.

With this setup, Feed extension will export products with same g:item_group_id if they are related, i.e. if they are associated products of the same Configurable Product. Then Google will check g:item_group_id value and treat these products as a variant of the same product.

Also, if Google Merchant displaying an error on an invalid image link for simple products, you can use the image of a parent configurable product for a child simple product.

XML formatting error

In the most cases, this error appears when your feed has special characters inside tags. Please note the line number in the error message, then open your XML feed file and check the aforementioned line. Note the tag used in this line, then open feed profile, find the tag and add a modifier “HTML Escape”

Click Update, save and generate the feed.

Cron Tasks List

Magento 2 Product Feed extension is preintegrated with Cron Tasks List to provide store owners with an opportunity to track and manage all cron tasks running in the website background.

To view all scheduled and executed cron tasks, go to System → Cron Tasks List

Run all cron tasks and generate their schedule by clicking the ‘Run Cron’ button. Also you can delete separate tasks in bulk, apply filtering and sorting options when it is needed.


Find out how to install the Product Feed for Magento 2 via Composer.
Rate the user guide
 stars  from 1 votes (Details)
magento_2/product_feed.txt · Last modified: 2019/08/27 08:18 by tihomirova