solutions for e-commerce

14 years of business 2563 reviews 4.9 average rating
Magento 2

Facebook Product Feed

Quickly and safely export a valid and well-structured data feed of your complete catalog of products from your Magento 2 website to your Facebook account thanks to Facebook Product Feed.

5/5 rated
1 Review
from €145
User guide

You may also be interested in these resources:

How to sell on Facebook?

In order to use Facebook Product Feed to sell on Facebook, you should be aware of what Commerce Manager is and how it works.

Here is some basic knowledge about Facebook and data feed management.

What is Commerce Manager?

Commerce Manager is the Facebook tool that allows sellers to sell on this platform, add inventory, manage orders...

With Commerce Manager, businesses can sell products on Instagram, Facebook Marketplace, and Facebook Page Shops.

How to create a Commerce Manager account?

In order to submit your products to Facebook and Instagram, you need to set up a Commerce Account for your business.

Click on the following link to create your Commerce Manager account: https://www.facebook.com/commerce_manager/get_started/

Once your account is created, you'll have access to the Commerce Manager interface where you can manage all your product data feeds and plan any daily, weekly, or monthly updating tasks.

What is a product data feed?

A data feed is a file made up of a unique group of attributes that define each one of your products. This allows customers to search and find your items more easily. This file is similar to an RSS data feed but includes some specific XML tags used by Facebook or any other shopping engine.

To know more about the product data feeds, feel free to have a look at the Facebook support site: https://www.facebook.com/business/help/1898524300466211?id=725943027795860

How to create a product data feed?

Facebook Product Feed for Magento 2 allows you to quickly configure, generate, and automate several product data feeds for Facebook.

How to use Facebook Product Feed?

STEP 1: Configure Facebook in a general way

Before being able to configure your data feeds, you should configure the extension in a general way. To do so, go to:
Stores  SettingsConfiguration WyomindFacebook Product Feed 

Cron job reporting

In the Cron job reporting tab, you can activate the cron job reporting and fill in an email address to receive the reports. You can also rename the reports as you want. 

Core Settings

In the Core Settings tab, you'll need to configure a certain number of fields.
  • Items in preview:
    By default, there are 10 items in preview, if you want you can reduce or increase that number.
  • Items in buffer:
    By default, products are inserted into the file on the server every 10 items but you can reduce or increase that number.
  • Items in SQL request:
    By default, there are 1500 items in each MySql query.
  • Number of advanced filters:
    By default, you have 10 advanced filters. If you need more, you can at any time increase that value.
  • Use of OR/AND statements in advanced filters:
    OR/AND statements can be used in the advanced filters simply by enabling that option. 
  • Include not in menu categories:
    You can also include the categories of products that are not in the menu. 
  • Memory limit size (M):
    The default memory limit is 1024.
  • Use canonical urls:
    You have a choice between several options. You can choose to use the shortest category URL, the longest one, or the product URL.
    For example, if you have a "T-shirt" in 2 categories: "New arrivals" and "Shirts", the URLs may be:
    Product Url = http://mywebsite.com/t-shirt.html
    Shortest category url = http://www.mywebsite.com/men/shirts/t-shirt.html
    Longest category url = http://mywebsite.com/men/new-arrivals/t-shirt.html
  • Enable log reporting:
    You can also enable the log reporting.

STEP 2: Configure your data feeds with Facebook Product Feed

To create and configure your data feeds, go to:
CatalogFacebook Product FeedFeeds

 

 The grid lists all your data feeds and displays additional information: 

  1. Your data feeds are listed according to IDs.
  2. You can find the name of each file in the Filename field.
  3. The path of the file is displayed in the Path field.
  4. The link to the file is available in the Link field.
  5. After the data feed has been generated, you get a message that sums up the number of products exported, the time it took, and the number of errors and warnings in your data feed.
  6. The Status of your data feed will vary according to the situation:
         Pending: the data feed has never been generated or the scheduled hour is passed (waiting for the execution of the cron task)

         Success: successful generation of the data feed, manually or automatically (the generation corresponds with a schedule)
         Hold: in the process of generation (latency, indeterminate status)
         Processing: generation progression percentage
         Error: the generation is stopped

  7. You will also find the date and the hour of the last generation of the data feed in the Update field.
  8. The Store view taken into account for the data feed is also displayed in the grid.
  9. From the Action dropdown, you'll be able to:

         Edit
         Generate
         Preview (10 items)
         Delete

Click on Create new data feed to configure your data feed as you want.

The Tool Box

When creating a data feed, you should see a black box on the right of your screen. The Facebook Product Feed extension includes that tool to help you configure your feed and see what is wrong.

The toolbox is inevitably a very useful tool. This will help you to configure your data feed more quickly.

Below are the different options for the toolbox.

Library

If you click on that button, a library of your store attributes will be displayed. This makes it easier to find very quickly which attribute you need to add to your pattern.

Preview

When clicking on it, you'll see a preview of your data feed. It's very useful to see if the values of your attributes are correctly retrieved or if the filters you've defined are working as expected.

Report

You can get reports on the errors and warnings of your data feeds.

Errors and warnings will be displayed differently:

  • in orange will be displayed the warnings:Missing recommended attribute: brand
  • in red will be displayed the errors that you must correct to be able to submit your data feed:
    Missing required attribute: fb_product_category

Next to these errors or warnings, you should see the number of items that are concerned.

By default, the reports will give the 10 first examples (SKU) that are concerned with each error and warning. You can change that by editing the Items in preview in:
StoresSettingsConfigurationWyomindFacebook Product FeedCore Settings

After the data feed has been generated, you can also access the reports from the generation notification and from the data feeds grid, when clicking on "X errors, X warnings" in the Link column.

Configuration

In that first tab is the main configuration of the data feed. To customize your feed, you'll find several fields to fill in.

  • Name
    You can add a name to your data feed. 
    Facebook feed
  • Filename
    Enter a name for the file.
    FacebookShopping_basics.xml
  • Path
    Define the path where you want the data feed to be generated. 
    /feeds/
  • Store View
    Define the store view that is concerned.
    Default Store View
  • Website URL
    Add your website URL.
    http://www.example.com
  • Title
    Add a title to your feed.
    Full data feed for Facebook
  • Description
    Add a description to your data feed.
    Main feed for Facebook.
  • XML pattern
    This is probably the most important field as this is where you will configure your pattern.

For a good understanding, check how to manage your data feed templates.

Categories filter type

You can filter your categories according to two different ways:

  • Exclude all products from the selected categories.
  • Include all products from the selected categories.
Note that if you don't select any category, all products will be exported.

You are able to include or exclude your categories depending on:

  • Parent categories only
    In the case where you have a configurable product with simple variants associated. The configurable has a category assigned but not the variants.
  • Product categories only
    If you have categories assigned to simple variants but not to the configurable product.
  • Product and parent categories
    In the case where you have both situations.

Include

For example, if you wish to include only products of the Gear category, you can check the Include option that will allow you to include all categories that you have selected.

Exclude

You can also check the Exclude option that will exclude all categories that you have selected.

Category selection and mapping

In that subtab, you can select and map your categories to Facebook ones. This step is very important so that Facebook can make a link between their product categories and yours.

What is the category mapping?

The Facebook product taxonomy is a tree of categories that will help you generate values for the Facebook product category attribute listing all possibilities.

Categories names you are using in your Magento aren't always the same as the ones used by Facebook to reference your products.

This means you have to find out which Facebook categories have the best matching with yours, according to the Facebook product taxonomy.

How to map your categories to Facebook ones? 

Facebook Product Feed provides you with an easy way to input Facebook product categories that are matching yours.

In your data feed configuration, go to the Categories tab. Then, in the Category selection and mapping section, you'll find a tree view of all your categories.

First, select the Facebook Taxonomy source on which the category mapping is based.

Taxonomy files for the main countries are directly included in the extension to allow you to map your categories more easily. You can also have a look at the below documentation to know how to add a new taxonomy file.

 

For each category, you have a little arrow followed by mapped as.

There, you'll be able to start typing a keyword in order to display a list of all categories including that keyword. You simply need to select the one you need.

If your press the End key of your keyboard after typing a category mapping, the value will apply to all sub-categories.

Once all your categories are mapped, you can click on the Save button.

