Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

上限を超えたお届け先の登録の修正 #6085

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Eccube/Controller/ShoppingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\RateLimiter\RateLimiterFactory;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\RouterInterface;
Expand Down Expand Up @@ -666,6 +667,12 @@ public function shippingEdit(Request $request, Shipping $Shipping)
return $this->redirectToRoute('shopping_error');
}

$Customer = $this->getUser();
$addressCurrNum = count($Customer->getCustomerAddresses());
$addressMax = $this->eccubeConfig['eccube_deliv_addr_max'];
if ($addressCurrNum >= $addressMax) {
throw new NotFoundHttpException();
}
$CustomerAddress = new CustomerAddress();
if ($this->isGranted('IS_AUTHENTICATED_FULLY')) {
// ログイン時は会員と紐付け
Expand Down