The operation of the product importer is not very difficult to understand if the underlying design is clear. To understand this design, some words need to be explained.
A product has no data except for the EAN number. The attributes such as price, title or description are thus not stored with the product, although they are linked by product attributes.
The product attributes can all be seen as additional data (besides the EAN number) of a product. A product attribute is unique by product, feed & naming. It is therefore possible that a product has multiple prices, which is then defined by the product, the feed and the term ‘price'.
A category consists of a name and is a group of products. A category consists of none, one or more products and is always linked to 1 website.
Feed / Shop
A feed is called a ‘store’ for the user. A feed is linked to 1 website and can have multiple products and product attributes.
In summary, an EAN number is linked to 1 or more categories. In addition, this EAN number is linked to multiple product attributes and each product attribute is also linked to a feed.
The operation of import functionality begins when downloading the link that is linked to a feed / store. After the file is downloaded, each product will be filtered from the file. A product has 2 required fields: the EAN number and the category. Additional fields are created and stored as product attributes, and are therefore optional. After the product has been taken out of the feed and is filled, the product consists of a category name and an EAN.
First, it is checked whether the category already exists to which the product needs to be linked. If there already exists a category with the same name within the same website, it will be used. If this does not yet exist, the category will be created.
Next, it is checked whether a product already exists with the same EAN number. If this is the case, no new product will be created and this existing product will be used. However, additional product attributes are created or updated if they already exist. These product attributes will then be linked to the product and feed that is currently being imported.
After all products from the feed have been created or updated, they can be viewed in the front end. The filters shown on the left are all unique values that are in the database for the selected category. The ‘Shop' filter shows the operation if 1 product comes from 2 separate feeds for any reason.
There is 1 product (Product A) that is linked to Category A and Feed A, and has an ‘1234' EAN. If a new product from another feed (Feed B) is imported with the same EAN number as Product A (1234), Product A will be used and will not change.
If both Feed A and Feed B have a filter that places each product in Category A and Category B, Import A, Category A and Feed A will not change. What is added is the link between Product A, Category B and Feed B. The product is, in fact, found in Feed B and must be imported. The result is that Product A is linked to the categories A & B and in addition to Feed A & B.
The confusion can occur if Category B is a completely different category. It appears that Product A is imported in the wrong category, but this is not the case. The product is imported by Feed A and linked to Category A, and through Feed B and then linked to Category B. The problem is that the only alternative is the full operation from the EAN number. But then a comparison is never possible. Each product, regardless of whether they have the same EAN number, will always be seen as a separate product. That seems to me a system that compares prices (and later other attributes), not the intention.
To return to the operation of the filters where the real confusion arises: by clicking Category A to view it, both Feed A & Feed B will be shown as shop. A product in Category A is imported by 2 feeds / stores and both are filterable. On the other hand, you will also see Category B in the admin at Feed A. There is a product (Product A) coming from Feed A, but due to Feed B is also linked to Category B.