Introduction

This section describes how the module maps units to Shopware and what configuration options are available.

Mapping Table

Target: unit
Source: Elio\CommonBundle\Document\Unit

Please note that units are [extracted from products](TODO LINK EXTRACTION). So the actual mapping source is Synqup\Modules\Shopware6Bundle\Output\Core\ExtractedDocuments\Entities\Unit\ExtractedUnit.

Target Field Source Path
*T shortCode abbreviation
*T name name

Subsections

The following subsections are involved in mapping units:

output
└───unit
    └───unit-build-cache
    └───unit-validate
    └───unit-upsert

Configuration

The following configuration is used for units:

{
  "subsections": {
    "unit": {
      "enabled": true
    }
  }
}

Example

$unit = new Unit();
$unit->setAbbreviation('in');
$unit->setName(TranslationCollection::create([Locale::en_GB, 'Inch'], [Locale::de_DE, 'Zoll']));

This code will lead to the following result in Shopware:

TODO IMG