Here are a few guidelines for choosing the most appropriate category:

  • Use the category that best describes your item. To do this, first determine the primary function of the products you are submitting. For specific items like MP3 Players, select the MP3 Players category. While some MP3 players can also serve different functions, like those that contain a clock, they are primarily MP3 Players.
  • Use only one category. For some products, more than one category might be relevant. For example, an adapter to allow an MP3 player to be used in a car could be in both categories Motor Vehicles > Audio & Video and Electronics > Audio > Audio Accessories > MP3 Player Accessories. In such cases, choose the category that seems the most appropriate to you, but don't include more than one.
  • Use the most specific category possible. Being specific will help improve your data quality and in turn ensure that offers are presented in the right category. When viewing the taxonomy, try to navigate to the most specific category that still covers all the products being submitted. For instance, if you are submitting MP3 player chargers use the category MP3 Player Chargers . Conversely, if you are submitting multiple types of chargers use the category Chargers.

How to add the Facebook category to the XML template?

Finally, so that the Facebook category is retrieved in your data feed, you must add the following attribute to the XML template:

<g:fb_product_category>{{product.fb_product_category}}</g:fb_product_category>
Please note that this attribute is different from Product Type. <g:product_type> is for the categories that you have defined independently in your Magento back-office.You can easily fill this XML section using {{object.categories}}. This will then retrieve for each one of your products, the category you have assigned to it.

How to add a taxonomy file?

With Facebook Product Feed, you have the possibility to change the file on which the category mapping is based.


Taxonomy files for the main countries are directly included to allow you to map your categories more easily but you can also add a new taxonomy file.

From that page, choose the language you want to use from the Facebook product categories by language section. Then, click on the Plain Text link that contains full category names.

Paste that file in:
Magento 2 Root DirectoryappcodeWyominDFacebook Product FeeddataFacebookTaxonomies

Don't forget to apply the permissions 644 to the file.

You'll then be able to choose that specific taxonomy from your data feed configuration.

Filters

Facebook Product Feed for Magento 2 also allows you to filter your products on several levels according to their attribute sets or their visibility for example.

Product Type

First of all, you can choose to include products in your feed according to their type. For example, only include simple products.
Include simple products only.

Attribute Set

You can include the attribute sets you want. 
Include all attribute sets.

Product Visibility

Then, choose the products that will be included in the feed between the products that are not visible individually, products from the Catalog, the Search results, or both. 
Include all products.

Advanced Filters

In the Advanced filters, you can go further by setting more personalized filters. 
Include only products with a price higher than 0, and an SKU that is not null.

Here again, you have the possibility to configure your advanced filters according to several options.

  • LIKE / NOT LIKE

a name like %shirt: will include all products which name ends with 'shirt'.
name like Apple%: will include all products which name starts with 'Apple'.
name like %women%: will include all products which name contains the 'women' character string.

name not like %shirt: won't include any product which name ends with 'shirt'.
name not like Apple%: won't include any product which name starts with 'Apple'.
name not like %women%: won't include any product which name contains the 'women' character string.

  • IS NULL / IS NOT NULL

Special price is null: will include all products that don't have special prices. SKU is not null: will include all products which SKU is not null.

  • IN / NOT IN

Size in S L: will include only products from these 2 sizes. 

Size not in S L: will include all products which size is not S or L.

You can activate the AND/OR statement in the Core Settings from:
StoresSettingsConfigurationWyomindFacebook Product Feed

Cron Schedule

Facebook Product Feed for Magento 2 provides you with a fully configurable schedule in the Cron Schedule tab of each data feed pattern configuration.

You just have to tick the days and hours when you want your data feed to be generated.

If you're facing some difficulties with scheduled tasks, or if you think your data feed is not automatically generated, have a look at our faq.

Note

Use the Note field to add any information you find useful. This is an internal note. 

Action History

In the Action History tab, you can find a history of your previous generations and configurations. 

You'll find: 

  • ID
    It is the ID of the history line. 
  • Version ID
    It is the ID of the data feed configuration version.
  • Origin
    The origin of the action can be: Backend / Cron / CLI / API
  • Username
    It is the name of the user behind the action.
  • Action
    The available actions are: create / generate / update / delete
  • Details
    If you click on More details, you can see the detail of the data feed update from a grid.

    If you click on a line of the above grid, you can check the detail in a popup.
  • Date
    It is the date of the modification.

STEP 3: Generate and download the data feeds

Generate the data feeds manually

Facebook Product Feed allows you to generate the data feeds manually or automatically. 

Manually

You can generate your data feeds manually from the action dropdown of the data feeds grid. 

You also have the possibility to do it from the data feed configuration panel by clicking on Generate

With the cron tasks

In order to automatically generate the data feeds through the cron tasks, you must first make sure that the main cron task is enabled on your server.

Data Feed Manager - Cron Success

If not, you should see a warning message in Facebook Product Feed.

Then, you need to select a least one day and one-time frame from the Cron schedule tab for each data feed that must be updated.

Generate the data feeds through CLI

You can easily use the Command Line Interface to generate the data feeds.

To generate all the data feeds:

bin/magento wyomind:facebookproductfeed:generate


To generate one data feed from a given id:

bin/magento wyomind:facebookproductfeed:generate int DATA_FEED_ID


To generate several data feeds from a given list of ids:

bin/magento wyomind:facebookproductfeed:generate  int DATA_FEED_ID [, int DATA_FEED_ID] [, int DATA_FEED_ID]...


To list all data feeds including status, name, last update:

bin/magento wyomind:facebookproductfeed:list

Download the generated data feed

When a data feed is ready to be downloaded, the link is displayed in both, the data feed grid and the data feed page at the top of the page. To download the data feed, select Save link as after a right-click on the link. You should also find the file in your ftp client if the directory where the data feed is stored is not publicly accessible.

Note that the random parameter at the end of the URL avoids caching issues when you download the data feed from your Magento

Manage your data feed templates with Facebook Product Feed

10 Things to know when creating an XML data feed with Facebook Product Feed

  1. An XML data feed is using opening and closing tags that include a value.
    <g:id>123456</g:id>
    <price>45.99 USD</price>​

  2. A data feed template is made of several tags including dynamic or fixed values.
    <g:id>{{product.sku}}</g:id>
    <g:brand>Fixed Brand</g:brand>

  3. Dynamic values are called variables and use the attribute codes of your Magento website preceded with the object. The variable must be enclosed using double brackets.
    <g:id>{{product.sku}}</g:id>
    <price>{{parent.price}}</price>

  4. Between every opening and closing tags, you can also include some fixed values. Fixed values are simply text.
    <g:brand>YOUR BRAND</g:brand>

  5. You have also the possibility to add several variables and fixed values in the same tag.
    <title>{{parent.name}}, available in {{product.color}} for only ${{product.price}}</title>

  6. Some Magento 2 attributes like price, image, or URL may have further configuration options or parameters that will correspond to your specific data feed needs.
    <price>{{product.price currency=EUR vat_rate=20}}</price>​

  7. You're allowed to use PHP code if you want to customize the pattern. Check how to add PHP scripts into your patterns.
    <tag>{{product.name output="wyomind_strtolower($self)"}}</tag>

  8. The syntactic coloration in Facebook Product Feed will also help you to avoid many errors in your pattern.
  9. You can use one or more fallback variables in case of the previous is empty or null. If attributeA exists then the value will be attributeA, otherwise, the value will be attributeB...
    {{product.color | product.colour}}​

  10. CDATA is recommended. CDATA stands for Character Data. It means that the data in between these tags include data that could be interpreted as XML markup, but should not be (Wikipedia article).
    <description>
    <![CDATA[<p>Fantastic <b>Watch</b>, that not only tells you what time it is,but also gives the weather trends</p>]]>
    </description>​

How is a variable structured?

To modify your pattern as you want, before anything you need to respect a particular syntax. Indeed, in order to retrieve attributes, the Facebook Product Feed extension uses a specific structure. Then it is essential that you know how the variable is built to be able to configure your data feed according to your needs.

The above screen details the different components of a variable.

  • object
    Defines what is the target for the attribute to retrieve. It can be a simple product, a parent, configurable, bundle or grouped one.  
  • attribute
    Defines the code of the attribute to retrieve. For example, the price, the URL...
  • parameters
    Defines some additional parameters for specific attributes such as the currency or the VAT rate.
  • value
    Defines the different values available for the previous parameter.

Attribute specifications

The data feed pattern is totally customizable.

Any of the basic attributes in Magento 2 can be used in the data feed pattern. You can also add the attributes that you have created from the back-office.

OBJECTS

In order to retrieve the value of an attribute, you need to define which object is targeted. Below are the different types of objects that you can use.

{{product.attribute_code}}

Retrieves the attribute for the product.

For example:

{{product.sku}}
{{product.color}}

{{parent.attribute_code}}

Retrieves the parent attribute value.

The parent value is retrieved only if the simple (item) product is associated with a parent product, if not, nothing is retrieved.

