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 Shopware version 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** Configure the entry URL as the URL of your online shop using the following format:*

```
> https://.//punchcommerce/authenticate
```

**In Shopware**

1. Open 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 a successful login. As soon as a URL is entered, it is checked for correctness. If there is an error within the URL, a corresponding error message will be displayed.

### Transmission of shipping costs

There are 3 different options in the plugin settings for the transmission of shipping costs:

1. Transfer all shipping costs (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 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 shipping method is defined for the shopping basket. If no valid shipping method is defined, no shipping costs will be transferred. In addition, a corresponding message will be displayed in the shopping basket; however, this does not 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)

Additionally, there is the option to customise the ID or classification of the shipping method to be transferred. There are corresponding additional fields for this in the shipping methods: ![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 mapping 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. The additional fields are then available to you within PunchCommerce and can be assigned to the respective log field via "field mapping" (Menu: Customers -&gt; Field assignments).

#### Create a new field assignment 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 from the product, you have the option to create your own field mapping options.

**Example:**

You have defined the custom field "additionInformation" for the product in Shopware and now wish to pass this field during the PunchOut process. 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, configure the field mapping in PunchCommerce. In our example, we would use "Custom Field 2". Accordingly, we now select the option "product.customFields.additionInformation" – which we have just created – for "Additional Field 2" in the plugin configuration. The field is now passed to PunchCommerce as "Additional Field 2" in the PunchOut.
3. To ensure that your CustomField "additionInformation" 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 protocol 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 desired product; Date: 2022-07-14T00:00:00+00:00; Color: Red,Blue; Number: 99; "
 [...]
  }
```

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

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

The schema corresponds to:

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

### Checkout in the online shop

The “Checkout in the online shop” setting is displayed exclusively for Shopware 6 shops. It is also only displayed if the installed plugin version already supports the corresponding functionality.

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

Clicking on “Complete PunchOut &amp; Place Order” triggers the following sequence:

- The existing PunchOut process is carried out unchanged.
    - 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 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!")
