Home

Awesome

Build Status Coverage Status Scrutinizer Code Quality

Development

Installation

  1. Clone this repository
  2. Run $ composer install
  3. Move to vendor/shopware/plugin-dev-tools and execute $ ./install.sh

Running tests

The test suite relies on the plugin-dev-tools.

  1. Run $ ./psh local:init to initialize a testing environment on your local system.
  2. Run $ ./psh local:unit to execute all tests or $ ./psh local:unit-coverage to generate the code-coverage

Run tests without psh

$ export SHOPWARE_ENV=swagconnecttest $ ../../../../../../vendor/bin/phpunit

General behaviour

Uninstall

The backend module

Configuration

General

Import

Export

Category mapping

Import

Map remote shopware Connect categories to your local shopware categories. When a new product is being imported from shopware Connect, it will get the corresponding shopware category assigned

Export

Map local shopware categories to shopware Connect categories. When being exported the product will get the configured shopware Connect category assigned

Products

Import

Overview of products imported from shopware Connect. Here you can

Export

Overview of products exported to shopware Connect. Here you can

Recent changes

Usefull for imported products. Will show remote changes, which have not been applied, yet. Here you can manually apply changed prices / images / descriptions.

Log

A technical overview of shopware Connect requests. Usefull for debugging if you are not sure, if a product was actually exported to shopware Connect or not. Will automatically be cleared every few days.

FromShop

The backend module

...

ToShop

Dispatch

By default any dispatch can be used with shopware Connect. You might want to disable some dispatches, however. In order to do so, just open Settings->Shipping and edit the shipping type you want to disable. In the "advanced configuration" you can now uncheck "Allow with shopware Connect".

Updating

In the shopware Connect plugin configuration, for prices, names, longDescription, shortDescription and images the update behaviour can be configured:

This is the global configuration you can overwrite or inherit this configuration on per-product base

Importing images

Images can be directly imported whenever a new product is transfered to the shop. This will, however, massively slow down the actual import. shopware Connect will automatically register a CronJob so images can automatically imported via the default shopware cronjob. In order to test this, you can just call http://www.your-shop.com/backend/cron.

Prices

Images

Manipulating and extending the plugin

Overwriting parts of the plugin will make the plugin unable to be updated, so it is best practice to use a seperate custom plugin, that makes use of events and hooks, to extend the Shopware Connect Plugin. We are using the same kind of events as Shopware, so you can define listeners in the exact same way.

Events

The SDK is accessed by RPC calls over a single route, this is handled by the Connect Gateway. We will throw events before the request is handled, and after it has been handled. These are the two event names:

Both events will receive the request as their first parameter. The request contains the XML document that is used by the RPC call. It contains the service and the command that will be executed. You can find the available services and commands in the DependencyResolver in the Plugin Library.

The After Event will also contain the response that will be sent back to Connect. The Events will be fired on any time Connect calls the shop for any function.