質問 > 管理機能 > 商品種別エラー |
管理機能
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | 下へ |
投稿者 | スレッド |
---|---|
acxAura |
投稿日時: 2022/10/12 14:57
対応状況: 開発中
|
半人前 登録日: 2022/10/6 居住地: 投稿: 17 |
商品種別エラー ▼テンプレート
[EC-CUBE] 4.1.2 お世話になっております eccubeで色々なパーツを組み合わせて商品を作ろうと思っています 流れは Parts A table / Parts B table / Parts C tableから選んだパーツをcustomというテーブルに入れて、customのidをproduct codeに入れた新しいentityを生成して直接にdtb_product_classに入れました それで、ちゃんとカートに入れられました でも、商品種別が違う商品が先にカートにあったら、 An exception occurred while executing 'INSERT INTO dtb_cart (cart_key, pre_order_id, total_price, delivery_fee_total, sort_no, create_date, update_date, add_point, use_point, customer_id, discriminator_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["f7yLmv3BIhMfvbKRirBR7NswtT6QZdDi_2", null, null, null, null, "2022-10-12 03:10:23", "2022-10-12 03:10:23", "0", "0", null, "cart"]: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'total_price' cannot be null こんなエラーが出てます 二つのカートがあったら、二つ目のカートのtotal_priceがnullになっています
これが作ったproduct_classをカートに入れるためのコードです addProductの後 dump($this->cartService->getCarts())でチェックしてみましたが、二つ目のカートのtotal priceは商品が中にあるのにnullでした |
acxAura |
投稿日時: 2022/10/12 19:24
対応状況: −−−
|
半人前 登録日: 2022/10/6 居住地: 投稿: 17 |
Re: 商品種別エラー SaleTypeCartAllocator.phpのallocateをreturn 1にして、カートを一つ商品種別に構わず一つのカートを生成することで解決しました
|
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | トップ |