The parent product may be a configurable, a grouped or a bundle product. The first parent product that matches the simple product is used to get the attribute value.

For example:

{{parent.product_type}}
{{parent.brand}}

{{configurable.attribute_code}}

Retrieves the first configurable parent attribute value.

The configurable product value is retrieved only if the simple product is associated with a configurable product, if not, nothing is retrieved.

For example:

{{configurable.image_link}}
{{configurable.url}}

{{grouped.attribute_code}}

Retrieves the first grouped parent attribute value.

The grouped product value is retrieved only if the simple product is associated with a grouped product, if not, nothing is retrieved.

For example:

{{grouped.fb_product_category}}
{{grouped.url}}

{{bundle.attribute_code}}

Retrieves the first bundle parent attribute value.

The bundle product value is retrieved only if the simple product is associated with a bundle product, if not, nothing is retrieved.

For example:

{{bundle.sale_price}}
{{bundle.price}}

PRODUCT IDENTIFIERS

You'll find below the attributes most commonly used to identify the products in data feeds patterns.

{{object.sku}}

Retrieves the SKU of the product.

For example:

{{product.sku}}

{{object.brand}}

Retrieves the brand of the product.

For example:

{{product.brand}}
Attention, this attribute is an example and can differ according to the configuration of your Magento 2 store.

{{object.manufacturer}}

Retrieves the brand of the product.

For example:

{{product.manufacturer}}

BASIC INFORMATION

You'll find below the attributes that are generally used to define basic information of products in the data feeds.

{{object.name}}

Retrieves the name of the product.

For example:

{{product.name}}

{{object.description}}

Retrieves the description of the product.

For example:

{{product.description}}

{{object.short_description}}

Retrieves the short description of the product.

For example:

{{product.short_description}}

{{object.condition}}

Retrieves the condition of the product.

For example:

{{product.condition}}

{{object.weight}}

Retrieves the weight of the product.

For example:

{{product.weight}}

PRICES AND PROMOTIONS

Below is a list of the price attributes that you can use in your feed pattern. For most of them, you can add some parameters in order to define the currency used or the VAT to apply for example.

{{object.price}}

Retrieves the best price among all the prices defined.

If prices are exclusive of VAT and the product is liable to a unique VAT rate, the price retrieved will include this rate. Otherwise, the price exclusive of tax is retrieved.

For example:

{{product.price}}


You also have the possibility to use some parameters with this attribute:

  • currency = automatically converts the original product price to a specified currency. It uses an exchange rate that you have already stored in your admin panel. By default, your local currency is used.
  • vat_rate = is a floating value between 0.00 and 100.00 that represents an arbitrary VAT rate to apply. This parameter rewrites the VAT rule for the product except if the product doesn't have any tax class.


Here are some examples:


To convert the prices to EUR and apply a 20% VAT rate:

{{product.price currency=EUR vat_rate=20}}


To convert the prices to USD and not apply any VAT rate:

{{product.price currency=USD vat_rate=0}}


If the prices of your catalog are already including VAT:

{{product.price currency=USD}}


To use an ISO2 code corresponding to one of the countries for which you specified a VAT rate in your tax settings:

{{product.price currency=EUR vat_rate=FR}}


This code may also be completed by an area code:

{{product.price currency=USD vat_rate=US/NY}}


To deduce the VAT corresponding to a country/area:

{{product.price currency=GBP vat_rate=-GB}}


To retrieve prices including different price values for simple products associated to a configurable one:

{{parent.price currency=EUR vat_rate=20}}

{{object.normal_price}}

Retrieves the base price and ignores any other existing price value.

For example:

{{product.normal_price}}
You also have the possibility to use some parameters with this attribute: see {{object.price}}

{{object.special_price}}

Retrieves the special price if exists. If this price doesn't exist the value is null.

For example:

{{product.special_price}}
You also have the possibility to use some parameters with this attribute: see {{object.price}}

{{object.price_rules}}

Retrieves the price including the catalog price rules if indicated, if not, nothing is retrieved.

If prices are exclusive of VAT and the product is liable to a unique VAT rate, the price retrieved will include this rate. Otherwise, the price exclusive of tax is retrieved.

For example:

{{product.price_rules}}
You also have the possibility to use some parameters with this attribute: see {{object.price}}

{{object.sale_price}}

Retrieves the best promotional between price rules and special prices).

For example:

{{product.sale_price}}
You also have the possibility to use some parameters with this attribute: see {{object.price}}

{{object.sale_price_effective_date}}

Retrieves the sale price effective date as: 
2011-03-01T13:00-0800/2011-03-11T15:30-0800

If no date is defined or if the dates defined don't match with the current date, the value is null.

For example:

{{product.sale_price_effective_date}}

{{object.has_special_price}}

Retrieves either 1 if a special price exists or 0 if not.

You also have the possibility to use some parameters with this attribute:

  • yes = value to retrieve if a special price exists. By default 1.
  • no = value to retrieve if no special price exists. By default 0.

For example:

{{product.has_special_price yes="Special price" no="No special price"}}

{{object.has_sale_price}}

Retrieves either 1 if a promotional price exists or 0 if not.

You also have the possibility to use some parameters with this attribute:

  • yes = value to retrieve if a promotional price exists. By default 1.
  • no = value to retrieve if no promotional price exists. By default 0.

For example:

{{product.has_sale_price yes="Sale price" no="No sale price"}}

{{object.min_price}}

Retrieves the minimum price.

This attribute is used for configurable, bundle, or grouped products.

If prices are exclusive of VAT and the product is liable to a unique VAT rate, the price retrieved will include this rate. Otherwise, the price exclusive of tax is retrieved.

For example:

{{product.min_price}}
You also have the possibility to use some parameters with this attribute: see {{object.price}}

{{object.max_price}}

Retrieves the maximum price.

This attribute is used for configurable, bundle, or grouped products.

If prices are exclusive of VAT and the product is liable to a unique VAT rate, the price retrieved will include this rate. Otherwise, the price exclusive of tax is retrieved.

For example:

{{product.max_price}}
You also have the possibility to use some parameters with this attribute: see {{object.price}}

Below are listed the attributes that are generally used to retrieve any kind of link.

{{product.url_config}}

Retrieves URL to pre-select the simple product attributes from its configurable.

For example:

{{product.url_config}}

{{object.url}}

Retrieves the product’s canonical absolute URL.

For example:

{{product.url}}

Retrieves the product’s main image.

You also have the possibility to use some parameters with this attribute:

  • index = index of any additional images to retrieve. By default 0 (the main image).

For example:

{{product.image_link index=2}}

{{object.host}}

Retrieves the host url, for example https://www.website.com.

Example with the small_image attribute:

{{product.host}}/media/catalog/{{product.small_image}}

{{object.uri}} or {{object.url_key}}

Retrieves the product canonical relative url.

For example:

https://www.mywebsite.com/mystore_code/{{product.uri}}

CATEGORIES

To retrieve the categories of your products, you can check the below attributes.

{{object.categories}}

Display the category paths in which the product may be found.

All category paths are listed under the categories attribute from the shortest to the longest path as in the below example:

  1. Default Category
  2. Default CategorySales
  3. Default CategoryClothes
  4. Default CategoryClothesMen
  5. Default CategoryClothesMenPants
  6. Default CategorySalesSpring and Summer Sales


In order to display a specific category path you have the possibility to use some parameters with this attribute:

  • nth: display the nth category path, if not specified the 1st category is used by default. Negative values are allowed.
  • from: display a category path starting from the nth category level, if not specified the 1st category level is used by default. Negative values are allowed.
  • length: display a category path limited to the given number of category levels, if not specified the whole path is displayed by default.
  • separator: the character used to separate each category level.

For example:

{{product.categories nth="1"}}

Shows the first category path : Default Category

{{product.categories nth="-1"}}

Shows the last category path: Default CategorySalesSpring and Summer Sales

{{product.categories nth="3" separator="-"}}

Shows the 3th category path and change the category levels separator to "-":  DEFAULT CATEGORY - CLOTHES

{{product.categories nth="-2"}}

Shows the before last category path: Default CategorYClothesMenPants

{{product.categories nth="-2" from="2"}}

Shows the before last category path from the 2nd category level: ClothesMenPants

{{product.categories nth="-1" from="-1"}}

Shows the last category path from the last category level: Spring and Summer Sales 

   

{{product.categories nth="-2" from="2" length="1"}}

Shows the before last category path from the 2nd category level with only one category level: Clothes

{{object.category_mapping}}

