Markus Michalski FAQ

Marketplace Redirect: Installation

Installing the Sylius plugin Marketplace Redirect: Composer via Packeton, bundle, admin routes, setup command, update and uninstallation.

Deutsche Version

Back to overview

Marketplace Redirect: Installation

This documentation always describes the latest published version.

Composer

Private repositories are managed via Packeton (https://packeton.markus-michalski.net). Credentials are provided after license purchase.

{ "repositories": [{ "type": "composer", "url": "https://packeton.markus-michalski.net" }] }
composer require mmd/sylius-marketplace-redirect-plugin

After composer require:

  1. Register the bundle in config/bundles.php:

    Mmd\SyliusMarketplaceRedirectPlugin\MmdSyliusMarketplaceRedirectPlugin::class => ['all' => true],
    
  2. Import the admin routes, for example in config/routes/mmd_marketplace_redirect.yaml. Without the import the "Marketplace redirect" menu entry and its screen are missing, everything else keeps working:

    mmd_sylius_marketplace_redirect_admin:
        resource: "@MmdSyliusMarketplaceRedirectPlugin/config/routes/admin.yaml"
    
  3. Run the setup command:

    bin/console mmd:marketplace-redirect:setup
    

    The command executes only this plugin's own still-open migrations, never those of the app or of other plugins. They create two tables, mmd_sylius_marketplace_redirect_link and mmd_sylius_marketplace_redirect_channel_settings. It is idempotent: without a new migration it reports "Migrations are already up to date." and does nothing, so you can run it after every composer update. It also checks that the routes from step 2 are imported and prints the snippet if not, without ever writing into config/. If migrations of Sylius itself are still open, it stops and asks you to run bin/console doctrine:migrations:migrate first. In scripts and deployments pass --no-interaction, otherwise Doctrine asks for a confirmation before it executes.

The bundle registers the Twig hooks, the Doctrine mapping, the grid and the API resource itself. You do not need anything in config/packages/: the plugin has no bundle configuration, the settings live in the database and are maintained in the admin (see Configuration). No assets:install is needed, the Shopware logo is embedded in the template as a data URI.

Run the setup command before anyone uses the "External purchase" card in the admin. Until then product pages still show the normal button, but the card cannot save anything: on an existing product what is entered is discarded without a message, and creating a product with a marketplace chosen fails.

Update

composer update mmd/sylius-marketplace-redirect-plugin
bin/console mmd:marketplace-redirect:setup
bin/console cache:clear

Uninstallation

  1. Stored links and channel settings live in the two tables. Back them up first if you want to keep them.
  2. Roll back the migrations while the bundle is still registered, one version at a time, newest first:
    bin/console doctrine:migrations:execute --down "Mmd\SyliusMarketplaceRedirectPlugin\Migrations\Version20261002140000"
    bin/console doctrine:migrations:execute --down "Mmd\SyliusMarketplaceRedirectPlugin\Migrations\Version20261002120000"
    
  3. Remove the route import (config/routes/mmd_marketplace_redirect.yaml) and the bundle entry in config/bundles.php.
  4. Remove the package:
    composer remove mmd/sylius-marketplace-redirect-plugin