その他 > その他 > 注文手続き画面に項目追加したい |
その他
フラット表示 | 前のトピック | 次のトピック |
投稿者 | スレッド |
---|---|
eccbeginer |
投稿日時: 2019/7/26 13:53
対応状況: −−−
|
半人前 登録日: 2019/5/14 居住地: 投稿: 11 |
Re: 注文手続き画面に項目追加したい 田中様
早速のご返信をありがとうございます。 Eccube\Form\Type\Shopping\ShoppingType.phpは 以下のように定義しております。 「←追記」の部分が追記箇所(計7か所)となります。 namespace Eccube\Form\Type; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\TextareaType; use Symfony\Component\Form\Extension\Core\Type\TextType; ← 追記 use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Validator\Constraints as Assert; class ShoppingType extends AbstractType { /** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { $payments = $options['payments']; $payment = $options['payment']; $message = $options['message']; $receipt_address = $options['receipt_address']; ←追記 $builder ->add('payment', EntityType::class, [ 'class' => 'Eccube\Entity\Payment', 'choice_label' => 'method', 'choices' => $payments, 'data' => $payment, 'expanded' => true, 'constraints' => [ new Assert\NotBlank(), ], ]) ->add('message', TextareaType::class, [ 'required' => false, 'data' => $message, 'constraints' => [ new Assert\Length(['min' => 0, 'max' => 3000]), ], ]) ->add('receipt_address', TextType::class, [ ←追記 'required' => false, ←追記 'data' => $receipt_address ←追記 ]); ←追記 } public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'payments' => [], 'payment' => null, 'message' => null, 'receipt_address' => null ←追記 ]); } /** * {@inheritdoc} */ public function getBlockPrefix() { return 'shopping'; } } どうぞよろしくお願い致します。 |
フラット表示 | 前のトピック | 次のトピック |
題名 | 投稿者 | 日時 |
---|---|---|
注文手続き画面に項目追加したい | eccbeginer | 2019/7/26 12:36 |
Re: 注文手続き画面に項目追加したい | h_tanaka | 2019/7/26 12:41 |
» Re: 注文手続き画面に項目追加したい | eccbeginer | 2019/7/26 13:53 |
Re: 注文手続き画面に項目追加したい | h_tanaka | 2019/7/26 17:31 |
Re: 注文手続き画面に項目追加したい | eccbeginer | 2019/7/26 18:27 |
Re: 注文手続き画面に項目追加したい | h_tanaka | 2019/7/29 21:42 |
Re: 注文手続き画面に項目追加したい | eccbeginer | 2019/8/4 6:34 |
Re: 注文手続き画面に項目追加したい | aposto | 2019/9/25 1:44 |
Re: 注文手続き画面に項目追加したい | iwanaga | 2021/2/12 11:39 |
Re: 注文手続き画面に項目追加したい | ゲスト | 2019/9/16 20:56 |
Re: 注文手続き画面に項目追加したい | PDanny | 2019/10/11 23:59 |