Download the PHP package sylius/legacy-shop-bridge-plugin without Composer
On this page you can find all versions of the php package sylius/legacy-shop-bridge-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download sylius/legacy-shop-bridge-plugin
More information about sylius/legacy-shop-bridge-plugin
Files in sylius/legacy-shop-bridge-plugin
Download sylius/legacy-shop-bridge-plugin
More information about sylius/legacy-shop-bridge-plugin
Files in sylius/legacy-shop-bridge-plugin
Vendor sylius
Package legacy-shop-bridge-plugin
Short Description Legacy Shop Bridge plugin for Sylius.
License MIT
Package legacy-shop-bridge-plugin
Short Description Legacy Shop Bridge plugin for Sylius.
License MIT
Please rate this library. Is it a good library?
Informations about the package legacy-shop-bridge-plugin
Sylius Legacy Shop Bridge Plugin
A plugin for bridging legacy Sylius functionality with modern Sylius applications.
## About This plugin enables Sylius 2.0 applications to use the legacy shop frontend from Sylius 1.x. It provides: - **Legacy Template Events** - Restores the `sylius_template_event` Twig function and template block system from SyliusUiBundle 1.x - **Shop Controllers** - Controllers for cart, orders, currency/locale switching, and other shop functionality removed in Sylius 2.0 - **Sonata Block Integration** - Support for Sonata blocks in templates - **Twig Extensions** - Legacy Twig filters like `sort_by` ## Installation 1. Install the plugin via Composer: 2. Enable the plugin and required bundles in `config/bundles.php`: ## Configuration ### 1. Import Plugin Configuration Add the plugin configuration import to your `config/packages/_sylius.yaml` (or main configuration file): ### 2. Configure FOSRestBundle If you don't have FOSRestBundle configured yet, add the following to `config/packages/fos_rest.yaml`: ### 3. Configure Controllers Configure the Sylius controllers to use the legacy bridge functionality: **Option A: If you have NOT overridden the following controllers in your project** Add the following to your `config/packages/_sylius.yaml`: **Option B: If you HAVE already any of these controllers in your project** Add the appropriate traits to your existing controllers: ### 4. Update UI Configuration Replace `sylius_ui` configuration with `sylius_legacy_shop_bridge` in your `config/packages/sylius_ui.yaml` (or wherever your UI events are configured): ### 5. Configure Twig Paths Add the following Twig paths configuration to your `config/packages/twig.yaml`: **Note:** The first lines are only needed if you have customized `SyliusShopBundle` or `SyliusUiBundle` templates in your `templates/bundles/` directory. The last two lines pointing to the plugin's templates are always required and have to be placed at the end. ### 6. Add Routes Add the plugin routes to your `config/routes.yaml` file. **Important:** These routes must be loaded after the shop routes: ### 7. Update Encore Entry Points (Shop) Update your shop template base file to use legacy Encore entries: ### 8. Update Asset Paths Replace asset references to use the legacy paths: **Regex for bulk replacement:** Find: Replace: **Note:** These regexes work within PHPStorm: Cmd+Shift+R (Find and Replace in Files), enable Regex, paste both patterns. ### 9. Configure Webpack Add the legacy bridge configuration to your `webpack.config.js`: ### 10. Install Frontend Dependencies Add the following legacy dependencies to your `package.json`: Then install the dependencies: ### 11. Build Assets Build your frontend assets: ### 12. Update Twig Templates When migrating legacy templates, you need to update certain Twig function calls and menu names: **Menu name changes:** **Twig function replacements:** | Before | After | |----------------------------------------------------------|---------------------------------------------------------------------| | `sylius_order_items_subtotal(order)` | `order.getItemsSubtotal()` | | `sylius_order_tax_included(order)` | `order.getTaxIncludedTotal()` | | `sylius_order_tax_excluded(order)` | `order.getTaxExcludedTotal()` | | `sylius_product_variant_prices(product, sylius.channel)` | `sylius_product_variants_map(product, {'channel': sylius.channel})` | ## Usage Once installed and configured, the plugin will provide legacy compatibility for older Sylius templates and functionality, allowing you to gradually migrate to modern Sylius features. ## License This plugin is under the MIT license. See the complete license in the LICENSE file.All versions of legacy-shop-bridge-plugin with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
friendsofsymfony/rest-bundle Version ^3.0
jms/serializer-bundle Version ^4.0 || ^5.5
sonata-project/block-bundle Version ^4.2 || ^5.0
sylius/sylius Version ^2.0
friendsofsymfony/rest-bundle Version ^3.0
jms/serializer-bundle Version ^4.0 || ^5.5
sonata-project/block-bundle Version ^4.2 || ^5.0
sylius/sylius Version ^2.0
The package sylius/legacy-shop-bridge-plugin contains the following files
Loading the files please wait ...