Sylius添加新区域范围

问题描述

我正在使用Sylius v1.4.7框架,我想以区域形式在选择列表中添加一个新作用域,但是我不知道该怎么做。你能帮我吗?

我重写了此类ZoneChoiceType,但徒然,我仍然在范围选择输入中保留了认值

解决方法

这里是form customization的指南。 正确的自定义类型是Sylius\Bundle\AddressingBundle\Form\Type\ZoneTypeChoiceTypeSylius\Bundle\AddressingBundle\Form\Type\ZoneType

您还可以use configuration添加新的范围。