Skip to content

positivedigits/shopware-productflow-integration

Repository files navigation

Shopware ProductFlow Integration

Integrates ProductFlow's offers and orders as a custom datamodel connector for Shopware 6.

Requirements

  1. PHP version 8.4 or higher.
  2. Shopware 6.7.

Features

The integration supports the following features:

  1. Offer updates.
  2. Order synchronisation.
  3. Automatically updates the order with a track and trace code.

Installation

Installation through composer is preferred.

composer require positivedigits/shopware-productflow-integration

Next, install the plugin.

./bin/console plugin:install --activate ProductFlowIntegration

Configuration

After installation, configure the integration in ProductFlow

Name Description Example
Token Authorization token passed from ProductFlow to Shopware in the Authorization header. Note: this value should be configured in the plugin settings as well. d82949c3-29d1-4710-8e73-5d62ce8a60cd
Offer endpoint The URL on which ProductFlow fetches offers from Shopware. Replace example.com with your shops domain! https://example.com/offer
Order endpoint The URL on which ProductFlow fetches orders from Shopware. Replace example.com with your shops domain! https://example.com/orders?status=paid
Shipment endpoint The URL on which ProductFlow submits shipment updates. Replace example.com with your shops domain! Note: this is required for the order endpoint to function. https://example.com/shipments

Ensure that Schakel ordersynchronisatie in and Schakel synchronisatie van offers in are enabled in ProductFlow!

Even though the OrderTransactionStates::STATE_OPEN (open) is supported, this is most likely not desirable. When the open parameter is passed to the orders endpoint all orders are imported, regardless of payment status. Therefore, the OrderTransactionStates::STATE_PAID (paid) is the recommended default.

Finally, make sure the authorization token set in ProductFlow is also provided in the Shopware plugin configuration.

Order Transaction State Reference

The status query parameter on the /orders endpoint supports the following values.

status parameter OrderTransactionStates constant Description
open OrderTransactionStates::STATE_OPEN Imports all orders regardless of payment status. Not recommended.
paid OrderTransactionStates::STATE_PAID Imports only orders with a paid transaction. Recommended default.

Events

The plugin dispatches the following events.

Event Description
AfterOfferSyncEvent Dispatched after an offer is synchronized.
AfterOfferUnlistEvent Dispatched after an offer is unlisted.
AfterListOpenOrderEvent Dispatched after open orders are fetched.
AfterShipmentSyncEvent Dispatched after a shipment tracking code is synchronized.

Issues

Found a bug or have a problem? Feel free to open an issue.

About

Integrates ProductFlows offers and orders as a custom datamodel connector for Shopware 6.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages