Marketplace Redirect: Configuration
Configuring Marketplace Redirect: switching on a channel, setting the link on a product, validation rules for ASIN and store URL, practical examples.
Marketplace Redirect: Configuration
This documentation always describes the latest published version.
Configuration has two steps: you switch the plugin on per channel, then you store the link per product. There is no YAML configuration under config/packages/.
Step 1: switch on a channel
Admin sidebar → MMKreativ Plugins → Marketplace redirect
The list shows one row per channel with the columns "Channel" and "Enabled". "Create" adds an entry for a channel, the actions on a row change or delete it.
| Setting | Default | Description |
|---|---|---|
| Channel | - | The channel the entry applies to. Exactly one entry per channel is possible, and on an existing entry the channel can no longer be changed |
| Use the external buy button in this channel | off | Switched on, products with a link show the external button and the Shop API returns the link |
The labels in the admin follow the language of the logged-in user (
de_DEoren_US). These pages use the English labels. In German the menu entry is called "Marktplatz-Redirect" and the card on the product "Externer Kauf".
The list is served at <admin path>/marketplace-redirect-settings. The routes are mmd_sylius_marketplace_redirect_plugin_admin_marketplace_redirect_settings_index, ..._create, ..._update and ..._delete. The grid behind it has the ID mmd_sylius_marketplace_redirect_plugin_admin_marketplace_redirect_settings.
The plugin is off in every channel until you switch it on there. A channel without an entry counts as off: products keep their cart button and the Shop API answers 404. This is useful when one shop runs several channels and only some of them should send customers to a marketplace.
If you create a second entry for the same channel, the form rejects it with the message "This channel already has marketplace redirect settings."
Step 2: set the link on the product
Admin → Catalog → Products → edit a product → General → "External purchase"
| Field | Description | |
|---|---|---|
| Marketplace | "No external purchase", "Amazon" or "Shopware Store". "No external purchase" removes the link | |
| ASIN or store URL | The reference to the product at the marketplace | |
| Amazon domain | Only visible for Amazon. "Default (amazon.de)" or one of the supported domains (choices amazon.de, amazon.com, amazon.co.uk and so on) |
|
| Marketplace | Reference | Example |
| ------------- | ----------- | --------- |
| No external purchase | ignored, removes the link | |
| Amazon | ASIN (or ISBN-10) | 3836244764 |
| Shopware Store | store URL | https://store.shopware.com/en/vendor12345/my-plugin.html |
The card appears both when creating and when editing a product. The "Amazon domain" field is shown and hidden purely with CSS, without JavaScript. It needs a browser from around 2023 (:has()); in an older browser the field stays hidden and the default domain applies. A domain on a Shopware Store link is dropped by the product form without a message, whereas the Admin API rejects it with 422.
Validation
The reference is validated on save because the value ends up in a link. For the reference and the Amazon domain the product form and the Admin API apply the same rules.
| Marketplace | Rule |
|---|---|
| Amazon | The ASIN is exactly 10 letters and digits, case does not matter (the URL is built in uppercase) |
| Amazon domain | de, com, co.uk, fr, it, es, nl, pl, se or ca. Without a value amazon.de applies |
| Shopware Store | An https address on the host store.shopware.com, without user info (user:pass@), without a port, with a path and without whitespace |
The Amazon domain is only allowed for Amazon. A product can have at most one link.
Practical examples
1. A book on Amazon Germany
Product "My book" → Marketplace: Amazon, ASIN or store URL: 3836244764, Amazon domain: Default (amazon.de). Result: the "Buy on Amazon" button leads to https://www.amazon.de/dp/3836244764.
2. A product on Amazon UK
Marketplace: Amazon, ASIN or store URL: B08N5WRWNW, Amazon domain: amazon.co.uk. Result: the button leads to https://www.amazon.co.uk/dp/B08N5WRWNW.
3. Selling your own Shopware plugin through the Store
Marketplace: Shopware Store, ASIN or store URL: https://store.shopware.com/en/vendor12345/my-plugin.html. Result: the "Get it in the Shopware Store" button leads to this address.
4. Only one channel sends customers away
The shop has the channels web and outlet. Under MMKreativ Plugins → Marketplace redirect you create an entry with the switch on for outlet only. In the web channel all products keep their cart button, in the outlet channel products with a link show the external button.