Retrieves any new category that you have assigned (in the Categories tab) to the item’s own product category. If no mapping is assigned to the first category found, the second category will be used etc…

You also have the possibility to use some parameters with this attribute:

  • index = index of the category mapping


For example:

{{product.category_mapping index=0}}
{{product.category_mapping index=1}}
{{product.category_mapping index=2}}
{{product.category_mapping index=3}}
{{product.category_mapping index=4}}

This will retrieve a maximum of 5 category mappings in 5 separate tags.

{{object.fb_product_category}}

Retrieves the Facebook category that you have assigned (in the Categories section) to the first category found for the product (index 0).

To find the Facebook categories that match with your categories: https://www.facebook.com/business/help/526764014610932?id=725943027795860

For example:

{{product.fb_product_category}}

AVAILABILITY

The below attributes are often used to retrieve the availability of your products, for example, the quantity.

{{object.qty}}

Retrieves the available quantity.

The quantity retrieved for configurable products is based on the sum of simple products.

You also have the possibility to use some parameters with this attribute:

  • float = is the number of decimals.

For example:

{{product.qty float=2}}

{{object.availability}}

Retrieves either "in stock" if the product is in stock, "out of stock" if the product is out of stock, or "available for order" if the product is backorderable.

You also have the possibility to use some parameters with this attribute:

  • in_stock = value to retrieve if the product is in stock
  • out_of_stock = value to retrieve if the product is out of stock
  • backorderable = value to retrieve if the product is backorderable
The availability depends not only on the stock status but on the quantity available as well.

For example:

{{product.availability in_stock="In Stock" out_of_stock="No more Stock" backorderable="Can be ordered"}}

{{object.is_in_stock}}

Retrieves either "in stock" if the product is in stock, "out of stock" if the product is out of stock.

You also have the possibility to use some parameters with this attribute:

  • in_stock = value to retrieve if the product is in stock
  • out_of_stock = value to retrieve if the product is out of stock
This attribute depends only on the stock status and doesn't take into account the quantity available.

For example:

{{product.is_in_stock in_stock="In Stock" out_of_stock="No more Stock"}}

PRODUCT VARIANTS

In the case where you're using product variations (color, size or gender) then you can use the following attributes. Attention, these attributes are examples and can differ according to the configuration of your Magento 2 store.

{{object.gender}}

Retrieves the gender of the product.

For example:

{{product.gender}}

{{object.age_group}}

Retrieves the age group of the product.

For example:

{{product.age_group}}

{{object.color}}

Retrieves the color of the product.

For example:

{{product.color}}

{{object.size}}

Retrieves the size of the product.

For example:

{{product.size}}

{{object.material}}

Retrieves the material of the product.

For example:

{{product.material}}

{{object.pattern}}

Retrieves the pattern of the product.

For example:

{{product.pattern}}

GENERAL PARAMETERS

Below are listed all the parameters that you can use with any attribute in your data feeds.

{{object.attribute prefix="value"}}

The prefix is what will be displayed before the attribute value only if it is not null, otherwise, nothing is retrieved.


Below are some examples:


To add the currency symbol before the price and not retrieve anything when the value of the attribute is null:

{{product.price currency=USD vat_rate=0 prefix="$"}}


To add the weight unit before the attribute value and not retrieve anything when that value is null:

{{product.weight prefix="LBS "}}

{{object.attribute suffix="value"}}

The suffix is what will be displayed after the attribute value only if it is not null, otherwise, nothing is retrieved.


Below are some examples:


To add the currency code after the price and not retrieve anything when the value of the attribute is null:

{{product.price currency=USD vat_rate=0 suffix=" USD"}}


To add the weight unit after the attribute value
and not retrieve anything when that value is null:

{{product.weight suffix=" LBS"}}

{{object.attribute as="myVariable"}}

The as parameter allows you to store the value of a given attribute into a variable for a later use in one of your PHP script or in a condition (see if parameter).
Notice, the attribute call even if it uses the as parameter will produce an output in the data feed expect if you add the output attribute with the value null (see output parameter)


Here are a few examples:


Display the product name and store the value in a variable $name:

<!-- Product name is displayed and stored under a new variable "name" -->
<name>{{product.name as="name"}}</name>

$name can be then used in a PHP script latter in the template

<?php
/* If variable $name is equal to "Apple", then display "Apple" then display "Banana" 
*/
if($name=="Apple") return $name;else return "Banana";
?>


Store the visibility of a product and use it in a condition for another attribute

<!-- Product visibility is stored under a new variable "visibility" and the attribute doesn't display -->
{{product.visibility as="visibility" output="null"}}
<!-- If the product is not visible individually (1) then we display the parent product url, otherwise we use the product url--> 
<url>{{parent.url if="visibility==1" | product.url}}</url>

{{object.attribute if="condition"}}

The if parameter allows you to define one or more necessary conditions to display the given attribute in the data feed.

One condition is built with 3 items :

  • the variable to check :
    a product attribute
    a variable previously stores thanks to the as parameter (see as parameter)
  • the comparison statement
    == equal
    <= lower or equal to
    => hieght or equal to
    < lower than
    > higher than
    != different from
  • the value


Example:

<!-- Product description will be displayed only if product brand is equal to "Apple" -->
<name>{{product.description if="product.brand==Apple"}}</name>
<!-- Product weight will be displayed only if the product is not virtual AND not downloadable-->
<weight>{{product.weight if="product.type_id!=virtual" if="product.type_id!=downloadable"}}</weight>

{{object.attribute output="functions"}}

The output parameter allows you to define the output format for a given attribute.

You can use the basic functions (see basic functions), the advanced functions (see advanced functions), or any PHP functions.


You must refer to the attribute by using the $self variable as the function's parameter.

Example :

<!-- Get the product name with the first letter of each word in uppercase -->
<name>{{product.name output="ucwords($self)"}}</name>


If you want to use several functions, those must be imbricated as you do with PHP:

Example :

<!-- Remove all html tags from the description and limit the description to the first 100 characters -->
<name>{{product.description output="substr(strip_tags($self),0,100)"}}</name>


You can also use null to display an empty string or you can use any string to display a specific message:

Example :

<!-- If product price is lower than $10 then display "Free Shipping"-->
<shipping_cost>{{product.price if="product.price<10" output="'Free Shipping'"}}</shipping_cost>

{{object.attribute php="functions"}}

The php parameter acts exactly like the output parameter.

BASIC FUNCTIONS

You can use any of the native PHP functions, as well as all of the following ones with the default attributes that are defined in your Magento 2 back-office and also any attribute you have defined for your products (eg: name, description, short_description, weight, size, color…) apart from those which generate XML.


The syntax to use in order to include PHP functions in the variables is:

{{object.attribute output=”function(parameters)”}}


You can also apply one or more functions to all of these attributes by using the following syntax:

{{object.attribute output=”function1(function2(function3($self,parameters)))”}}


All options are executed in the written order:

<title>{{product.name}}</title>
<title>{{product.name output="wyomind_strtoupper($self)"}}</title>
<title>{{product.name output="wyomind_strtoupper(wyomind_substr($self,20,'...'))"}}</title>

This will produce:

<title>Affirm Water Bottle</title>
<title>AFFIRM WATER BOTTLE</title>
<title>AFFIRM WATER...</title>

float($self,$decimal)

Converts a numeric value to a floating number.

You need to define some parameters:

  • decimal = number of floating number. By default: 0

For example:

<g:shipping_weight> {{product.weight output="float($self,2)"}}kg </g:shipping_weight>

cleaner($self)

Removes all characters that don't belong to the UTF-8 charset.

For example:

<g:title>{{product.name output="cleaner($self)"}}</g:title>

inline($self)

Removes all EOL characters from the value.

For example:

<description> {{product.description output="inline($self)"}} </description>

IMPROVED FUNCTIONS

The improved functions are used in the same way as the basic PHP functions but offer more possibilities. They are a rewrite of the native PHP functions but have been improved for a specific use of the Facebook Product Feed extension.

wyomind_strtoupper($self)

Transforms the value to uppercase.

For example:

<g:title>{{product.name output="wyomind_strtoupper($self)"}}</g:title>

wyomind_strtolower($self)

Transforms the value to lowercase.

For example:

<tag>{{product.name output="wyomind_strtolower($self)"}}</tag>

wyomind_implode($separator,$self)

Joins all array elements in a string.

You need to define some parameters:

  • separator = string used between each value. By default: ,

This function may be useful for multi-select attributes like climate, activity general...

For example:

<activity> {{product.activity_general output="wyomind_implode('-',$self)"}} </activity>

Will give: Outdoor-Running-Warmup-Lounge-Gym

