Shopware 6 plugin | Create OCI and cXML PunchOut Catalogues | PunchCommerce                            ![](//analytics.punchcommerce.de/matomo.php?idsite=1&rec=1)

Shopware 6 plugin
=================

**With the EOL (End of Life) of Shopware 6.4, our plugin will only receive bug fixes and security updates for Shopware &gt;6.5. We therefore recommend that you update your shop and our plugin to the latest version of Shopware as soon as possible.**

Our free extension for Shopware 6 enables you to use our OCI or cXML gateway PunchOut in conjunction with your Shopware online shop.

In this scenario, we handle communication with your customers or their systems (Ariba, Oracle or SAP) and, following successful authentication, redirect the customer to your online shop.

### Setting up the Gateway PunchOut

First, download the plugin from the Shopware Store, then install and activate it.

**In PunchCommerce**

1. Create a new customer and select OCI or cXML Gateway as the mode
2. Complete the customer configuration in PunchCommerce by setting the entry URL (to your online shop) and the customer ID

***Note** For the entry URL, configure the URL of your online shop according to the following format:*

> https://./&lt;opt. sales-channel&gt;/punchcommerce/authenticate

**In Shopware**

1. Open the customer profile for a customer who is to access your shop via OCI or cXML
2. Enter the customer ID assigned in PunchCommerce into the “PunchCommerce-uID” field
3. Send your customer the login instructions generated in PunchCommerce as a PDF

### Setting up a redirect URL

Within the administration panel, the ‘Redirect URL after authentication’ input field is available in the plugin configuration. Please note that this option is reserved exclusively for Shopware administrators.

Here, you can enter a URL to which the customer should be redirected after successfully logging in. As soon as a URL is entered, it is checked for validity. If there is an error in the URL, a corresponding error message will be displayed.

### Transferring delivery charges

There are three different options in the plugin settings for transferring delivery charges:

1. Transfer all delivery charges (default)
    - With this option, shipping costs are always transferred. This means that even shipping costs of €0.00 are transferred.
2. Transfer only shipping costs &gt; 0
    - With this option, shipping costs are only transferred if they exceed €0.00.
3. Do not transfer any shipping costs

- With this option, shipping costs are never transferred, even if they exceed €0.00.

For all three options, they only take effect if a valid delivery method is defined for the shopping basket. If no valid delivery method is defined, no delivery charges are transferred. Furthermore, a corresponding message is displayed in the shopping basket, which does not, however, affect the PunchOut.

![https://www.punchcommerce.de/storage/media/support-articles/punchcommerce-shipping-costs-settings-shopware-6.png](https://www.punchcommerce.de/storage/media/support-articles/punchcommerce-shipping-costs-settings-shopware-6.png)

There is also the option to customise the ID or classification of the shipping method to be transferred. There are additional fields for this purpose in the shipping method settings: ![https://www.punchcommerce.de/storage/media/support-articles/punchcommerce-shipping-costs-custom-field-shopware-6_1.png](https://www.punchcommerce.de/storage/media/support-articles/punchcommerce-shipping-costs-custom-field-shopware-6_1.png)

A successful transfer of shipping costs looks like this: ![https://www.punchcommerce.de/storage/media/support-articles/transmission-of-shippings-costs-shopware-6.png](https://www.punchcommerce.de/storage/media/support-articles/transmission-of-shipping-costs-shopware-6.png)

### Changing field mappings for PunchCommerce additional fields in Shopware

Here, you can transfer any product fields from Shopware to PunchCommerce as additional fields \[2–10\] during the PunchOut process. The additional fields are then available to you within PunchCommerce and can be assigned to the relevant log field via ‘field mapping’ (Menu: Customers -&gt; Field mappings).

#### Create a new field mapping option

![https://www.punchcommerce.de/storage/media/support-articles/custom-field-configuration-for-punchout-in-shopware-6.png](https://www.punchcommerce.de/storage/media/support-articles/custom-field-configuration-for-punchout-in-shopware-6.png)

If the existing options are not sufficient for you – for example, because you wish to pass a CustomField for the product, you have the option to create your own field mapping options.

**Example:**

You have defined the CustomField “additionInformation” for the product in Shopware and now want this field to be passed on as part of the PunchOut. To do this, proceed as follows:

1. In the plugin configuration in Shopware, create a new field mapping option. The option corresponds to the mapping of a field in Shopware. By default, only the ‘product’ entity is available here. For our custom field ‘additionInformation’, we define the option as follows: ‘product.customFields.additionInformation’

Explanation:

```
  ‘product’: Corresponds to the name of the Shopware entity
  "customFields": Is the identifier for custom fields in Shopware
  "additionInformation": Is the name of your custom field
```

2. Next, carry out the field mapping in PunchCommerce. In our example, we would use “Custom Field 2”. Accordingly, in the plugin configuration for “Additional Field 2”, we now select the option “product.customFields.additionInformation”, which we have just created. The field is now passed to PunchCommerce as “Additional Field 2” in the PunchOut.
3. To ensure that your “additionInformation” custom field is now passed from PunchCommerce to your OCISystem, you must create a mapping in PunchCommerce (Menu: Customers -&gt; Field Mappings) and assign “Additional Field 2” to the desired log value there.

### Compatibility with Custom Products for Shopware

All options configured for a product are mapped to the `custom_field1` field in our data model according to the following schema:

```
  {
  "product": {
    [...]
        "custom_field1":"With extra sauce: on; Custom text: My dream product; Date: 2022-07-14T00:00:00+00:00; Colour: Red,Blue; Quantity: 99; "
       [...]
  }
```

Only configurator options of one of the following types are mapped:

```
[
    'checkbox',
    'colourselect',
    'datetime',
    'textfield',
    'numberfield',
    'select',
    'textarea',
    'timestamp'
]
```

The schema is as follows:

```
Option-Name . ': ' . Option-Value '; '[...]
```

### Classifications

Prerequisite: Plugin version 1.4.0 or 2.8.0

Under the ‘Product Classification’ section, you can specify both the type of classification and the field from which the classification value is to be retrieved. For the value, you can select either a product property or another product field. For product fields, the behaviour is the same as for additional fields. If both are selected, the product property takes precedence over the product field.

The classification type can be mapped in the PunchCommerce field mapping using “Classification type (classification\_type)”, and the value using “Classification value (classification)”. If no values are specified in the Shopware 6 plugin configuration, the values “ECLASS-11.1” for the type and “13000000” for the value are transferred.

![https://www.punchcommerce.de/storage/media/support-articles/classification-in-shopware-6.png](https://www.punchcommerce.de/storage/media/support-articles/classification-in-shopware-6.png)

### Checkout in the online shop

The ‘Checkout in the online shop’ setting is displayed exclusively for Shopware 6 shops. Furthermore, it is only displayed if the installed plugin version already supports the relevant functionality.

When activated, an additional button labelled ‘Complete PunchOut &amp; Place Order’ is displayed.

Clicking on ‘Complete PunchOut &amp; Place Order’ triggers the following sequence of events:

- The existing PunchOut process is carried out as normal.
    - The shopping basket is transferred to PunchCommerce or the connected e-procurement system.
- A new browser tab then opens with the Shopware checkout. In the previous browser tab, the customer is redirected to the procurement system.
- The customer can complete the order in the shop.

Shopware 6 Product Export
-------------------------

In Shopware 6, it is possible to export products using a [product comparison sales channel](https://docs.shopware.com/de/shopware-6-de/Produktvergleich). Using the following template, the products can be exported to a PunchCommerce-compatible CSV file. The content of this template can be further customised to suit your own requirements:

 **Header**

ordernumber;brand;brand\_ordernumber;customer\_ordernumber;title;category;description;description\_long;image\_url;price;graduated\_prices;purchase\_steps;min\_purchase;max\_purchase;currency;tax\_rate;purchase\_unit;reference\_unit;unit;unit\_name;packaging\_unit;weight;shipping\_time;classification\_type;classification;custom\_field1;custom\_field2;custom\_field3;custom\_field4;custom\_field5;custom\_field6;custom\_field7;custom\_field8;custom\_field9;custom\_field10;active

 **Product line**

```
{{ product.productNumber }};{{ product.manufacturer.translated.name|slice(0, 255) }};{{ product.manufacturerNumber }};;{{ product.translated.name|slice(0, 255)|raw }};{% if product.categories.count > 0 %}{{ product.categories.first.getBreadCrumb|slice(1)|join('|')|raw }}{% endif %};{{ product.translated.description|slice(0, 255)|raw }};{{ product.translated.description|raw }};{{ productExport.salesChannelDomain.url ~ '/' ~ product.cover.media.path }};{{ product.calculatedPrice.unitPrice }};{% if product.calculatedPrices.count > 0 %}"{% for price in product.calculatedPrices %}{% if loop.first %}1{% else %}{{ product.calculatedPrices.get(loop.index0 - 1).quantity + 1 }}{% endif %}{{ ':' ~ price.unitPrice }}{% if not loop.last %};{% endif %}{% endfor %}"{% endif %};{{ product.purchaseSteps }};{{ product.minPurchase }};{{ product.maxPurchase }};{{ 'EUR' }};{{ product.tax.taxRate }};{{ product.purchaseUnit }};{{ product.referenceUnit }};{% if product.unit %}{{ product.unit.translated.shortCode }}{% endif %};{% if product.unit %}{{ product.unit.translated.name }}{% endif %};{{ product.packUnit }};{{ product.weight }};{% if product.deliveryTime %}{{ product.deliveryTime.max }}{% endif %};;;;;;;;;;;;;{{ product.active }}
```

 [ PunchCommerce® ist ein Produkt der ![Netzdirektion GmbH](https://www.punchcommerce.de/static/netzdirektion-logo.png "PunchCommerce® ist ein Produkt der netzdirektion | Gesellschaft für digitale Wertarbeit mbH") ](https://netzdirektion.de)

 [Give feedback now - your opinion helps us to become even better!](https://easy-feedback.de/umfrage/1883200/5FuM95 "Your opinion helps us to become even better!")
