如何将频道输入我的ShippingMethod-Step

时间:2017-01-31 18:53:14

标签: symfony sylius

我店里有多个频道。 渠道都有完全相同的产品。 现在我想让用户在不同的频道之间进行选择 在结账过程中。

最佳运输方式按渠道分组。 e.g。

===========================
| Channel 1
===========================
| ( ) Pickup
| (x) Shipping
|                => Move on

===========================
| Channel 2
===========================
| ( ) Pickup
| (x) Shipping
|                => Move on

我现在选择其中一个选项会发生多种情况:

  1. 频道已切换
  2. 已选择ShippingMethod
  3. 购物车转移到另一个频道
  4. 所有这些都应该可以用sylius。 我最大的问题是基本的。

    Sylius使用ResourceBundle从存储库加载实体。 我有一个像这样配置的路线:

    sylius_shop_checkout_select_shipping:
    path: /select-shipping
    methods: [GET, PUT]
    defaults:
        _controller: sylius.controller.order:updateAction
        _sylius:
            event: select_shipping
            flash: false
            template: SyliusShopBundle:Checkout:selectShipping.html.twig
            form: Sylius\Bundle\CoreBundle\Form\Type\Checkout\SelectShippingType
            repository:
                method: find
                arguments:
                    - "expr:service('sylius.context.cart').getCart()"
            state_machine:
                graph: sylius_order_checkout
                transition: select_shipping
            redirect:
                route: sylius_shop_checkout_select_payment
                parameters: []
    

    允许使用单个“存储库”密钥。 我是否必须构建自己的控制器并直接从服务容器中使用repositiories?

0 个答案:

没有答案