|
@@ 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); |
|
@@ 415-425 (lines=11) @@
|
| 412 |
|
|
| 413 |
|
$this->setCanAddProductType($ProductClass->getProductType()); |
| 414 |
|
|
| 415 |
|
if ($this->BaseInfo->getOptionMultipleShipping() != Constant::ENABLED) { |
| 416 |
|
if (!$this->canAddProduct($ProductClass->getId())) { |
| 417 |
|
// 複数配送対応でなければ商品種別が異なればエラー |
| 418 |
|
throw new CartException('cart.product.type.kind'); |
| 419 |
|
} |
| 420 |
|
} else { |
| 421 |
|
// 複数配送の場合、同一支払方法がなければエラー |
| 422 |
|
if (!$this->canAddProductPayment($ProductClass->getProductType())) { |
| 423 |
|
throw new CartException('cart.product.payment.kind'); |
| 424 |
|
} |
| 425 |
|
} |
| 426 |
|
|
| 427 |
|
$tmp_subtotal = 0; |
| 428 |
|
$tmp_quantity = 0; |