Why aren’t product attributes imported from WooCommerce?

Why aren't product attributes imported from WooCommerce?

At present, our WooCommerce connector is designed to import attributes exclusively for variable products. While you may observe attributes in external records and mappings, they won’t be set within simple products (products without variants).

Reason behind this behaviour

  1. In WooCommerce, a single attribute can serve dual purposes:

    • Descriptive Role: To depict specific characteristics of a product, like its color.

    • Variation Role: To illustrate different variants of a product, such as a black t-shirt versus a white t-shirt.

  2. The challenge is that, when fetching attributes through the API, there’s no direct method to discern these two distinct roles.

How WooCommerce connector manages this

  1. During the initial import, the connector tags all imported attributes as variation attributes. This is done by setting the “Variants Creation Mode” either to “Instantly” or “Dynamically” (this latter option becomes available if you’ve checked the “Import Attributes as Dynamic” option).

  2. After mapping attributes, the connector will update attributes in a product only if the product type in WooCommerce is defined as a “Variable Product”. If not, the attributes will be bypassed.

A real-world example:

Consider an attribute named “Material”. For some products, “Material” acts as a variant (e.g., Cotton vs. Polyester in the case of a variable product). However, for other products, it simply serves as a descriptive element (e.g., noting that a simple product is made of cotton). From WooCommerce’s perspective, there’s just one “Material” attribute with a range of potential values that different products can use.

Upon initial import to Odoo, this attribute is either created anew or mapped to an existing one. Given that the WooCommerce connector assumes the attribute may define variants, the “Variants Creation Mode” will be assigned as “Instantly” or “Dynamically”. Odoo doesn’t support creating a second attribute with an identical name. This means the connector can’t produce another “Material” attribute with “Variants Creation Mode” set to “Never”. This limitation poses a challenge.

Important note:

Keep in mind that product attributes in Odoo designed to be used as a tool to create variants. And “Variants Creation Mode” field signals Odoo when to automatically create a new variant once an attribute is added to a product.

Please let us know if you still have any questions: support@ventor.tech

Related Posts
Leave a Reply

Your email address will not be published.Required fields are marked *