| @@ 67-88 (lines=22) @@ | ||
| 64 | $form = $builder->getForm(); |
|
| 65 | $form->handleRequest($request); |
|
| 66 | ||
| 67 | if ($form->isSubmitted() && $form->isValid()) { |
|
| 68 | ||
| 69 | if ($Customer->getPassword() === $app['config']['default_password']) { |
|
| 70 | $Customer->setPassword($previous_password); |
|
| 71 | } else { |
|
| 72 | $Customer->setPassword( |
|
| 73 | $app['eccube.repository.customer']->encryptPassword($app, $Customer) |
|
| 74 | ); |
|
| 75 | } |
|
| 76 | $app['orm.em']->flush(); |
|
| 77 | ||
| 78 | $event = new EventArgs( |
|
| 79 | array( |
|
| 80 | 'form' => $form, |
|
| 81 | 'Customer' => $Customer, |
|
| 82 | ), |
|
| 83 | $request |
|
| 84 | ); |
|
| 85 | $app['eccube.event.dispatcher']->dispatch(EccubeEvents::FRONT_MYPAGE_CHANGE_INDEX_COMPLETE, $event); |
|
| 86 | ||
| 87 | return $app->redirect($app->url('mypage_change_complete')); |
|
| 88 | } |
|
| 89 | ||
| 90 | $app['security']->getToken()->setUser($LoginCustomer); |
|
| 91 | ||
| @@ 770-795 (lines=26) @@ | ||
| 767 | ||
| 768 | $form->handleRequest($request); |
|
| 769 | ||
| 770 | if ($form->isSubmitted() && $form->isValid()) { |
|
| 771 | // 会員の場合、お届け先情報を新規登録 |
|
| 772 | $Shipping->setFromCustomerAddress($CustomerAddress); |
|
| 773 | ||
| 774 | if ($Customer instanceof Customer) { |
|
| 775 | $app['orm.em']->persist($CustomerAddress); |
|
| 776 | } |
|
| 777 | ||
| 778 | // 配送料金の設定 |
|
| 779 | $app['eccube.service.shopping']->setShippingDeliveryFee($Shipping); |
|
| 780 | ||
| 781 | // 配送先を更新 |
|
| 782 | $app['orm.em']->flush(); |
|
| 783 | ||
| 784 | $event = new EventArgs( |
|
| 785 | array( |
|
| 786 | 'form' => $form, |
|
| 787 | 'Shipping' => $Shipping, |
|
| 788 | 'CustomerAddress' => $CustomerAddress, |
|
| 789 | ), |
|
| 790 | $request |
|
| 791 | ); |
|
| 792 | $app['eccube.event.dispatcher']->dispatch(EccubeEvents::FRONT_SHOPPING_SHIPPING_EDIT_COMPLETE, $event); |
|
| 793 | ||
| 794 | return $app->redirect($app->url('shopping')); |
|
| 795 | } |
|
| 796 | ||
| 797 | return $app->render( |
|
| 798 | 'Shopping/shipping_edit.twig', |
|