wyomind_html_entity_decode($self)

Converts all HTML entities to their applicable characters.

For example:

<description> {{product.description output="wyomind_html_entity_decode($self)"}} </description>

wyomind_strip_tags($self)

Removes all HTML tags.

For example:

<description> {{product.description output="wyomind_strip_tags($self)"}} </description>

wyomind_htmlentities($self)

Converts all applicable characters to HTML entities.

For example:

<description> {{product.description output="wyomind_htmlentities($self)"}} </description>

wyomind_substr($self,$length,$end)

Truncates the value.

You need to define some parameters:

  • length = maximum length of the value
  • end = string that will be added at the end of the string. By default: ...


For example:

<description> {{product.description output="wyomind_substr($self,50,'...')"}} </description>


If there are HTML tags in your descriptions, you may need to use in combination with this function:

<description> {{product.description output="wyomind_strip_tags(wyomind_substr($self,50,'...'))"}} </description>

Replacement rules

Facebook Product Feed allows you to control your data feeds by using replacement rules.

Create a replacement rule

You can create your own rule from:
CatalogFacebook Product FeedReplacement Rules

Click on Create new Rule

Create a replacement rule manually

You can create your own rule manually.

Fill in a code and add the values you need to replace in the Input column with other values in the Output column. 

For example, the below example shows how to replace each "Summer 2019" with "Summer 2021",  "Winter 2019" with "Winter 2021", and all the rest with "This season". 

Note that you have the possibility to use regular expressions. 

Import a rule set from a CSV file

You also have the possibility to import a rule set directly from a CSV file. 

For that, you must save the replacement rule first.

Then, click on Import a rule set from a CSV file.

Select and Import your CSV file.

The CSV file must be composed of 2 columns, the first one for the values to replace and the second one for the replacement values.

These values must be separated by commas and enclosed by quotation marks.

"Winter 2017","Winter 2021"
"Winter 2018","Winter 2021"
"Winter 2019","Winter 2021"
"Winter 2020","Winter 2021"
"Summer 2017","Summer 2021"
"Summer 2018","Summer 2021"
"Summer 2019","Summer 2021"
"Summer 2020","Summer 2021"

Once the lines have been imported, you receive a notification. 

Use a replacement rule in your profile

Add a replacement rule in your data feed

Once your rule is saved, you can use it in your data feed from:
CatalogFacebook Product FeedFeeds

For the attribute on which you want to apply the rule, add the following code: 

replacement="name of the replacement rule"

 

For example:

<season>{{product.season replacement="season"}}</season>

Output the replacement rule value

If you click on Preview from the blackbox, you should see the replacement rule value applied. Below is an example with and without the replacement rule. 

API PHP for Facebook Product Feed

With Facebook Product Feed you can use PHP scripts in different ways to fully customize and control the data feed output.

  • Inline PHP scripts 
    Scripts that are added directly to the data feed template surrounded by PHP tags (<?php ... ?>).
    Those scripts are used with Data Feed Manager only.

API coding standards

The Facebook Product Feed PHP API uses the exact same syntax and standards as any PHP coding.

Attribute calls

For performance reasons, Facebook Product Feed only loads in the collection of products the attributes that are explicitly required in the data feed template.
This means that only the attributes that are called using the template placeholders, {{scope.attribute_code}}, will be added to the collection of products.

As a consequence, when you try to access the value of an attribute from the $product object, you must be sure that the attribute has been added to the collection.
Most of the time when the returned value is null for a given attribute, it means the attribute is not loaded in the collection of products.

The best way to be sure that all the attributes you need are well loaded in the collection, is to add at the beginning of your template a simple script that lists all the attributes required.

<?php
/* list of required attributes
* {{product.attribute_1}} {{product.attribute_2}} {{product.attribute_3}} {{product.attribute_4}}...
*/
?>


Then you should be able to get the values of these attributes in your PHP script:

<?php 
return $product->getAttribute1();
?>
<?php 
return $product->getAttribute2()
;?>
<?php 
return $product->getAttribute3();
?>
...

PHP functions in attribute calls

You can use any PHP function to apply in the attribute calls even if the function requires one or more additional arguments, for instance:

