| @@ 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 | ||
| @@ 723-748 (lines=26) @@ | ||
| 720 | ||
| 721 | $form->handleRequest($request); |
|
| 722 | ||
| 723 | if ($form->isSubmitted() && $form->isValid()) { |
|
| 724 | // 会員の場合、お届け先情報を新規登録 |
|
| 725 | $Shipping->setFromCustomerAddress($CustomerAddress); |
|
| 726 | ||
| 727 | if ($Customer instanceof Customer) { |
|
| 728 | $app['orm.em']->persist($CustomerAddress); |
|
| 729 | } |
|
| 730 | ||
| 731 | // 配送料金の設定 |
|
| 732 | $app['eccube.service.shopping']->setShippingDeliveryFee($Shipping); |
|
| 733 | ||
| 734 | // 配送先を更新 |
|
| 735 | $app['orm.em']->flush(); |
|
| 736 | ||
| 737 | $event = new EventArgs( |
|
| 738 | array( |
|
| 739 | 'form' => $form, |
|
| 740 | 'Shipping' => $Shipping, |
|
| 741 | 'CustomerAdderss' => $CustomerAddress, |
|
| 742 | ), |
|
| 743 | $request |
|
| 744 | ); |
|
| 745 | $app['eccube.event.dispatcher']->dispatch(EccubeEvents::FRONT_SHOPPING_SHIPPING_EDIT_COMPLETE, $event); |
|
| 746 | ||
| 747 | return $app->redirect($app->url('shopping')); |
|
| 748 | } |
|
| 749 | ||
| 750 | return $app->render('Shopping/shipping_edit.twig', array( |
|
| 751 | 'form' => $form->createView(), |
|