Marketplace Redirect: Troubleshooting
Troubleshooting Marketplace Redirect: symptoms, checks and solutions, known limitations and FAQ.
Marketplace Redirect: Troubleshooting
This documentation always describes the latest published version.
Common issues
Symptom: The product page still shows the normal cart button although the product has a link.
Check: Is the channel switched on under MMKreativ Plugins → Marketplace redirect? The product must also be sold in the channel, and the link must be stored with a valid reference. For an invalid stored reference the log contains a warning.
Solution: Create an entry for the channel and switch on "Use the external buy button in this channel". A channel without an entry counts as off.
Symptom: The "Marketplace redirect" menu entry and its page are missing in the admin.
Check: Are the admin routes imported (config/routes/mmd_marketplace_redirect.yaml)?
Solution: Add the import per Installation and clear the cache. The setup command prints the snippet if the import is missing.
Symptom: The "External purchase" card saves nothing, or a new product with a marketplace chosen cannot be created.
Check: Has the setup command run? Without the tables the card cannot store anything.
Solution: Run bin/console mmd:marketplace-redirect:setup.
Symptom: The setup command aborts and mentions open migrations.
Check: Are migrations of Sylius itself still open?
Solution: Run bin/console doctrine:migrations:migrate first, then the setup command again.
Symptom: The setup command reports that the plugin's migrations are not registered with Doctrine.
Check: Is the bundle in config/bundles.php, and is sylius_core.prepend_doctrine_migrations set to false?
Solution: Register the bundle and do not set the option to false.
Symptom: The Shopware Store field is rejected with "This is not a Shopware Store product URL".
Check: Is it an https address on exactly store.shopware.com, without user info, port or whitespace, and with a path?
Solution: Paste the full product URL from the Store.
Symptom: The Amazon ASIN is rejected as invalid.
Check: Does the input have exactly 10 letters and digits, without hyphens?
Solution: Enter the ASIN or ISBN-10 without special characters.
Symptom: The Shopware button shows no logo, or the buttons have no colours.
Check: Does a Content Security Policy block data: images or inline styles?
Solution: Allow img-src data: and style-src 'unsafe-inline', see Storefront.
Symptom: The "Amazon domain" field does not appear even though Amazon is chosen.
Check: Is the browser older than around 2023?
Solution: The field is shown with CSS (:has()), an older browser leaves it hidden. Use a current browser or set the domain through the Admin API. Without a value amazon.de applies.
Symptom: The Shop API answers 404.
Check: Is the product active, sold in the current channel and does it have a link? Is the channel switched on?
Solution: See Shop API. All these cases answer the same on purpose.
Known limitations
- The button is replaced, the cart is not locked: someone who posts the add-to-cart request by hand can still put the product in the cart. Disable the product's variants or keep the product out of the checkout if that matters to you.
- There are no Behat scenarios yet. The Twig side is covered by PHPUnit render tests and the API by functional tests against a real kernel and database.
- The migrations are MySQL-specific, testing runs on MySQL 8.0 and 8.4.
- A third marketplace needs a change to the plugin, see Extending.
FAQ
General
- What happens to a product without a link? It is sold in the shop as usual.
- What happens if the link is broken or the table is missing? The product page shows the normal cart button and writes a warning to the log.
- Can a product have several links? No, at most one.
Configuration
- Do I have to add anything under
config/packages/? No. The plugin has no bundle configuration, everything runs through the admin. - Can I show the button in one channel only? Yes, switch the plugin on only there.
Compatibility
- Does the plugin work headless? Yes, through the endpoint of the Shop API.
- Does it run in worker environments such as FrankenPHP or RoadRunner? Yes. The provider resets its cache between requests, so a changed link shows up without a restart.