{{product.name output="str_replace('Apple','Banana',$self)}}


You can use several consecutive functions:

{{product.ean output="str_pad(str_replace('X','0',$self),10,'0',STR_PAD_LEFT)}}

Conditional values

To output values based on different conditions, use PHP conditional statements:

  • if/else
    <?php
    /* attribute {{product.sku}} required */ 
    if ($product->getSku()=="abc")
    {
    return "Alphabetic";
    }
    elseif($product->getSku()=="123")
    {
    return "Numeric";
    }
    else{return "Mixed";
    }
    ?>
  • switch/case
    <?php
    /* attribute {{product.sku}} required 
    */ 
    switch($product->getSku()){
    case "abc":
    return "Alphabetic";
    break;
    case "123":
    return "Numeric";
    break;
    default:
    return "Mixed";}
    ?>

Opening and closing tags

When using the PHP API inline directly in your data feed template, you must use the opening and closing PHP tags (<? php ... ?>)

<?php 
if($product->getData('size')=="X-Large") {return "XL";
}
?>

Outputting a value

Return
Any value that you want to output in your data feed, must be returned with the return instruction.

<?php 
return "Don't miss! ".$product->getTitle(); 
?>
/* This script adds for each product in data feed  a new ouput line
*  Don't miss! Iphone 5
*  Don't miss! Galaxy note 7
*  ...
*/

Variables scope

All variables available in PHP scripts have a local scope, this means they can't be shared between several scripts.

If you wish to share a variable with different scripts all along the data feed generation process, then the variable must be set as a global variable.

<?php global $increment;$increment++;return $increment;
/* This script will output a incremental $variable* 1* 2* 3* ...*
/?>

API Objects, Variables and Methods

Object $product

$product is an instance of Mage_Catalog_Model_Product. It contains all methods available by default and some other specific to Facebook Product Feed.

The list below includes the main methods available to use:

  • $product->getCategoriesArray()
    Retrieves an array of arrays that describes the categories to which belongs the products
  • $product->getCategoryIds()
    Lists all category ids in which the product may be found
  • $product->getVisibility()
    Returns the visibility of the product (1 = not visible individually, 2 = catalog, 3 = search, 4 = catalog and search)
  • $product->getStatus()
    Returns the status of the product (1 = enabled, 2 = disabled)
  • $product->getData($attributeCode)
    Returns the value of the given attribute code
  • $product->getAttributeText($attributeCode)
    Returns the textual value of the given attribute code

Object $this

$this is an instance of Wyomind_facebookproductfeed_Model_Feed.

It provides a few useful methods: 

  • $this->hasParent($product, $type="parent")
    Returns a Boolean value whether a product has a parent from the give type (parent, configurable, grouped, bundle) or not
  • $this->getParent($product, $type="parent", $strict=false)
    Returns a product object of the given parent type (parent, configurable, grouped, bundle) if available or the product object passed as 1st parameter when $strict parameter is set on false. 
  • $this->skip()
    Skips the current product, useful to filter out some products based on specific condition

Quickly export your product data to Facebook thanks to the powerful Facebook Product Feed extension for Magento® 2!

Create an XML data feed including all your catalog of products in one go using Facebook Product Feed.

  • Lifetime license
  • 12 months support & upgrade
  • 60 days money-back guarantee
  • Extensible source code
    Unlimited test domains
  • Free composer access
  • Marketplace approved
Want to know more?

Efficiently export your Magento® 2 products catalog to Facebook

Product types
Include all product types to your data feeds: simple, configurable, downloadable...

Multi-stores
Create multi-currencies and multi-VAT-rates data feeds for each one of your Magento® stores.

Create a data feed in compliance with Facebook requirements

Template
Start configuring your data feed very quickly using the 27 sample XML templates included with the extension.

Library
Find any attribute you're looking for in the attributes library.

Reports
Fix your data feed errors thanks to the errors and warnings reports.

Preview
Preview your data feeds from the black box and use the syntactic helper to avoid any misprints.

Completely customize your data feed according to your products catalog

XML pattern
Configure your XML pattern by adding any Magento® 2 attributes.

PHP API
Add PHP scripts into your XML patterns.

Category filter
Filter your products according to the product and/or parent categories.

Filters
Create filters based on the attribute sets, product types, and visibility.

Advanced Filters
Define more personalized filters using advanced filters.

AND/OR statements
Use OR/AND statements in your advanced filters.

Automatically and regularly send your updated data feed to Facebook

Cron tasks
Use the scheduled tasks to periodically generate your data feed.

Generation details
Check your data feed generation: number of items, time, and resource

Generation status
Ensure that your data feed is correctly generated thanks to the status.

Easily find the Facebook categories that correspond to yours

Category Mapping
Easily and rapidly map each one of your categories to Facebook ones.

Search As You Type
Facilitate your category mapping with the Search As You Type option.

This extension can be used in combination with: Data Feed Manager

Data Feed Manager
Export your products into CSV, TXT, and XML data feeds for any shopping engine!

Display your products on any marketplace and make the most of your data feeds thanks to Data Feed Manager for Magento® 2.

Are you interested in Data Feed Manager?

Freqently Asked Questions
Pre-sales informations

This extension works with Magento Community Edition and also Magento Enterprise Edition. To know if Facebook Product Feed is compatible with your Magento version, please check the Compatibility tab.

Magento offers three variations of its product.

As their names have changed over the past few years, here is a recap:

  • Magento Open Sourcepreviously Magento Community Edition (CE), is a free and non-hosted e-commerce platform.
  • Magento Commerce: previously Magento Enterprise (EE), is the paid version of Magento and offers support services.
  • Magento Commerce Cloud: is the paid version of Magento and offers support and hosting services.

All countries are supported (tax rates and currencies) by Facebook Product Feed.

You just need to edit the data feed for the targeted country.

You may also have to use the appropriate currency when using prices attributes.

Any currency can be managed in your data feeds.

You can define a different currency for each data feed using currency codes.

This will automatically convert the prices into the indicated currency.

The char encoding of the generated data feed is UTF-8 for Facebook Product Feed. It allows the use of special characters, such as accented letters, but also Arabic and Chinese letters.

If you're using Data Feed Manager, the default char encoding is UTF-8, while no char encoding is specified in the XML header.

Facebook Product Feed has been tested successfully on {{platform}} shops containing more than 70,000 products.

Remember that the generation and export time for any quantity of products will depend on your server capacity. Generally, exporting a data feed with 10,000 products shouldn't take more than 2-3 minutes on a standard shared server.

License and domains

A license is valid for an unlimited period of time on one single installation

  • If you're using more than one installation, you will have to buy a separate license for each instance.
  • if you're running several domains on a same installation, you will need only one license for all of them.
Although your license doesn’t have a limited period of validity, your Support & Upgrade period does. By purchasing a module, you’ll be granted a 12-month support period for free. Passed this period, you will have to pay for a new one (see FAQ: Extend your Support period)

You can pre-register your live domain to your license in advance.

Thanks to this option, you'll be able to get the module ready to use on your domain before it goes live.

To pre-register your production domain: 

  1. Go to:
    mY accountLicenses & DOwnloads
  2. Click on the Settings icon next to the module you want your domain to pre-register on.
  3. Click on the link at the bottom of the page saying:
    Do you want to pre-register your domain in order to be ready to go live?
  4. Finally, enter your domain name and click on pre-register now .

Attention, this doesn't mean your license is activated. You'll still have to activate it on your new domain when the module is installed. 

One license is valid for an unlimited period of time on one installation only. However, it is possible to extend or transfer your license in 2 cases: 

  • If you would like to add your testing environments to your license. 
    In that case, it is possible to extend your license to an unlimited number of domains for free.
    For  mywebsite-staging.com or mywebsite-dev.com
  • If you want to transfer your license to another live domain.
    In that case, the Support & Upgrade period for your license must still be active.

To be able to use Facebook Product Feed on both your production and testing environments, follow the instructions below:

  1. Download Facebook Product Feed.
    (see FAQ: Extensions download)
  2. Install Facebook Product Feed on your environment.
    (see FAQ: Modules installation in Magento or in WooCommerce)
  3. Activate the license.
    (see FAQ: Licenses activation in Magento or in WooCommerce)

Also, if you are managing a large amount of domains, please contact us so that we can automatically whitelist these domains.
Modules versioning and download

In order to download Facebook Product Feed, log into your Wyomind account:

    1. Go to:
      my accountLicenses & downloads 
    2. Click on the settings icon next to Facebook Product Feed.

      A new window opens.

    3. Click on the download icon.

 

Only the latest extension version released within your Support & Upgrade period is available. In order to get the very latest extension version make sure your Support & Upgrade plan is up to date.

When purchasing a module from wyomind.com, you benefit from 12 months of upgrade. Within this period you can at any time download the latest version of the module directly from your account.

To upgrade Facebook Product Feed, follow the steps below:

  1. Go to:
    my accountLicenses & Downloads
  2. Click on the settings icon next to Facebook Product Feed.
  3. Click on the download icon.
  4. Install the new version of Facebook Product Feed in your Magento admin or your WooCommerce back-office.

Modules Installation/Uninstallation

You can install Facebook Product Feed manually.

  1. Download Facebook Product Feed (zip file) on:
    mY ACCOUNTLicenses & Downloads
     
    Refer to the FAQ: Extensions download
  2. Once Facebook Product Feed is downloaded, open the folder and unzip it.
  3. Copy the content of the unzipped folder and paste all files and directories in your Magento 2 root directory.
  4. In your Command Line Interface, execute:
    bin/magento setup:upgrade 

    If you are using a production mode, execute also:

    bin/magento setup:static-content:deploy  
    bin/magento setup:di:compile  

You can install Facebook Product Feed using Composer software in two cases:

  • if you purchased Facebook Product Feed on Magento Marketplace.
  • if you purchased Facebook Product Feed on Wyomind.com AND requested access to our repository:
    repo.wyomind.com
  1. Add to your composer configuration our repository:
    composer config repositories.wyomind composer https://repo.wyomind.com 

  2. Execute Composer command:
    composer require wyomind/facebookproductfeed
  3. Then go in your Command Line Interface and execute:
    bin/magento setup:upgrade ​
  4. If you are using a production mode, also execute:
    bin/magento setup:static-content:deploy  ​
    bin/magento setup:di:compile​

To uninstall Facebook Product Feed, start with disabling the extension running the following command:

bin/magento module:disable Wyomind_FacebookProductFeed

Then, you have 2 ways to uninstall the extension depending on how the extension has been previously installed: 

  • Manual installation

    Run the facebookproductfeed-uninstall.sh file (you can find it in the extension zip folder) from your Magento root directory:

    sh facebookproductfeed-uninstall.sh

     

  • Installation via Composer

    Run the below command line:

    composer remove wyomind/facebookproductfeed

Once the uninstallation is over, refresh your cache and enable the compiler back again (if you use it). 

You can install Facebook Product Feed via Web Setup Wizard if you purchased it from Magento Marketplace only.

To know how to proceed, all steps are described in the link below: 
http://docs.magento.com/m2/ce/user_guide/system/component-manager.html

Next step is to activate your license:
Extension activation

Modules activation

Once Facebook Product Feed is installed, you have to activate the license. For previous versions, you can activate the license from your back-office:

    1. Go to your Magento admin panel. A message pops up at the top of the page.


      If the message doesn't appear then you must check that:

         1. The Adminhtml_Notifications and Wyomind_Core modules are well enabled.
         2. The HTML output of the Adminhtml_Notifications and Wyomind_Core modules are not disabled in:
      storesconfigurationadvanced advanced
         3. The encryption key well exists in app/etc/env.php:
      <?php
       return array(
       'backend' => array(
       'frontName' => 'admin'
       ),
       'crypt' => array(
       'key' => '1e8f3c6772b7a6a6689c3c8cefa4ccf0'
       ),
       /* ... */
       )
      ?>​
    2. Copy your activation key in:
      StoresConfigurationWyomind Your extension

      You can find your activation key in 2 different places:
      In the confirmation email that you received after purchasing Facebook Product Feed.
      In your Wyomind account:My account Licenses & downloads
      Select Facebook Product Feed and click on  .

      A new page opens where you'll find your activation key (see below).


    3. In your Magento admin go to:
      StoresConfigurationWyomind Your extension

      Paste the activation key in the Activation Key field and choose between the automatic (yes) or the manual (no) activation method:
      By choosing Yes, the connection to Wyomind license server will be automatic.
      By choosing No, you will have to log on to Wyomind license server yourself.

    4. Click on Save config .
    5. A message appears at the top of your admin panel. Click on that link: 
      Activate it now!
    6. Copy and paste the license code in the License code field from your admin or simply click on Activate now! 


    7. Finally, refresh your cache, log out and log in back straight after, to complete the installation.

When the extension includes other modules, repeat the steps described above for each one, using the corresponding activation keys (each module has its own activation key).

Add another domain to your license


To activate the license on another domain (test, staging...):

  1. Once the extension is installed on the new domain, copy your activation key in:
    StoresConfigurationWyomind Your extension
  2. After having saved the configuration, a notification appears. Click on Add this domain to my license.

  3. A transfer request will then be sent to our team within an hour.
    Once the request is taken care of, you will receive a confirmation email.
    If your transfer request is accepted, you can use Facebook Product Feed on both environments at the same time.

Note that the order in which you activate your license on your domains does not matter. You can start with your staging/dev/local environment or with your live domain, the process will be the same.

Also, if you have loads of staging domains, or if you are an agency managing load of domains for your customers, please contact us so that we can automatically whitelist these domains.

Once Facebook Product Feed is installed, you have to activate the license.

For this, you can use the below command line (change the Activation key with the corresponding value):

bin/magento wyomind:license:activate Wyomind_FacebookProductFeed <YOUR_ACTIVATION_KEY>

To retrieve the list of all the available modules as well as the licenses status, please use:

bin/magento wyomind:license:status

 

 Among the different status, you can find: 

  • registered = your license is registered
  • pending = you need to run the activation command line
  • invalidated = the license has been invalidated due to a wrong activation key or a license infringement

 

To activate several licenses at the same time, use:

bin/magento wyomind:license:activate \
Wyomind_Extension1,Wyomind_Extension2 \
ACTIVATION_KEY_1,ACTIVATION_KEY_2

or:

bin/magento wyomind:license:activate \
Extension1,Extension2 \
ACTIVATION_KEY_1,ACTIVATION_KEY_2
Magento and Google accounts access

In the case where you've purchased the professional installation service, our team we will need the below information in order to proceed to the installation of the extension : 

  • a valid FTP access (host, login and password)
  • an access to your admin panel (url, login and password)
  • an SSH access (for Magento 2)

Feel free to create a ticket including the above info from your Wyomind account in Support, or contact us via the following form

So that our team can proceed with the configuration of your data feed, we need you to share the access to your Google Merchant account with us. 

As Google Partner, we offer you many possibilities to manage your products on Google. Feel free to check our Google Shopping services for more information about the data feed configuration.  

To share your access, go to your Google Merchant account. 

  1. Click on Users from the parameters on the top of your account. 
  2. Click on the +  icon to add a user and fill in our email address (contact us to see what email address you should use). 
  3. You can choose Standard as the user access.  

Note that you also need to share the access to your Google Ads account for us to configure your data feed. See how to share the access to your Google Ads account with us

So that our team can proceed to the configuration of your data feed, we need you to share the access to your Google Ads account with us.

As Google Partner, we offer you many possibilities to manage your products on Google. Feel free to check our Google Shopping services for more information about the data feed configuration.  

To share your access, go to your Google Ads account.

  1. First send us your account ID that you can find on top of your account next to your company name. We'll then be able to send you a request.  
  2. When it's done, you should have received an email. You can also check in the Managers section of your Google Ads account.
    There, you should see a request from Wyomind in your Link requests. Click on Accept from the Actions column.
     
  3. A confirmation popup is displayed, click on Grant Access.
  4. Once you've granted access, you should see Wyomind among your Managers.
     

Note that you also need to share the access to your Google Merchant account for us to configure your data feed. See how to share the access to your Google Merchant account with us
Data feed configuration

Facebook Product Feed provides you with a fully configurable schedule in the Cron Schedule tab of your pattern configuration for each data feed or profile.

So that it works, you need to have one main scheduled task running from your server side and targeting cron.php located in the pub directory of Magento 2 root directory (ideally every hour).

If the management panel from your hosting compagny doesn't provide such a service, you should be able to use a remote service such as: http://www.mywebcron.com

Facebook Product Feed also provides you with a cron job reporting, so that you can get email reports on each data feed or profile you're generating.

The Google and Facebook product taxonomies are category trees that will help you to generate values for the Google and Facebook product category attributes listing all possibilities.

  • Taxonomie Google: From that page, choose the language you want to use for your taxonomy at the bottom right. Then, in the Downloadable taxonomy, open the Plain Text link that contains full category names and save the file.



 

  • Taxonomie Facebook: From that page, choose the language you want to use from the Facebook product categories by language section. Then, click on the Plain Text link that contains full category names to download the file.


Paste the file in:

  • For Simple Google Shopping: Magento 2 > app > code > Wyomind > Simple Google Shopping > data > Google > Taxonomies
  • For Facebook Product Feed: Magento 2 > app > code > Wyomind > Facebook Product Feed > data > Facebook > Taxonomies

Don't forget to apply the permissions 644 to the file.

You'll then be able to choose that specific taxonomy from your data feed configuration.

You can use the OR operand with all these variables (without option) as in the example below:

{{object.proprietyA | object.proprietyB}}

If object.proprietyA exists then the value will be object.proprietyA, otherwise, the value will be object.proprietyB.

For example:

{{product.url | parent.url}}

There isn't any other operand of that kind.

In Magento 2, configurable products are in fact containers for the simple variant products. Then, their price will depend on the options that the customer has selected.

Unfortunately, as it's not possible to know in advance the choice of the customers, it is recommended to use the minimum or the maximum price in your data feeds. You can use one of the below attributes:

{{product.min_price}}
{{product.max_price}}

However, note that it's not recommended to send configurable products to Google. You can have a look at that faq.

To subtract the VAT from your catalog prices, in your pattern, you need to replace:

{{product.price}}

with:

{{product.price currency=USD vat_rate=0}} 

Replace USD with your own currency.

If the prices of your catalog are already including the VAT, then you can use:

{{product.price currency=USD}}

To apply a custom VAT to your products, you can replace:

{{product.price}}

with:

{{product.price currency=CUR vat_rate=0.00}}

Replace CUR with your own currency and 0.00 with a value between 0 and 100 that represents the VAT.

For example:

{{product.price currency=USD vat_rate=10}}

In your data feed, you get https://www.mywebsite.com/product but the correct URL is https://www.mywebsite.com/category/subcategory/product.

To retrieve the URL you want, you can define the options under:
Stores > Settings > Configuration > Wyomind > Facebook Product Feed

You'll be able to choose which URL path to use in Use canonical URLs.

You can choose between 3 options:

  • Individual product URLs
  • Shortest category URLs
  • Longest category URLs

For example, if you have a "T-shirt" in 2 categories: "New arrivals" and "Shirts", then depending on your configuration, you'll get different results:

  • Shortest category URL = mywebsite.com/men/shirts/t-shirt
  • Longest category URL = mywebsite.com/men/new-arrivals/t-shirt

The individual product URL won't include any category or subcategory.

Troubleshooting

This issue may be due to a problem during the installation process.

You will be able to fix it by following these steps:

  1. Access your database via your control panel (Phpmyadmin for example).
  2. From the setup_module table, delete the entry Wyomind_extension.
    Be careful, that entry depends on your extension. For example, if you have the extension called Simple Google Shopping, you should delete Wyomind_SimpleGoogleShopping.
  3. Logout from your Magento 2 admin.
  4. Log into your Magento 2 admin.
How do cron tasks work?
  • The cron.php file (available in the pub directory of your Magento 2 root directory) is regularly launched from your server side (generally every 5 minutes).
  • The cron task for Facebook Product Feed is targeted and evaluates if a data feed or a profile needs to be refreshed (depending on the timestamp stored in the database and on the schedule table for this specific profile).
  • If the above condition matches, then the data feed and the profile is re-generated.

Be sure that you have correctly configured a scheduled task from the server side (cpanel) targeting the cron.php file in your magento 2 installation.

The extension includes reporting and debug tools for the scheduled tasks available in:
StoresSettingsConfigurationWyomindFacebook Product Feed

For more information on the configuration of cron tasks in Magento 2, you can check their documentation.

The directory in which your data feed is stored must be writable (permissions 755). You should try to use another directory such as /media/ if /feeds/ is not properly set by changing the content of the Path field.

You must update the module by downloading and installing the module last version available from your Wyomind.com account.

You may have an incorrect character in your data feed description, for example, the & character.

In that case, you should replace the & character with and or enclose your data between CDATA as in the example below.

If when saving your data feed configuration in Magento 2, you get:

Forbidden, You don't have permission to access /.../ on this server.

This is probably something regarding the hosting company that doesn't allow to post XML in the form.

The mod_security (security module) includes rules that stop all post/get requests including code.

In order to fix that issue, you should get in touch with your hosting company so that they add some exceptions to the security rules.

If the characters of your data feed are not correctly displayed, you should first be sure you used special attributes that will clean your content:

{{product.description php="sgs_strip_tags(sgs_html_entity_decode(inline(cleaner($self))))"}}

If your data feed still doesn't display properly, maybe it's because you're trying to read it as an ISO file while Facebook Product Feed creates UTF-8 encoded files.

We recommend you read it with dedicated programs like Notepad++ or Firefox (with DisplayEncoding typeutf8 selected).

You must apply the permissions 644 to app/code/Wyomind/FacebookProductFeed/data/Facebook directory and all sub folders and files via FTP.

Magento 2 Compatibility

Magento 2® Open Source

  • 2.0
  • 2.0
  • 2.0.1
  • 2.0.1
  • 2.0.2
  • 2.0.2
  • 2.0.3
  • 2.0.3
  • 2.0.4
  • 2.0.4
  • 2.0.5
  • 2.0.5
  • 2.0.6
  • 2.0.6
  • 2.0.7
  • 2.0.7
  • 2.0.8
  • 2.0.8
  • 2.0.9
  • 2.0.9
  • 2.0.10
  • 2.0.10
  • 2.0.11
  • 2.0.11
  • 2.0.12
  • 2.0.12
  • 2.0.13
  • 2.0.13
  • 2.0.14
  • 2.0.14
  • 2.0.15
  • 2.0.15
  • 2.0.16
  • 2.0.16
  • 2.0.17
  • 2.0.17
  • 2.0.18
  • 2.0.18
  • 2.1
  • 2.1
  • 2.1.1
  • 2.1.1
  • 2.1.2
  • 2.1.2
  • 2.1.3
  • 2.1.3
  • 2.1.4
  • 2.1.4
  • 2.1.5
  • 2.1.5
  • 2.1.6
  • 2.1.6
  • 2.1.7
  • 2.1.7
  • 2.1.8
  • 2.1.8
  • 2.1.9
  • 2.1.9
  • 2.1.10
  • 2.1.10
  • 2.1.11
  • 2.1.11
  • 2.1.12
  • 2.1.12
  • 2.1.13
  • 2.1.13
  • 2.1.14
  • 2.1.14
  • 2.1.15
  • 2.1.15
  • 2.1.16
  • 2.1.16
  • 2.1.17
  • 2.1.17
  • 2.1.18
  • 2.1.18
  • 2.2
  • 2.2
  • 2.2.1
  • 2.2.1
  • 2.2.2
  • 2.2.2
  • 2.2.3
  • 2.2.3
  • 2.2.4
  • 2.2.4
  • 2.2.5
  • 2.2.5
  • 2.2.6
  • 2.2.6
  • 2.2.7
  • 2.2.7
  • 2.2.8
  • 2.2.8
  • 2.2.9
  • 2.2.9
  • 2.2.10
  • 2.2.10
  • 2.2.11
  • 2.2.11
  • 2.3
  • 2.3
  • 2.3.1
  • 2.3.1
  • 2.3.2
  • 2.3.2
  • 2.3.3
  • 2.3.3
  • 2.3.4
  • 2.3.4
  • 2.3.5
  • 2.3.5
  • 2.3.6
  • 2.3.6
  • 2.3.7
  • 2.3.7
  • 2.4
  • 2.4
  • 2.4.1
  • 2.4.1
  • 2.4.2
  • 2.4.2
  • 2.4.3
  • 2.4.3
  • 2.4.4
  • 2.4.4
  • 2.4.5
  • 2.4.6
  • 2.4.7

Magento 2® Adobe Commerce

  • 2.0
  • 2.0
  • 2.0.1
  • 2.0.1
  • 2.0.2
  • 2.0.2
  • 2.0.3
  • 2.0.3
  • 2.0.4
  • 2.0.4
  • 2.0.5
  • 2.0.5
  • 2.0.6
  • 2.0.6
  • 2.0.7
  • 2.0.7
  • 2.0.8
  • 2.0.8
  • 2.0.9
  • 2.0.9
  • 2.0.10
  • 2.0.10
  • 2.0.11
  • 2.0.11
  • 2.0.12
  • 2.0.12
  • 2.0.13
  • 2.0.13
  • 2.0.14
  • 2.0.14
  • 2.0.15
  • 2.0.15
  • 2.0.16
  • 2.0.16
  • 2.0.17
  • 2.0.17
  • 2.0.18
  • 2.0.18
  • 2.1
  • 2.1
  • 2.1.1
  • 2.1.1
  • 2.1.2
  • 2.1.2
  • 2.1.3
  • 2.1.3
  • 2.1.4
  • 2.1.4
  • 2.1.5
  • 2.1.5
  • 2.1.6
  • 2.1.6
  • 2.1.7
  • 2.1.7
  • 2.1.8
  • 2.1.8
  • 2.1.9
  • 2.1.9
  • 2.1.10
  • 2.1.10
  • 2.1.11
  • 2.1.11
  • 2.1.12
  • 2.1.12
  • 2.1.13
  • 2.1.13
  • 2.1.14
  • 2.1.14
  • 2.1.15
  • 2.1.15
  • 2.1.16
  • 2.1.16
  • 2.1.17
  • 2.1.17
  • 2.1.18
  • 2.1.18
  • 2.2
  • 2.2
  • 2.2.1
  • 2.2.1
  • 2.2.2
  • 2.2.2
  • 2.2.3
  • 2.2.3
  • 2.2.4
  • 2.2.4
  • 2.2.5
  • 2.2.5
  • 2.2.6
  • 2.2.6
  • 2.2.7
  • 2.2.7
  • 2.2.8
  • 2.2.8
  • 2.2.9
  • 2.2.9
  • 2.2.10
  • 2.2.10
  • 2.2.11
  • 2.2.11
  • 2.3
  • 2.3
  • 2.3.1
  • 2.3.1
  • 2.3.2
  • 2.3.2
  • 2.3.3
  • 2.3.3
  • 2.3.4
  • 2.3.4
  • 2.3.5
  • 2.3.5
  • 2.3.6
  • 2.3.6
  • 2.3.7
  • 2.3.7
  • 2.4
  • 2.4
  • 2.4.1
  • 2.4.1
  • 2.4.2
  • 2.4.2
  • 2.4.3
  • 2.4.3
  • 2.4.4
  • 2.4.4
  • 2.4.5
  • 2.4.6
  • 2.4.7
User's reviews
Log into your account to leave your review and get up to 3 months of free Support & Upgrade.

16th December 2022

I'm checking it

I'm trying, thanks for products

Changelog

Compatibility

  • PHP v8.1 compatibility

Compatibility

  • PHP 8.2 compatibility

Compatibility

  • remove Zend_JSON call to pure PHP  equivalent / Magento equivalent

Initial release for the master version

Initial release for the legacy version

Compatibility

  • Compatibility with PHP v8.1

Compatibility

  • Compatibility with Magento v2.4.6 + PHP v8.2
  • Revert useless commit
  • Better schema upgrade and data upgrade management
  • Replace Zend_Db_Select with \Magento\Framework\Db\Select
  • Compatibility fix for Php v8.1
  • Php v8.0 compatibility improvement
  • Fix for the PHP scripts in the template
  • The "link" column of the data feed grid is not sortable
  • Fix for executing the cron task when the data feed generation date is null
  • Minor fix for PHP scripts
  • Fix when categories are deleted whereas they are selected in the data feed configuration
  • Fix when categories are selected as filters but don't exist anymore in Magento
  • Minor fix on code
  • Fix for the permissions on the demo store

First public release

Demo store
Front-end
Back-end
Login
FacebookProductFeed
Password
FacebookProductFeed123

Recommended Magento 2 extensions

from €245
5/5 rated
9 Reviews

Cron Scheduler Pro adds many features to the free version of Cron Scheduler that not only allows to monitor the cron jobs but that also allows to manage each cron task individually and directly from the Magento 2 back-office or via the command line interface.

more details
from €245
4.9/5 rated
561 Reviews

Export your products from your Magento website into CSV, TXT, and XML data feeds for any shopping engine or marketplace! This extension includes all Google Shopping features and 19 sample templates.

more details
from €345
5/5 rated
115 Reviews

Mass Product Import & Update allows you to update and import products massively in Magento in record time through CSV or XML files available from your website's server, or any remote server through FTP or HTTP.

more details
from €145
4.9/5 rated
535 Reviews

Export quickly and safely a valid and well-structured data feed of your complete catalog of products from your Magento 2 website to your Google Merchant Account thanks to Simple Google Shopping, an extension built by a Google partner.

more details

Stay tuned and get a coupon code of 10% off any purchase while creating your account!

Subscribe now for updates, promotions and products launch twice a month at most.

Please indicate a valid email