| @@ 747-758 (lines=12) @@ | ||
| 744 | if (!is_null($id)) { |
|
| 745 | /* @var $Product \Eccube\Entity\Product */ |
|
| 746 | $Product = $this->productRepository->find($id); |
|
| 747 | if (!$Product) { |
|
| 748 | if ($request->isXmlHttpRequest()) { |
|
| 749 | $message = trans('admin.common.delete_error_already_deleted'); |
|
| 750 | ||
| 751 | return $this->json(['success' => $success, 'message' => $message]); |
|
| 752 | } else { |
|
| 753 | $this->deleteMessage(); |
|
| 754 | $rUrl = $this->generateUrl('admin_product_page', ['page_no' => $page_no]).'?resume='.Constant::ENABLED; |
|
| 755 | ||
| 756 | return $this->redirect($rUrl); |
|
| 757 | } |
|
| 758 | } |
|
| 759 | ||
| 760 | if ($Product instanceof Product) { |
|
| 761 | log_info('商品削除開始', [$id]); |
|
| @@ 814-826 (lines=13) @@ | ||
| 811 | $message = trans('admin.common.delete_error'); |
|
| 812 | } |
|
| 813 | ||
| 814 | if ($request->isXmlHttpRequest()) { |
|
| 815 | return $this->json(['success' => $success, 'message' => $message]); |
|
| 816 | } else { |
|
| 817 | if ($success) { |
|
| 818 | $this->addSuccess($message, 'admin'); |
|
| 819 | } else { |
|
| 820 | $this->addError($message, 'admin'); |
|
| 821 | } |
|
| 822 | ||
| 823 | $rUrl = $this->generateUrl('admin_product_page', ['page_no' => $page_no]).'?resume='.Constant::ENABLED; |
|
| 824 | ||
| 825 | return $this->redirect($rUrl); |
|
| 826 | } |
|
| 827 | } |
|
| 828 | ||
| 829 | /** |
|