From dde33cf4acda0a845566d34f72256fc1fd331c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20J=C4=99drzejewski?= Date: Sun, 23 Mar 2014 22:43:07 +0100 Subject: [PATCH] Initial Variation and Attribute implementations --- app/config/config_test.yml | 2 +- features/backend/product_attributes.feature | 145 +++++++++++ features/backend/product_options.feature | 50 ++-- features/backend/product_properties.feature | 145 ----------- features/backend/product_prototypes.feature | 10 +- features/backend/product_variants.feature | 15 +- features/backend/products.feature | 38 +-- phpspec.yml | 10 +- .../.gitignore | 0 .../.travis.yml | 0 .../Bundle/AttributeBundle/CHANGELOG.md | 6 + .../DependencyInjection/Configuration.php | 116 +++++++++ .../SyliusAttributeExtension.php | 124 +++++++++ .../EventListener/LoadMetadataSubscriber.php | 93 +++++++ .../BuildAttributeFormChoicesListener.php} | 19 +- .../BuildAttributeValueFormListener.php} | 21 +- .../Form/Type/AttributeChoiceType.php} | 21 +- .../Form/Type/AttributeEntityChoiceType.php} | 6 +- .../Form/Type/AttributeType.php} | 31 ++- .../Form/Type/AttributeValueType.php} | 40 ++- src/Sylius/Bundle/AttributeBundle/README.md | 74 ++++++ .../config/doctrine/model/Attribute.orm.xml} | 2 +- .../doctrine/model/AttributeValue.orm.xml} | 9 +- .../Resources/config/services.xml} | 10 +- .../Resources/config/validation.xml | 63 +++++ .../Resources/meta/LICENSE | 0 .../Resources/translations/messages.af.yml | 0 .../Resources/translations/messages.ar.yml | 0 .../Resources/translations/messages.bg.yml | 0 .../Resources/translations/messages.ca.yml | 0 .../Resources/translations/messages.cs.yml | 0 .../Resources/translations/messages.da.yml | 0 .../Resources/translations/messages.de.yml | 16 ++ .../Resources/translations/messages.el.yml | 0 .../Resources/translations/messages.en.yml | 5 + .../Resources/translations/messages.es.yml | 18 ++ .../Resources/translations/messages.et.yml | 0 .../Resources/translations/messages.fi.yml | 0 .../Resources/translations/messages.fr.yml | 18 ++ .../Resources/translations/messages.he.yml | 0 .../Resources/translations/messages.hr.yml | 0 .../Resources/translations/messages.hu.yml | 0 .../Resources/translations/messages.id.yml | 0 .../Resources/translations/messages.it.yml | 7 + .../Resources/translations/messages.ja.yml | 8 + .../Resources/translations/messages.ko.yml | 0 .../Resources/translations/messages.nl.yml | 18 ++ .../Resources/translations/messages.no.yml | 0 .../Resources/translations/messages.pl.yml | 18 ++ .../Resources/translations/messages.pt.yml | 0 .../Resources/translations/messages.ro.yml | 0 .../Resources/translations/messages.ru.yml | 18 ++ .../Resources/translations/messages.sk.yml | 14 + .../Resources/translations/messages.sl.yml | 0 .../Resources/translations/messages.sr.yml | 9 + .../Resources/translations/messages.sv.yml | 0 .../Resources/translations/messages.th.yml | 0 .../Resources/translations/messages.tr.yml | 0 .../Resources/translations/messages.uk.yml | 0 .../Resources/translations/messages.vi.yml | 0 .../Resources/translations/messages.zh.yml | 0 .../Resources/translations/validators.af.yml | 0 .../Resources/translations/validators.ar.yml | 0 .../Resources/translations/validators.bg.yml | 0 .../Resources/translations/validators.ca.yml | 0 .../Resources/translations/validators.cs.yml | 0 .../Resources/translations/validators.da.yml | 0 .../Resources/translations/validators.de.yml | 53 ++++ .../Resources/translations/validators.el.yml | 0 .../Resources/translations/validators.en.yml | 15 ++ .../Resources/translations/validators.es.yml | 53 ++++ .../Resources/translations/validators.et.yml | 0 .../Resources/translations/validators.fi.yml | 0 .../Resources/translations/validators.fr.yml | 53 ++++ .../Resources/translations/validators.he.yml | 0 .../Resources/translations/validators.hr.yml | 0 .../Resources/translations/validators.hu.yml | 0 .../Resources/translations/validators.id.yml | 0 .../Resources/translations/validators.it.yml | 0 .../Resources/translations/validators.ja.yml | 0 .../Resources/translations/validators.ko.yml | 0 .../Resources/translations/validators.nl.yml | 53 ++++ .../Resources/translations/validators.no.yml | 0 .../Resources/translations/validators.pl.yml | 28 ++ .../Resources/translations/validators.pt.yml | 0 .../Resources/translations/validators.ro.yml | 0 .../Resources/translations/validators.ru.yml | 53 ++++ .../Resources/translations/validators.sk.yml | 10 + .../Resources/translations/validators.sl.yml | 0 .../Resources/translations/validators.sr.yml | 0 .../Resources/translations/validators.sv.yml | 0 .../Resources/translations/validators.th.yml | 0 .../Resources/translations/validators.tr.yml | 0 .../Resources/translations/validators.uk.yml | 0 .../Resources/translations/validators.vi.yml | 0 .../Resources/translations/validators.zh.yml | 0 .../AttributeBundle/SyliusAttributeBundle.php | 48 ++++ .../Bundle/AttributeBundle/composer.json | 45 ++++ ...BuildAttributeFormChoicesListenerSpec.php} | 30 +-- .../BuildAttributeValueFormListenerSpec.php} | 36 +-- .../Form/Type/AttributeTypeSpec.php} | 18 +- .../Form/Type/AttributeValueTypeSpec.php} | 32 +-- .../CartBundle/Controller/CartController.php | 2 +- .../Controller/CartItemController.php | 3 +- .../Bundle/CartBundle/Event/CartEvent.php | 5 - .../CartBundle/EventListener/CartListener.php | 9 +- .../DependencyInjection/Configuration.php | 4 +- .../SyliusCoreExtension.php | 2 + .../ODM/PHPCR}/PageRepository.php | 2 +- .../ORM}/OrderRepository.php | 4 +- .../ORM}/ProductRepository.php | 6 +- .../ORM/ProductVariantRepository.php} | 8 +- .../ORM}/ShipmentRepository.php | 2 +- .../ORM}/UserRepository.php | 2 +- .../EventListener/ImageUploadListener.php | 8 +- .../CoreBundle/Form/Type/CartItemType.php | 6 +- .../CoreBundle/Form/Type/ProductType.php | 2 +- ...VariantType.php => ProductVariantType.php} | 5 +- .../Resources/config/app/sylius.yml | 29 ++- .../config/doctrine/model/OrderItem.orm.xml | 2 +- ...Variant.orm.xml => ProductVariant.orm.xml} | 5 +- ...ge.orm.xml => ProductVariantImage.orm.xml} | 4 +- .../CoreBundle/Resources/config/services.xml | 10 +- .../Resources/config/validation.xml | 12 +- .../Resources/translations/validators.en.yml | 4 +- .../Bundle/CoreBundle/SyliusCoreBundle.php | 6 +- .../EventListener/ImageUploadListenerSpec.php | 4 +- ...ypeSpec.php => ProductVariantTypeSpec.php} | 8 +- .../DataFixtures/ORM/DataFixture.php | 2 +- .../DataFixtures/ORM/LoadImagesData.php | 4 +- .../ORM/LoadProductAttributeData.php | 84 ++++++ ...ionsData.php => LoadProductOptionData.php} | 8 +- ...sData.php => LoadProductPrototypeData.php} | 8 +- .../DataFixtures/ORM/LoadProductsData.php | 34 +-- .../DataFixtures/ORM/LoadPropertiesData.php | 84 ------ .../Controller/VariantController.php | 6 +- .../DependencyInjection/Configuration.php | 32 +-- .../SyliusProductExtension.php | 68 ++++- .../Doctrine/ORM/ProductRepository.php} | 6 +- .../Doctrine/ORM/VariantRepository.php | 3 +- .../ProductBundle/Form/Type/ProductType.php | 24 +- .../ProductBundle/Form/Type/PrototypeType.php | 8 +- .../Form/Type/VariantType.php} | 17 +- .../Generator/VariantGenerator.php | 69 +++++ .../config/container/driver/doctrine/orm.xml | 86 ------- .../Resources/config/container/properties.xml | 40 --- .../Resources/config/container/prototypes.xml | 35 --- .../config/doctrine/model/Attribute.orm.xml | 20 ++ .../doctrine/model/AttributeValue.orm.xml | 22 ++ .../config/doctrine/model/Option.orm.xml | 20 ++ .../config/doctrine/model/OptionValue.orm.xml | 22 ++ .../config/doctrine/model/Product.orm.xml | 18 +- .../config/doctrine/model/Prototype.orm.xml | 22 +- .../config/doctrine/model/Variant.orm.xml | 26 ++ .../Resources/config/routing.yml | 11 - .../Resources/config/routing/product.yml | 39 --- .../Resources/config/routing/property.yml | 39 --- .../Resources/config/routing/prototype.yml | 39 --- .../config/serializer/Model.Product.xml | 13 - .../serializer/Model.ProductProperty.xml | 10 - .../config/serializer/Model.Property.xml | 12 - .../config/serializer/Model.Prototype.xml | 10 - .../{container/products.xml => services.xml} | 24 +- .../Resources/config/validation.xml | 46 +--- .../Resources/translations/messages.en.yml | 28 +- .../Resources/translations/validators.en.yml | 31 +-- .../Resources/views/Product/_create.html.twig | 9 - .../Resources/views/Product/_form.html.twig | 1 - .../Resources/views/Product/_index.html.twig | 19 -- .../Resources/views/Product/_show.html.twig | 31 --- .../Resources/views/Product/_update.html.twig | 9 - .../Resources/views/Product/create.html.twig | 5 - .../Resources/views/Product/index.html.twig | 5 - .../Resources/views/Product/macros.html.twig | 51 ---- .../Resources/views/Product/show.html.twig | 5 - .../Resources/views/Product/update.html.twig | 5 - .../ProductBundle/SyliusProductBundle.php | 11 +- .../Form/Type/ProductTypeSpec.php | 11 +- .../Form/Type/PrototypeTypeSpec.php | 4 +- .../AbstractResourceExtension.php | 14 + .../SyliusResourceExtension.php | 2 +- .../config/{container => }/services.xml | 2 +- .../Bundle/VariableProductBundle/CHANGELOG.md | 27 -- .../DependencyInjection/Configuration.php | 123 --------- .../SyliusVariableProductExtension.php | 63 ----- .../Form/ChoiceList/VariantChoiceList.php | 36 --- .../BuildProductFormListener.php | 76 ------ .../Form/Type/VariableProductType.php | 46 ---- .../config/container/driver/doctrine/orm.xml | 73 ------ .../Resources/config/container/options.xml | 49 ---- .../Resources/config/container/variants.xml | 70 ----- .../config/doctrine/model/Prototype.orm.xml | 29 --- .../doctrine/model/VariableProduct.orm.xml | 39 --- .../config/serializer/Model.Option.xml | 6 - .../config/serializer/Model.OptionValue.xml | 6 - .../serializer/Model.VariableProduct.xml | 6 - .../config/serializer/Model.Variant.xml | 6 - .../Resources/translations/messages.en.yml | 16 -- .../Resources/views/Product/_create.html.twig | 9 - .../Resources/views/Product/_form.html.twig | 1 - .../Resources/views/Product/_index.html.twig | 20 -- .../Resources/views/Product/_show.html.twig | 31 --- .../Resources/views/Product/_update.html.twig | 9 - .../Resources/views/Product/create.html.twig | 5 - .../Resources/views/Product/index.html.twig | 5 - .../Resources/views/Product/macros.html.twig | 51 ---- .../Resources/views/Product/show.html.twig | 5 - .../Resources/views/Product/update.html.twig | 5 - .../Form/Type/VariableProductTypeSpec.php | 99 ------- .../Generator/VariantGeneratorSpec.php | 53 ---- src/Sylius/Bundle/VariationBundle/.gitignore | 5 + src/Sylius/Bundle/VariationBundle/.travis.yml | 14 + .../Bundle/VariationBundle/CHANGELOG.md | 6 + .../DependencyInjection/Configuration.php | 130 ++++++++++ .../SyliusVariationExtension.php | 169 ++++++++++++ .../EventListener/LoadMetadataSubscriber.php | 138 ++++++++++ .../Form/ChoiceList/VariantChoiceList.php | 33 +++ .../VariantToCombinationTransformer.php | 22 +- .../BuildVariantFormListener.php | 28 +- .../Form/Type/OptionChoiceType.php | 15 +- .../Form/Type/OptionEntityChoiceType.php | 2 +- .../Form/Type/OptionType.php | 17 +- .../Form/Type/OptionValueChoiceType.php | 25 +- .../Form/Type/OptionValueCollectionType.php | 31 ++- .../Form/Type/OptionValueType.php | 15 +- .../Form/Type/VariantChoiceType.php | 23 +- .../Form/Type/VariantMatchType.php | 33 ++- .../Form/Type/VariantType.php | 27 +- .../README.md | 12 +- .../config/doctrine/model/Option.orm.xml | 8 +- .../config/doctrine/model/OptionValue.orm.xml | 6 +- .../config/doctrine/model/Variant.orm.xml | 19 +- .../Resources/config/services.xml | 41 +++ .../Resources/config/validation.xml | 17 +- .../VariationBundle/Resources/meta/LICENSE | 19 ++ .../Resources/translations/messages.af.yml} | 0 .../Resources/translations/messages.ar.yml} | 0 .../Resources/translations/messages.bg.yml} | 0 .../Resources/translations/messages.ca.yml} | 0 .../Resources/translations/messages.cs.yml} | 0 .../Resources/translations/messages.da.yml | 3 + .../Resources/translations/messages.de.yml | 0 .../Resources/translations/messages.el.yml | 3 + .../Resources/translations/messages.en.yml | 11 + .../Resources/translations/messages.es.yml | 0 .../Resources/translations/messages.et.yml | 3 + .../Resources/translations/messages.fi.yml | 3 + .../Resources/translations/messages.fr.yml | 0 .../Resources/translations/messages.he.yml | 3 + .../Resources/translations/messages.hr.yml | 3 + .../Resources/translations/messages.hu.yml | 3 + .../Resources/translations/messages.id.yml | 3 + .../Resources/translations/messages.it.yml | 3 + .../Resources/translations/messages.ja.yml | 3 + .../Resources/translations/messages.ko.yml | 3 + .../Resources/translations/messages.nl.yml | 0 .../Resources/translations/messages.no.yml | 3 + .../Resources/translations/messages.pl.yml | 0 .../Resources/translations/messages.pt.yml | 3 + .../Resources/translations/messages.ro.yml | 3 + .../Resources/translations/messages.ru.yml | 0 .../Resources/translations/messages.sk.yml | 3 + .../Resources/translations/messages.sl.yml | 3 + .../Resources/translations/messages.sr.yml | 3 + .../Resources/translations/messages.sv.yml | 3 + .../Resources/translations/messages.th.yml | 3 + .../Resources/translations/messages.tr.yml | 3 + .../Resources/translations/messages.uk.yml | 3 + .../Resources/translations/messages.vi.yml | 3 + .../Resources/translations/messages.zh.yml | 3 + .../Resources/translations/validators.af.yml | 3 + .../Resources/translations/validators.ar.yml | 3 + .../Resources/translations/validators.bg.yml | 3 + .../Resources/translations/validators.ca.yml | 3 + .../Resources/translations/validators.cs.yml | 3 + .../Resources/translations/validators.da.yml | 3 + .../Resources/translations/validators.de.yml | 0 .../Resources/translations/validators.el.yml | 3 + .../Resources/translations/validators.en.yml | 2 +- .../Resources/translations/validators.es.yml | 0 .../Resources/translations/validators.et.yml | 3 + .../Resources/translations/validators.fi.yml | 3 + .../Resources/translations/validators.fr.yml | 0 .../Resources/translations/validators.he.yml | 3 + .../Resources/translations/validators.hr.yml | 3 + .../Resources/translations/validators.hu.yml | 3 + .../Resources/translations/validators.id.yml | 3 + .../Resources/translations/validators.it.yml | 3 + .../Resources/translations/validators.ja.yml | 3 + .../Resources/translations/validators.ko.yml | 3 + .../Resources/translations/validators.nl.yml | 0 .../Resources/translations/validators.no.yml | 3 + .../Resources/translations/validators.pl.yml | 0 .../Resources/translations/validators.pt.yml | 3 + .../Resources/translations/validators.ro.yml | 3 + .../Resources/translations/validators.ru.yml | 0 .../Resources/translations/validators.sk.yml | 3 + .../Resources/translations/validators.sl.yml | 3 + .../Resources/translations/validators.sr.yml | 3 + .../Resources/translations/validators.sv.yml | 3 + .../Resources/translations/validators.th.yml | 3 + .../Resources/translations/validators.tr.yml | 3 + .../Resources/translations/validators.uk.yml | 3 + .../Resources/translations/validators.vi.yml | 3 + .../Resources/translations/validators.zh.yml | 3 + .../SyliusVariationBundle.php} | 18 +- .../Constraint/VariantCombination.php | 2 +- .../Validator/Constraint/VariantUnique.php | 4 +- .../Validator/VariantCombinationValidator.php | 12 +- .../Validator/VariantUniqueValidator.php | 8 +- .../composer.json | 13 +- .../Form/Type/OptionTypeSpec.php | 11 +- .../Form/Type/OptionValueTypeSpec.php | 61 +++++ .../Form/Type/VariantTypeSpec.php | 50 ++++ .../Constraint/VariantCombinationSpec.php | 4 +- .../Constraint/VariantUniqueSpec.php | 4 +- .../Validator/VariantUniqueValidatorSpec.php | 8 +- .../Bundle/WebBundle/Behat/DataContext.php | 44 ++-- src/Sylius/Bundle/WebBundle/Behat/WebUser.php | 4 +- .../WebBundle/Menu/BackendMenuBuilder.php | 8 +- .../Resources/config/routing/backend/main.yml | 16 +- .../config/routing/backend/option.yml | 40 --- .../routing/backend/product_attribute.yml | 40 +++ .../config/routing/backend/product_option.yml | 40 +++ .../{variant.yml => product_variant.yml} | 20 +- .../config/routing/backend/property.yml | 40 --- .../Resources/translations/menu.en.yml | 6 +- .../Resources/translations/messages.en.yml | 36 +-- .../views/Backend/Inventory/macros.html.twig | 4 +- .../views/Backend/Option/update.html.twig | 26 -- .../views/Backend/Order/macros.html.twig | 4 - .../views/Backend/Order/show.html.twig | 10 +- .../Product/Form/_attributes.html.twig | 15 ++ .../Product/Form/_properties.html.twig | 15 -- .../Backend/Product/Form/_tabs.html.twig | 2 +- .../views/Backend/Product/_form.html.twig | 2 +- .../views/Backend/Product/index.html.twig | 4 +- .../views/Backend/Product/show.html.twig | 16 +- .../_form.html.twig | 0 .../create.html.twig | 10 +- .../Backend/ProductAttribute/index.html.twig | 27 ++ .../Backend/ProductAttribute/macros.html.twig | 40 +++ .../update.html.twig | 14 +- .../{Option => ProductOption}/_form.html.twig | 0 .../create.html.twig | 8 +- .../{Option => ProductOption}/index.html.twig | 12 +- .../macros.html.twig | 12 +- .../Backend/ProductOption/update.html.twig | 26 ++ .../_form.html.twig | 0 .../create.html.twig | 7 +- .../macros.html.twig | 4 +- .../update.html.twig | 7 +- .../views/Backend/Property/index.html.twig | 27 -- .../views/Backend/Property/macros.html.twig | 40 --- .../views/Backend/Prototype/index.html.twig | 4 +- .../views/Frontend/Product/show.html.twig | 10 +- src/Sylius/Component/Attribute/.gitignore | 5 + src/Sylius/Component/Attribute/.travis.yml | 15 ++ src/Sylius/Component/Attribute/CHANGELOG.md | 6 + src/Sylius/Component/Attribute/LICENCE | 19 ++ .../Model/Attribute.php} | 12 +- .../Model/AttributeInterface.php} | 15 +- .../Attribute/Model/AttributeTypes.php | 39 +++ .../Model/AttributeValue.php} | 91 ++++--- .../Model/AttributeValueInterface.php} | 44 ++-- .../Attribute/Model/SubjectInterface.php | 78 ++++++ src/Sylius/Component/Attribute/README.md | 22 ++ src/Sylius/Component/Attribute/composer.json | 42 +++ .../Attribute/Model/AttributeSpec.php} | 20 +- .../Attribute/Model/AttributeValueSpec.php | 162 ++++++++++++ src/Sylius/Component/Core/Model/Order.php | 2 +- .../Component/Core/Model/OrderInterface.php | 4 +- src/Sylius/Component/Core/Model/OrderItem.php | 4 +- .../Core/Model/OrderItemInterface.php | 6 +- src/Sylius/Component/Core/Model/Product.php | 3 +- .../Component/Core/Model/ProductInterface.php | 5 +- .../Model/{Variant.php => ProductVariant.php} | 16 +- ...riantImage.php => ProductVariantImage.php} | 8 +- ...e.php => ProductVariantImageInterface.php} | 10 +- ...erface.php => ProductVariantInterface.php} | 18 +- .../Component/Core/Model/ProductSpec.php | 4 +- .../Component/Core/Model/VariantSpec.php | 14 +- .../Product/Builder/ProductBuilder.php | 42 +-- .../Builder/ProductBuilderInterface.php | 4 +- .../Product/Builder/PrototypeBuilder.php | 18 +- .../Builder/Variable/PrototypeBuilder.php | 41 --- .../Component/Product/Model/Attribute.php | 23 ++ .../Product/Model/AttributeInterface.php | 23 ++ .../Product/Model/AttributeValue.php | 38 +++ .../Product/Model/AttributeValueInterface.php | 36 +++ src/Sylius/Component/Product/Model/Option.php | 23 ++ .../Product/Model/OptionInterface.php | 23 ++ .../Component/Product/Model/OptionValue.php | 23 ++ .../Product/Model/OptionValueInterface.php | 23 ++ .../Component/Product/Model/Product.php | 241 +++++++++++++++--- .../Product/Model/ProductInterface.php | 63 +---- .../Component/Product/Model/PropertyTypes.php | 35 --- .../Component/Product/Model/Prototype.php | 90 +++++-- .../Product/Model/PrototypeInterface.php | 67 +++-- .../Product/Model/Variable/Prototype.php | 91 ------- .../Model/Variable/PrototypeInterface.php | 60 ----- .../Component/Product/Model/Variant.php | 98 +++++++ .../Product/Model/VariantInterface.php | 55 ++++ .../Product/Builder/ProductBuilderSpec.php | 66 ++--- .../Product/Builder/PrototypeBuilderSpec.php | 25 +- .../Component/Product/Model/AttributeSpec.php | 36 +++ .../Product/Model/AttributeValueSpec.php | 55 ++++ .../Product/Model/ProductPropertySpec.php | 162 ------------ .../Component/Product/Model/ProductSpec.php | 116 +++++++-- .../Component/Product/Model/PrototypeSpec.php | 36 +-- .../Model/Variable/VariableProductSpec.php | 117 --------- src/Sylius/Component/Variation/.gitignore | 5 + src/Sylius/Component/Variation/.travis.yml | 15 ++ src/Sylius/Component/Variation/CHANGELOG | 7 + .../Variation}/Generator/VariantGenerator.php | 78 +++--- .../Generator/VariantGeneratorInterface.php | 13 +- src/Sylius/Component/Variation/LICENCE | 19 ++ .../Variable => Variation/Model}/Option.php | 2 +- .../Model}/OptionInterface.php | 12 +- .../Model}/OptionValue.php | 2 +- .../Model}/OptionValueInterface.php | 2 +- .../Model/Variable.php} | 0 .../Model/VariableInterface.php} | 33 +-- .../Variable => Variation/Model}/Variant.php | 52 +--- .../Model}/VariantInterface.php | 36 +-- src/Sylius/Component/Variation/README.md | 23 ++ src/Sylius/Component/Variation/composer.json | 42 +++ .../Component/Variation/Model}/OptionSpec.php | 8 +- .../Variation/Model}/OptionValueSpec.php | 8 +- .../Variation/Model/VariableProductSpec.php | 33 +++ .../Variation/Model}/VariantSpec.php | 77 ++---- 431 files changed, 5106 insertions(+), 3709 deletions(-) create mode 100644 features/backend/product_attributes.feature delete mode 100644 features/backend/product_properties.feature rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/.gitignore (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/.travis.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/CHANGELOG.md create mode 100644 src/Sylius/Bundle/AttributeBundle/DependencyInjection/Configuration.php create mode 100644 src/Sylius/Bundle/AttributeBundle/DependencyInjection/SyliusAttributeExtension.php create mode 100644 src/Sylius/Bundle/AttributeBundle/EventListener/LoadMetadataSubscriber.php rename src/Sylius/Bundle/{ProductBundle/Form/EventListener/BuildPropertyFormChoicesListener.php => AttributeBundle/Form/EventListener/BuildAttributeFormChoicesListener.php} (75%) rename src/Sylius/Bundle/{ProductBundle/Form/EventListener/BuildProductPropertyFormListener.php => AttributeBundle/Form/EventListener/BuildAttributeValueFormListener.php} (66%) rename src/Sylius/Bundle/{ProductBundle/Form/Type/PropertyChoiceType.php => AttributeBundle/Form/Type/AttributeChoiceType.php} (65%) rename src/Sylius/Bundle/{ProductBundle/Form/Type/PropertyEntityChoiceType.php => AttributeBundle/Form/Type/AttributeEntityChoiceType.php} (73%) rename src/Sylius/Bundle/{ProductBundle/Form/Type/PropertyType.php => AttributeBundle/Form/Type/AttributeType.php} (65%) rename src/Sylius/Bundle/{ProductBundle/Form/Type/ProductPropertyType.php => AttributeBundle/Form/Type/AttributeValueType.php} (62%) create mode 100644 src/Sylius/Bundle/AttributeBundle/README.md rename src/Sylius/Bundle/{ProductBundle/Resources/config/doctrine/model/Property.orm.xml => AttributeBundle/Resources/config/doctrine/model/Attribute.orm.xml} (91%) rename src/Sylius/Bundle/{ProductBundle/Resources/config/doctrine/model/ProductProperty.orm.xml => AttributeBundle/Resources/config/doctrine/model/AttributeValue.orm.xml} (58%) rename src/Sylius/Bundle/{VariableProductBundle/Resources/config/container/prototypes.xml => AttributeBundle/Resources/config/services.xml} (55%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/config/validation.xml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/meta/LICENSE (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.af.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.ar.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.bg.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.ca.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.cs.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.da.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/messages.de.yml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.el.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/messages.en.yml create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/messages.es.yml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.et.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.fi.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/messages.fr.yml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.he.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.hr.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.hu.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.id.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/messages.it.yml create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/messages.ja.yml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.ko.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/messages.nl.yml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.no.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/messages.pl.yml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.pt.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.ro.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/messages.ru.yml create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/messages.sk.yml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.sl.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/messages.sr.yml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.sv.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.th.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.tr.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.uk.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.vi.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/messages.zh.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.af.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.ar.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.bg.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.ca.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.cs.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.da.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/validators.de.yml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.el.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/validators.en.yml create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/validators.es.yml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.et.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.fi.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/validators.fr.yml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.he.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.hr.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.hu.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.id.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.it.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.ja.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.ko.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/validators.nl.yml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.no.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/validators.pl.yml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.pt.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.ro.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/validators.ru.yml create mode 100644 src/Sylius/Bundle/AttributeBundle/Resources/translations/validators.sk.yml rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.sl.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.sr.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.sv.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.th.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.tr.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.uk.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.vi.yml (100%) rename src/Sylius/Bundle/{VariableProductBundle => AttributeBundle}/Resources/translations/validators.zh.yml (100%) create mode 100644 src/Sylius/Bundle/AttributeBundle/SyliusAttributeBundle.php create mode 100644 src/Sylius/Bundle/AttributeBundle/composer.json rename src/Sylius/Bundle/{ProductBundle/spec/Sylius/Bundle/ProductBundle/Form/EventListener/BuildPropertyFormChoicesListenerSpec.php => AttributeBundle/spec/Sylius/Bundle/AttributeBundle/Form/EventListener/BuildAttributeFormChoicesListenerSpec.php} (79%) rename src/Sylius/Bundle/{ProductBundle/spec/Sylius/Bundle/ProductBundle/Form/EventListener/BuildProductPropertyFormListenerSpec.php => AttributeBundle/spec/Sylius/Bundle/AttributeBundle/Form/EventListener/BuildAttributeValueFormListenerSpec.php} (67%) rename src/Sylius/Bundle/{ProductBundle/spec/Sylius/Bundle/ProductBundle/Form/Type/PropertyTypeSpec.php => AttributeBundle/spec/Sylius/Bundle/AttributeBundle/Form/Type/AttributeTypeSpec.php} (69%) rename src/Sylius/Bundle/{ProductBundle/spec/Sylius/Bundle/ProductBundle/Form/Type/ProductPropertyTypeSpec.php => AttributeBundle/spec/Sylius/Bundle/AttributeBundle/Form/Type/AttributeValueTypeSpec.php} (59%) rename src/Sylius/Bundle/CoreBundle/{Repository => Doctrine/ODM/PHPCR}/PageRepository.php (90%) rename src/Sylius/Bundle/CoreBundle/{Repository => Doctrine/ORM}/OrderRepository.php (98%) rename src/Sylius/Bundle/CoreBundle/{Repository => Doctrine/ORM}/ProductRepository.php (94%) rename src/Sylius/Bundle/CoreBundle/{Repository/VariantRepository.php => Doctrine/ORM/ProductVariantRepository.php} (63%) rename src/Sylius/Bundle/CoreBundle/{Repository => Doctrine/ORM}/ShipmentRepository.php (98%) rename src/Sylius/Bundle/CoreBundle/{Repository => Doctrine/ORM}/UserRepository.php (98%) rename src/Sylius/Bundle/CoreBundle/Form/Type/{VariantType.php => ProductVariantType.php} (92%) rename src/Sylius/Bundle/CoreBundle/Resources/config/doctrine/model/{Variant.orm.xml => ProductVariant.orm.xml} (89%) rename src/Sylius/Bundle/CoreBundle/Resources/config/doctrine/model/{VariantImage.orm.xml => ProductVariantImage.orm.xml} (80%) rename src/Sylius/Bundle/CoreBundle/spec/Sylius/Bundle/CoreBundle/Form/Type/{VariantTypeSpec.php => ProductVariantTypeSpec.php} (74%) create mode 100644 src/Sylius/Bundle/FixturesBundle/DataFixtures/ORM/LoadProductAttributeData.php rename src/Sylius/Bundle/FixturesBundle/DataFixtures/ORM/{LoadOptionsData.php => LoadProductOptionData.php} (89%) rename src/Sylius/Bundle/FixturesBundle/DataFixtures/ORM/{LoadPrototypesData.php => LoadProductPrototypeData.php} (88%) delete mode 100644 src/Sylius/Bundle/FixturesBundle/DataFixtures/ORM/LoadPropertiesData.php rename src/Sylius/Bundle/{VariableProductBundle => ProductBundle}/Controller/VariantController.php (95%) rename src/Sylius/Bundle/{VariableProductBundle/Doctrine/ORM/VariableProductRepository.php => ProductBundle/Doctrine/ORM/ProductRepository.php} (84%) rename src/Sylius/Bundle/{VariableProductBundle => ProductBundle}/Doctrine/ORM/VariantRepository.php (92%) rename src/Sylius/Bundle/{VariableProductBundle/Form/Type/PrototypeType.php => ProductBundle/Form/Type/VariantType.php} (55%) create mode 100644 src/Sylius/Bundle/ProductBundle/Generator/VariantGenerator.php delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/container/driver/doctrine/orm.xml delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/container/properties.xml delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/container/prototypes.xml create mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/doctrine/model/Attribute.orm.xml create mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/doctrine/model/AttributeValue.orm.xml create mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/doctrine/model/Option.orm.xml create mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/doctrine/model/OptionValue.orm.xml create mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/doctrine/model/Variant.orm.xml delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/routing.yml delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/routing/product.yml delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/routing/property.yml delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/routing/prototype.yml delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/serializer/Model.Product.xml delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/serializer/Model.ProductProperty.xml delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/serializer/Model.Property.xml delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/config/serializer/Model.Prototype.xml rename src/Sylius/Bundle/ProductBundle/Resources/config/{container/products.xml => services.xml} (58%) delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/views/Product/_create.html.twig delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/views/Product/_form.html.twig delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/views/Product/_index.html.twig delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/views/Product/_show.html.twig delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/views/Product/_update.html.twig delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/views/Product/create.html.twig delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/views/Product/index.html.twig delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/views/Product/macros.html.twig delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/views/Product/show.html.twig delete mode 100644 src/Sylius/Bundle/ProductBundle/Resources/views/Product/update.html.twig rename src/Sylius/Bundle/ResourceBundle/Resources/config/{container => }/services.xml (100%) delete mode 100644 src/Sylius/Bundle/VariableProductBundle/CHANGELOG.md delete mode 100644 src/Sylius/Bundle/VariableProductBundle/DependencyInjection/Configuration.php delete mode 100644 src/Sylius/Bundle/VariableProductBundle/DependencyInjection/SyliusVariableProductExtension.php delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Form/ChoiceList/VariantChoiceList.php delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Form/EventListener/BuildProductFormListener.php delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Form/Type/VariableProductType.php delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/config/container/driver/doctrine/orm.xml delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/config/container/options.xml delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/config/container/variants.xml delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/config/doctrine/model/Prototype.orm.xml delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/config/doctrine/model/VariableProduct.orm.xml delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/config/serializer/Model.Option.xml delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/config/serializer/Model.OptionValue.xml delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/config/serializer/Model.VariableProduct.xml delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/config/serializer/Model.Variant.xml delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/translations/messages.en.yml delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/views/Product/_create.html.twig delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/views/Product/_form.html.twig delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/views/Product/_index.html.twig delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/views/Product/_show.html.twig delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/views/Product/_update.html.twig delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/views/Product/create.html.twig delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/views/Product/index.html.twig delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/views/Product/macros.html.twig delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/views/Product/show.html.twig delete mode 100644 src/Sylius/Bundle/VariableProductBundle/Resources/views/Product/update.html.twig delete mode 100644 src/Sylius/Bundle/VariableProductBundle/spec/Sylius/Bundle/VariableProductBundle/Form/Type/VariableProductTypeSpec.php delete mode 100644 src/Sylius/Bundle/VariableProductBundle/spec/Sylius/Bundle/VariableProductBundle/Generator/VariantGeneratorSpec.php create mode 100644 src/Sylius/Bundle/VariationBundle/.gitignore create mode 100644 src/Sylius/Bundle/VariationBundle/.travis.yml create mode 100644 src/Sylius/Bundle/VariationBundle/CHANGELOG.md create mode 100644 src/Sylius/Bundle/VariationBundle/DependencyInjection/Configuration.php create mode 100644 src/Sylius/Bundle/VariationBundle/DependencyInjection/SyliusVariationExtension.php create mode 100644 src/Sylius/Bundle/VariationBundle/EventListener/LoadMetadataSubscriber.php create mode 100644 src/Sylius/Bundle/VariationBundle/Form/ChoiceList/VariantChoiceList.php rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Form/DataTransformer/VariantToCombinationTransformer.php (74%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Form/EventListener/BuildVariantFormListener.php (64%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Form/Type/OptionChoiceType.php (74%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Form/Type/OptionEntityChoiceType.php (89%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Form/Type/OptionType.php (80%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Form/Type/OptionValueChoiceType.php (72%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Form/Type/OptionValueCollectionType.php (72%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Form/Type/OptionValueType.php (80%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Form/Type/VariantChoiceType.php (73%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Form/Type/VariantMatchType.php (59%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Form/Type/VariantType.php (75%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/README.md (81%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/config/doctrine/model/Option.orm.xml (78%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/config/doctrine/model/OptionValue.orm.xml (69%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/config/doctrine/model/Variant.orm.xml (56%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/config/services.xml rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/config/validation.xml (81%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/meta/LICENSE rename src/Sylius/Bundle/{VariableProductBundle/Resources/translations/messages.it.yml => VariationBundle/Resources/translations/messages.af.yml} (100%) rename src/Sylius/Bundle/{VariableProductBundle/Resources/translations/messages.ja.yml => VariationBundle/Resources/translations/messages.ar.yml} (100%) rename src/Sylius/Bundle/{VariableProductBundle/Resources/translations/messages.sk.yml => VariationBundle/Resources/translations/messages.bg.yml} (100%) rename src/Sylius/Bundle/{VariableProductBundle/Resources/translations/messages.sr.yml => VariationBundle/Resources/translations/messages.ca.yml} (100%) rename src/Sylius/Bundle/{VariableProductBundle/Resources/translations/validators.sk.yml => VariationBundle/Resources/translations/messages.cs.yml} (100%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.da.yml rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/translations/messages.de.yml (100%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.el.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.en.yml rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/translations/messages.es.yml (100%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.et.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.fi.yml rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/translations/messages.fr.yml (100%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.he.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.hr.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.hu.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.id.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.it.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.ja.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.ko.yml rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/translations/messages.nl.yml (100%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.no.yml rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/translations/messages.pl.yml (100%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.pt.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.ro.yml rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/translations/messages.ru.yml (100%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.sk.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.sl.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.sr.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.sv.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.th.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.tr.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.uk.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.vi.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/messages.zh.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.af.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.ar.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.bg.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.ca.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.cs.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.da.yml rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/translations/validators.de.yml (100%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.el.yml rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/translations/validators.en.yml (99%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/translations/validators.es.yml (100%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.et.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.fi.yml rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/translations/validators.fr.yml (100%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.he.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.hr.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.hu.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.id.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.it.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.ja.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.ko.yml rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/translations/validators.nl.yml (100%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.no.yml rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/translations/validators.pl.yml (100%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.pt.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.ro.yml rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Resources/translations/validators.ru.yml (100%) create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.sk.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.sl.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.sr.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.sv.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.th.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.tr.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.uk.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.vi.yml create mode 100644 src/Sylius/Bundle/VariationBundle/Resources/translations/validators.zh.yml rename src/Sylius/Bundle/{VariableProductBundle/SyliusVariableProductBundle.php => VariationBundle/SyliusVariationBundle.php} (62%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Validator/Constraint/VariantCombination.php (91%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Validator/Constraint/VariantUnique.php (88%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Validator/VariantCombinationValidator.php (80%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/Validator/VariantUniqueValidator.php (88%) rename src/Sylius/Bundle/{VariableProductBundle => VariationBundle}/composer.json (69%) rename src/Sylius/Bundle/{VariableProductBundle/spec/Sylius/Bundle/VariableProductBundle => VariationBundle/spec/Sylius/Bundle/VariationBundle}/Form/Type/OptionTypeSpec.php (83%) create mode 100644 src/Sylius/Bundle/VariationBundle/spec/Sylius/Bundle/VariationBundle/Form/Type/OptionValueTypeSpec.php create mode 100644 src/Sylius/Bundle/VariationBundle/spec/Sylius/Bundle/VariationBundle/Form/Type/VariantTypeSpec.php rename src/Sylius/Bundle/{VariableProductBundle/spec/Sylius/Bundle/VariableProductBundle => VariationBundle/spec/Sylius/Bundle/VariationBundle}/Validator/Constraint/VariantCombinationSpec.php (79%) rename src/Sylius/Bundle/{VariableProductBundle/spec/Sylius/Bundle/VariableProductBundle => VariationBundle/spec/Sylius/Bundle/VariationBundle}/Validator/Constraint/VariantUniqueSpec.php (81%) rename src/Sylius/Bundle/{VariableProductBundle/spec/Sylius/Bundle/VariableProductBundle => VariationBundle/spec/Sylius/Bundle/VariationBundle}/Validator/VariantUniqueValidatorSpec.php (90%) delete mode 100644 src/Sylius/Bundle/WebBundle/Resources/config/routing/backend/option.yml create mode 100644 src/Sylius/Bundle/WebBundle/Resources/config/routing/backend/product_attribute.yml create mode 100644 src/Sylius/Bundle/WebBundle/Resources/config/routing/backend/product_option.yml rename src/Sylius/Bundle/WebBundle/Resources/config/routing/backend/{variant.yml => product_variant.yml} (58%) delete mode 100644 src/Sylius/Bundle/WebBundle/Resources/config/routing/backend/property.yml delete mode 100644 src/Sylius/Bundle/WebBundle/Resources/views/Backend/Option/update.html.twig create mode 100644 src/Sylius/Bundle/WebBundle/Resources/views/Backend/Product/Form/_attributes.html.twig delete mode 100644 src/Sylius/Bundle/WebBundle/Resources/views/Backend/Product/Form/_properties.html.twig rename src/Sylius/Bundle/WebBundle/Resources/views/Backend/{Property => ProductAttribute}/_form.html.twig (100%) rename src/Sylius/Bundle/WebBundle/Resources/views/Backend/{Property => ProductAttribute}/create.html.twig (60%) create mode 100644 src/Sylius/Bundle/WebBundle/Resources/views/Backend/ProductAttribute/index.html.twig create mode 100644 src/Sylius/Bundle/WebBundle/Resources/views/Backend/ProductAttribute/macros.html.twig rename src/Sylius/Bundle/WebBundle/Resources/views/Backend/{Property => ProductAttribute}/update.html.twig (54%) rename src/Sylius/Bundle/WebBundle/Resources/views/Backend/{Option => ProductOption}/_form.html.twig (100%) rename src/Sylius/Bundle/WebBundle/Resources/views/Backend/{Option => ProductOption}/create.html.twig (56%) rename src/Sylius/Bundle/WebBundle/Resources/views/Backend/{Option => ProductOption}/index.html.twig (59%) rename src/Sylius/Bundle/WebBundle/Resources/views/Backend/{Option => ProductOption}/macros.html.twig (74%) create mode 100644 src/Sylius/Bundle/WebBundle/Resources/views/Backend/ProductOption/update.html.twig rename src/Sylius/Bundle/WebBundle/Resources/views/Backend/{Variant => ProductVariant}/_form.html.twig (100%) rename src/Sylius/Bundle/WebBundle/Resources/views/Backend/{Variant => ProductVariant}/create.html.twig (65%) rename src/Sylius/Bundle/WebBundle/Resources/views/Backend/{Variant => ProductVariant}/macros.html.twig (90%) rename src/Sylius/Bundle/WebBundle/Resources/views/Backend/{Variant => ProductVariant}/update.html.twig (62%) delete mode 100644 src/Sylius/Bundle/WebBundle/Resources/views/Backend/Property/index.html.twig delete mode 100644 src/Sylius/Bundle/WebBundle/Resources/views/Backend/Property/macros.html.twig create mode 100644 src/Sylius/Component/Attribute/.gitignore create mode 100644 src/Sylius/Component/Attribute/.travis.yml create mode 100644 src/Sylius/Component/Attribute/CHANGELOG.md create mode 100644 src/Sylius/Component/Attribute/LICENCE rename src/Sylius/Component/{Product/Model/Property.php => Attribute/Model/Attribute.php} (92%) rename src/Sylius/Component/{Product/Model/PropertyInterface.php => Attribute/Model/AttributeInterface.php} (79%) create mode 100644 src/Sylius/Component/Attribute/Model/AttributeTypes.php rename src/Sylius/Component/{Product/Model/ProductProperty.php => Attribute/Model/AttributeValue.php} (51%) rename src/Sylius/Component/{Product/Model/ProductPropertyInterface.php => Attribute/Model/AttributeValueInterface.php} (50%) create mode 100644 src/Sylius/Component/Attribute/Model/SubjectInterface.php create mode 100644 src/Sylius/Component/Attribute/README.md create mode 100644 src/Sylius/Component/Attribute/composer.json rename src/Sylius/Component/{Product/spec/Sylius/Component/Product/Model/PropertySpec.php => Attribute/spec/Sylius/Component/Attribute/Model/AttributeSpec.php} (81%) create mode 100644 src/Sylius/Component/Attribute/spec/Sylius/Component/Attribute/Model/AttributeValueSpec.php rename src/Sylius/Component/Core/Model/{Variant.php => ProductVariant.php} (92%) rename src/Sylius/Component/Core/Model/{VariantImage.php => ProductVariantImage.php} (70%) rename src/Sylius/Component/Core/Model/{VariantImageInterface.php => ProductVariantImageInterface.php} (60%) rename src/Sylius/Component/Core/Model/{VariantInterface.php => ProductVariantInterface.php} (69%) delete mode 100644 src/Sylius/Component/Product/Builder/Variable/PrototypeBuilder.php create mode 100644 src/Sylius/Component/Product/Model/Attribute.php create mode 100644 src/Sylius/Component/Product/Model/AttributeInterface.php create mode 100644 src/Sylius/Component/Product/Model/AttributeValue.php create mode 100644 src/Sylius/Component/Product/Model/AttributeValueInterface.php create mode 100644 src/Sylius/Component/Product/Model/Option.php create mode 100644 src/Sylius/Component/Product/Model/OptionInterface.php create mode 100644 src/Sylius/Component/Product/Model/OptionValue.php create mode 100644 src/Sylius/Component/Product/Model/OptionValueInterface.php delete mode 100644 src/Sylius/Component/Product/Model/PropertyTypes.php delete mode 100644 src/Sylius/Component/Product/Model/Variable/Prototype.php delete mode 100644 src/Sylius/Component/Product/Model/Variable/PrototypeInterface.php create mode 100644 src/Sylius/Component/Product/Model/Variant.php create mode 100644 src/Sylius/Component/Product/Model/VariantInterface.php create mode 100644 src/Sylius/Component/Product/spec/Sylius/Component/Product/Model/AttributeSpec.php create mode 100644 src/Sylius/Component/Product/spec/Sylius/Component/Product/Model/AttributeValueSpec.php delete mode 100644 src/Sylius/Component/Product/spec/Sylius/Component/Product/Model/ProductPropertySpec.php delete mode 100644 src/Sylius/Component/Product/spec/Sylius/Component/Product/Model/Variable/VariableProductSpec.php create mode 100644 src/Sylius/Component/Variation/.gitignore create mode 100644 src/Sylius/Component/Variation/.travis.yml create mode 100644 src/Sylius/Component/Variation/CHANGELOG rename src/Sylius/{Bundle/VariableProductBundle => Component/Variation}/Generator/VariantGenerator.php (56%) rename src/Sylius/Component/{Product => Variation}/Generator/VariantGeneratorInterface.php (56%) create mode 100644 src/Sylius/Component/Variation/LICENCE rename src/Sylius/Component/{Product/Model/Variable => Variation/Model}/Option.php (98%) rename src/Sylius/Component/{Product/Model/Variable => Variation/Model}/OptionInterface.php (86%) rename src/Sylius/Component/{Product/Model/Variable => Variation/Model}/OptionValue.php (97%) rename src/Sylius/Component/{Product/Model/Variable => Variation/Model}/OptionValueInterface.php (96%) rename src/Sylius/Component/{Product/Model/Variable/VariableProduct.php => Variation/Model/Variable.php} (100%) rename src/Sylius/Component/{Product/Model/Variable/VariableProductInterface.php => Variation/Model/VariableInterface.php} (73%) rename src/Sylius/Component/{Product/Model/Variable => Variation/Model}/Variant.php (82%) rename src/Sylius/Component/{Product/Model/Variable => Variation/Model}/VariantInterface.php (71%) create mode 100644 src/Sylius/Component/Variation/README.md create mode 100644 src/Sylius/Component/Variation/composer.json rename src/Sylius/Component/{Product/spec/Sylius/Component/Product/Model/Variable => Variation/spec/Sylius/Component/Variation/Model}/OptionSpec.php (88%) rename src/Sylius/Component/{Product/spec/Sylius/Component/Product/Model/Variable => Variation/spec/Sylius/Component/Variation/Model}/OptionValueSpec.php (89%) create mode 100644 src/Sylius/Component/Variation/spec/Sylius/Component/Variation/Model/VariableProductSpec.php rename src/Sylius/Component/{Product/spec/Sylius/Component/Product/Model/Variable => Variation/spec/Sylius/Component/Variation/Model}/VariantSpec.php (61%) diff --git a/app/config/config_test.yml b/app/config/config_test.yml index e32ddab7d9..b27c1dfccf 100644 --- a/app/config/config_test.yml +++ b/app/config/config_test.yml @@ -19,7 +19,7 @@ sylius_money: currency: EUR locale: en_US -sylius_payments: +sylius_payment: gateways: cc: Credit Card test: Test diff --git a/features/backend/product_attributes.feature b/features/backend/product_attributes.feature new file mode 100644 index 0000000000..aace017817 --- /dev/null +++ b/features/backend/product_attributes.feature @@ -0,0 +1,145 @@ +@products +Feature: Product attributes + In order to show specific product parameters to customer + As a store owner + I want to be able to configure product attributes + + Background: + Given I am logged in as administrator + And there are following attributes: + | name | presentation | + | T-Shirt collection | Collection | + | T-Shirt fabric | T-Shirt fabric | + + Scenario: Seeing index of all attributes + Given I am on the dashboard page + When I follow "Configure attributes" + Then I should be on the product attribute index page + And I should see 2 attributes in the list + + Scenario: Seeing empty index of attributes + Given there are no product attributes + When I am on the product attribute index page + Then I should see "There are no attributes configured" + + Scenario: Accessing the product attribute creation form + Given I am on the dashboard page + When I follow "Configure attributes" + And I follow "Create product attribute" + Then I should be on the product attribute creation page + + Scenario: Submitting form without specifying the name + Given I am on the product attribute creation page + When I press "Create" + Then I should still be on the product attribute creation page + And I should see "Please enter attribute name" + + Scenario: Submitting form without specifying the presentation + Given I am on the product attribute creation page + When I fill in "Internal name" with "Book author" + And I press "Create" + Then I should still be on the product attribute creation page + And I should see "Please enter attribute presentation" + + Scenario: Creating new attribute + Given I am on the product attribute creation page + When I fill in "Internal name" with "Book author" + And I fill in "Presentation" with "Author" + And I press "Create" + Then I should still be on the product attribute index page + And I should see "Attribute has been successfully created." + + Scenario: Created attributes appear in the list + Given I created attribute "Food" + When I go to the product attribute index page + Then I should see 3 attributes in the list + And I should see attribute with name "Food" in that list + + Scenario: Accessing the editing form from the list + Given I am on the product attribute index page + When I click "edit" near "T-Shirt collection" + Then I should be editing product attribute "T-Shirt collection" + + Scenario: Updating the attribute + Given I am editing product attribute "T-Shirt collection" + When I fill in "Internal name" with "T-Shirt edition" + And I press "Save changes" + Then I should still be on the product attribute index page + And I should see "Attribute has been successfully updated." + + @javascript + Scenario: Deleted attribute disappears from the list + Given I am on the product attribute index page + When I click "delete" near "T-Shirt fabric" + And I click "delete" from the confirmation modal + Then I should still be on the product attribute index page + And I should see "Attribute has been successfully deleted." + And I should not see attribute with name "T-Shirt fabric" in that list + + Scenario: Creating string attribute by default + Given I am on the product attribute creation page + When I fill in "Internal name" with "Book author" + And I fill in "Presentation" with "Author" + And I press "Create" + Then I should still be on the product attribute index page + And I should see "Attribute has been successfully created." + And product attribute with following data should be created: + | name | Book author | + | type | text | + + Scenario Outline: Creating new attribute for type + Given I am on the product attribute creation page + When I fill in "Internal name" with "Book author" + And I fill in "Presentation" with "Author" + And I select "