mw-cms/ecommerce-bundle

Ecommerce bundle based on sylius

Maintainers

👁 awstudio

Package info

gitlab.com/mw8900446/ecommerce-bundle

Issues

Type:symfony-bundle

pkg:composer/mw-cms/ecommerce-bundle

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

dev-main 2025-11-12 17:44 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 05a8c5cdf6a6ae4b26b50d3ec17d261d61b9476b

  • awstudio <contact.woop@awstudio.fr>

Ecommerce bundle

This package is not auto-updated.

Last update: 2026-06-25 19:11:34 UTC


README

Installation

AppKernel.php

Please register the bundle before DoctrineBundle. This is important as we use listeners which have to be processed first.

public function registerBundles()
{
 $bundles = [
 new FOS\RestBundle\FOSRestBundle(),
 new JMS\SerializerBundle\JMSSerializerBundle($this),
 new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
 new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
 new winzou\Bundle\StateMachineBundle\winzouStateMachineBundle(),
 new Sylius\Bundle\LocaleBundle\SyliusLocaleBundle(),
 new Sylius\Bundle\AttributeBundle\SyliusAttributeBundle(),
 new Sylius\Bundle\ProductBundle\SyliusProductBundle(),
 new Sylius\Bundle\AttributeBundle\SyliusAttributeBundle(),
 new Sylius\Bundle\TaxonomyBundle\SyliusTaxonomyBundle(),
 new Sylius\Bundle\ResourceBundle\SyliusResourceBundle(),
 new AWEcommerceBundle\AWEcommerceBundle(),
 new Misd\PhoneNumberBundle\MisdPhoneNumberBundle()
 new Knp\Bundle\SnappyBundle\KnpSnappyBundle(),

 // Other bundles...
 new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
 ];
}

Entities

Create this entities and give them a Table name

  • AppBundle\Entity\Ecommerce\Address extends AWEcommerceBundle\Entity\Address
  • AppBundle\Entity\Ecommerce\Customer extends AWEcommerceBundle\Entity\Customer
  • AppBundle\Entity\Ecommerce\CustomerGroup extends AWEcommerceBundle\Entity\CustomerGroup
  • AppBundle\Entity\Ecommerce\Order extends AWEcommerceBundle\Entity\Order
  • AppBundle\Entity\Ecommerce\OrderItem extends AWEcommerceBundle\Entity\OrderItem
  • AppBundle\Entity\Ecommerce\ProductCustom extends AWEcommerceBundle\Entity\Product
  • AppBundle\Entity\Ecommerce\ProductVariantCustom extends AWEcommerceBundle\Entity\ProductVariant
  • AppBundle\Entity\Ecommerce\Promotion extends AWEcommerceBundle\Entity\Promotion
  • AppBundle\Entity\Ecommerce\SponsorPromotion extends AWEcommerceBundle\Entity\SponsorPromotion

SQL

Run this queries to add the elements:

INSERT INTO modules (name, enabled, has_element, position, bundle) VALUES 
('ecommerce', 1, 0, 0, 'AWEcommerceBundle'),
('productList', 1, 1, 30, 'AWEcommerceBundle'),
('ecommerceHeader', 1, 1, 32, 'AWEcommerceBundle')

routing.yml

aw_ec:
 resource: "@AWEcommerceBundle/Controller/Admin"
 type: annotation
 prefix: /admin/ecommerce

config.yml

obligatoire:

aw_ec:
 address:

for the shipping methods you have to define a service that uses the interface AWEcommerceBundle\Service\Shipping\ShippingInterface and as key use the same that returns the method "getShippingServiceName"

optionnel:

aw_ec:
 address:
 class: AppBundle\Entity\Ecommerce\Address
 form: AppBundle\Form\Shipping\AddressType
 available_shipping_services:
 sendCloud: 'aw_studio.shipping.connector.send_cloud'
 personalized: AWEcommerceBundle\Service\Shipping\PersonalizedShippingService
 available_payment_methods:
 stripe: 'aw.ec.payment_stripe_manager'

Based on sylius :

  • SyliusProductBundle
  • SyliusTaxationBundle
  • SyliusAttributeBundle

Configuration reference

sylius_product:
 driver: doctrine/orm
 resources:
 product:
 classes:
 model: Sylius\Component\Core\Model\Product
 repository: Sylius\Bundle\CoreBundle\Doctrine\ORM\ProductRepository
 form: Sylius\Bundle\CoreBundle\Form\Type\Product\ProductType
 interface: Sylius\Component\Product\Model\ProductInterface
 controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
 factory: Sylius\Component\Product\Factory\ProductFactory
 translation:
 classes:
 model: Sylius\Component\Core\Model\ProductTranslation
 form: Sylius\Bundle\CoreBundle\Form\Type\Product\ProductTranslationType
 interface: Sylius\Component\Product\Model\ProductTranslationInterface
 controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
 factory: Sylius\Component\Resource\Factory\Factory
 product_variant:
 classes:
 model: Sylius\Component\Core\Model\ProductVariant
 repository: Sylius\Bundle\ProductBundle\Doctrine\ORM\ProductVariantRepository
 form: Sylius\Bundle\CoreBundle\Form\Type\Product\ProductVariantType
 interface: Sylius\Component\Product\Model\ProductVariantInterface
 controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
 factory: Sylius\Component\Product\Factory\ProductVariantFactory
 product_option:
 classes:
 repository: Sylius\Bundle\ProductBundle\Doctrine\ORM\ProductOptionRepository
 model: Sylius\Component\Product\Model\ProductOption
 interface: Sylius\Component\Product\Model\ProductOptionInterface
 controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
 factory: Sylius\Component\Resource\Factory\TranslatableFactory
 form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionType
 translation:
 classes:
 model: Sylius\Component\Product\Model\ProductOptionTranslation
 interface: Sylius\Component\Product\Model\ProductOptionTranslationInterface
 controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
 factory: Sylius\Component\Resource\Factory\Factory
 form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionTranslationType
 product_option_value:
 classes:
 model: Sylius\Component\Product\Model\ProductOptionValue
 interface: Sylius\Component\Product\Model\ProductOptionValueInterface
 controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
 factory: Sylius\Component\Resource\Factory\TranslatableFactory
 form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionValueType
 translation:
 classes:
 model: Sylius\Component\Product\Model\ProductOptionValueTranslation
 interface: Sylius\Component\Product\Model\ProductOptionValueTranslationInterface
 controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
 factory: Sylius\Component\Resource\Factory\Factory
 form: Sylius\Bundle\ProductBundle\Form\Type\ProductOptionValueTranslationType
 product_association:
 classes:
 model: Sylius\Component\Product\Model\ProductAssociation
 interface: Sylius\Component\Product\Model\ProductAssociationInterface
 controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
 factory: Sylius\Component\Resource\Factory\Factory
 form: Sylius\Bundle\ProductBundle\Form\Type\ProductAssociationType
 product_association_type:
 classes:
 model: Sylius\Component\Product\Model\ProductAssociationType
 interface: Sylius\Component\Product\Model\ProductAssociationTypeInterface
 controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
 factory: Sylius\Component\Resource\Factory\Factory
 form: Sylius\Bundle\ProductBundle\Form\Type\ProductAssociationTypeType