Download the PHP package solutiondrive/sylius-product-bundles-plugin without Composer
On this page you can find all versions of the php package solutiondrive/sylius-product-bundles-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download solutiondrive/sylius-product-bundles-plugin
More information about solutiondrive/sylius-product-bundles-plugin
Files in solutiondrive/sylius-product-bundles-plugin
Package sylius-product-bundles-plugin
Short Description Plugin for Sylius to configure bundles for products that can be sold together
License MIT
Informations about the package sylius-product-bundles-plugin
Sylius Product Bundles Plugin
Installation
-
Run
composer create-project sylius/plugin-skeleton ProjectName
. - From the plugin skeleton root directory, run the following commands:
Definition
ProductBundle
ProductBundles are a independent resource and have a OneToOne-relationship with a Product that represents the bundle throughout the sylius-framework, e.g. for calculating prices and taxes in the checkout. The content of a ProductBundle is organized in ProductBundleSlots. One ProductBundle can have 1 to n ProductBundleSlots.
ProductBundleSlots
ProductBundleSlots represent a group of products that can be switched through by the customer. E.g. in a Bundle for football-Teams there could be a Slot 'Shirts', in which different kinds of shirts can be referenced. Only one item of each ProductBundleSlot is part of the finally bought bundle.
Usage
ProductBundleCreator
This is a service to create ProductBundles programmatically. It will only create Objects necessary for the ProductBundle. It won't create products for you. But if you have the products that should be part of the bundle you want to create, they can be associated with the created bundle and the slots inside the bundle.
get the service
create your bundle
Fixtures
Sometimes you'll need to set up your environment quickly and add some default bundles.
You can take a look at tests/Application/app/config/fixtures.yml
file to see how you can configure fixtures.
Running plugin tests
-
PHPUnit
-
PHPSpec
-
Behat (non-JS scenarios)
-
Behat (JS scenarios)
-
Download Chromedriver
-
Run Selenium server with previously downloaded Chromedriver:
-
Run test application's webserver on
localhost:8080
: - Run Behat:
-
Opening Sylius with your plugin
-
Using
test
environment: - Using
dev
environment: