|
@@ 288-298 (lines=11) @@
|
| 285 |
|
|
| 286 |
|
$this->setCanAddProductType($ProductClass->getProductType()); |
| 287 |
|
|
| 288 |
|
if ($this->BaseInfo->getOptionMultipleShipping() != Constant::ENABLED) { |
| 289 |
|
if (!$this->canAddProduct($ProductClass->getId())) { |
| 290 |
|
// 複数配送対応でなく、かつ商品種別が異なればエラー |
| 291 |
|
throw new CartException('cart.product.type.kind'); |
| 292 |
|
} |
| 293 |
|
} else { |
| 294 |
|
// 複数配送対応で、かつ同一支払方法がなければエラー |
| 295 |
|
if (!$this->canAddProductPayment($ProductClass->getProductType())) { |
| 296 |
|
throw new CartException('cart.product.payment.kind'); |
| 297 |
|
} |
| 298 |
|
} |
| 299 |
|
|
| 300 |
|
$compareService = $this->generateCartCompareService(); |
| 301 |
|
$ExistsCartItem = $compareService->getExistsCartItem($CartItem); |
|
@@ 457-467 (lines=11) @@
|
| 454 |
|
|
| 455 |
|
$this->setCanAddProductType($ProductClass->getProductType()); |
| 456 |
|
|
| 457 |
|
if ($this->BaseInfo->getOptionMultipleShipping() != Constant::ENABLED) { |
| 458 |
|
if (!$this->canAddProduct($ProductClass->getId())) { |
| 459 |
|
// 複数配送対応でなければ商品種別が異なればエラー |
| 460 |
|
throw new CartException('cart.product.type.kind'); |
| 461 |
|
} |
| 462 |
|
} else { |
| 463 |
|
// 複数配送の場合、同一支払方法がなければエラー |
| 464 |
|
if (!$this->canAddProductPayment($ProductClass->getProductType())) { |
| 465 |
|
throw new CartException('cart.product.payment.kind'); |
| 466 |
|
} |
| 467 |
|
} |
| 468 |
|
|
| 469 |
|
$tmp_subtotal = 0; |
| 470 |
|
$tmp_quantity = 0; |