Introduction

This section describes how the module maps product properties to Shopware and what configuration options are available. There are two types of properties (PropertyGroup and PropertyGroupOption), each of which has its own section on this page.

Property Group

Mapping Table

Target: property_group
Source: Elio\CommerceBundle\Document\Product\Properties\PropertyOption

Target Field Source Path
*T name label
* displayType always "text" by default
* sortingType always "alphanumeric" by default

Subsections

root
└───property-group
    └───property-group-build-cache
    └───property-group-anomaly-delta-count
    └───property-group-anomaly-check
    └───property-group-validate
    └───property-group-upsert
    └───property-group-delete

Configuration

{
  "subsections": {
    "propertyGroup": {
      "enabled": true,
      "deleteMode": "..."
    }
  }
}

Property Group Option

Mapping Table

Target: property_group_option
Source: Elio\CommerceBundle\Document\Product\Properties\PropertyValue

Target Field Source Path
* groupId determined from the "parent" PropertyOption
*T name label
position position - see "Positions"

Subsections

root
└───property-group-option
    └───property-group-option-build-cache
    └───property-group-option-anomaly-delta-count
    └───property-group-option-anomaly-check
    └───property-group-option-validate
    └───property-group-option-upsert
    └───property-group-option-delete

Configuration

{
  "subsections": {
    "propertyGroupOption": {
      "enabled": true,
      "deleteMode": "..."
    }
  }
}

Positions

It is possible to set the position of a property in Shopware by setting the field PropertyValue::position. However, there is one limitation to this: While Shopware stores items per language, Synqup does not support translatable positions. This means that currently only the position in the system language is set in Shopware.

Names and Identifiers

Avoid Duplicates

Since properties are embedded documents you have to generate/assign the same properties several times. In order to avoid duplicate property group options (= property options with the same display value) you have to be careful on assigning the correct identifiers.

Example: Lets assume an input module generated the following structure of products and properties:

  • Product A
    • PropertyGroup "color"
      • PropertyOption {"identifier": "product_a_options_blue", "value": "blue"}
  • Product B
    • PropertyGroup "color"
      • PropertyOption {"identifier": "product_b_options_blue", "value": "blue"}

This example would lead to two identical property group options with display name "blue" in Shopware, since the identifiers are not the same.

Identifier Uniqueness

It is actually possible to have identical property option identifiers in different property groups. Example:

  • PropertyGroup "color"
    • PropertyOption {"identifier": "blue", "value": "blue"}
  • PropertyGroup "light color"
    • PropertyOption {"identifier": "blue", "value": "blue"}

As in the previous example this leads to two identical property group options as well. The difference is that those property group options are assigned to different "parents" / owning property groups. The module does extend the identifiers of property options by the identifier of the owning property group internally to avoid duplicate identifiers between different property groups.