Sylius 和覆盖默认装置

问题描述 投票:0回答:0

我尝试覆盖默认装置。我创建的 config\packages\sylius_fixtures.yaml 与文档中的内容完全一样https://docs.sylius.com/en/1.12/customization/fixtures.html#how-to-modify-the-existing-sylius-fixtures

sylius_fixtures:
    suites:
        default: # this key is always called whenever the sylius:fixtures:load command is called, below we are extending it with new fixtures
            fixtures:
                currency:
                    options:
                        currencies: ['PLN','HUF']
                channel:
                    options:
                        custom:
                            pl_web_store: # creating new channel
                                name: "PL Web Store"
                                code: "PL_WEB"
                                locales:
                                    - "%locale%"
                                currencies:
                                    - "PLN"
                                enabled: true
                                hostname: "localhost"
                            hun_web_store:
                                name: "Hun Web Store"
                                code: "HUN_WEB"
                                locales:
                                    - "%locale%"
                                currencies:
                                    - "HUF"
                                enabled: true
                                hostname: "localhost"
                shipping_method:
                    options:
                        custom:
                            ups_eu: # creating a new shipping_method and adding channel to it
                                code: "ups_eu"
                                name: "UPS_eu"
                                enabled: true
                                channels:
                                    - "PL_WEB"
                                    - "HUN_WEB"
                payment_method:
                    options:
                        custom:
                            cash_on_delivery_pl:
                                code: "cash_on_delivery_eu"
                                name: "Cash on delivery_eu"
                                channels:
                                    - "PL_WEB"
                            bank_transfer:
                                code: "bank_transfer_eu"
                                name: "Bank transfer_eu"
                                channels:
                                    - "PL_WEB"
                                    - "HUN_WEB"
                                enabled: true

当我通过“docker compose exec php bin/console sylius:fixtures:load”运行固定装置时,我得到了错误:

我做错了什么?

在此先感谢您的帮助

sylius
© www.soinside.com 2019 - 2024. All rights reserved.