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

カテゴリに紐付いた商品が0となった場合に dtb_category_total_count が更新されない #125

Closed
seasoftjapan opened this issue Mar 29, 2017 · 1 comment · Fixed by #431
Milestone

Comments

@seasoftjapan
Copy link
Contributor

         //各カテゴリ内の商品数を数えて取得
         $sql = <<< __EOS__
             SELECT T1.category_id, count(T2.category_id) as product_count
             FROM dtb_category AS T1
                 LEFT JOIN dtb_product_categories AS T2
                     ON T1.category_id = T2.category_id
                 LEFT JOIN $from
                     ON T2.product_id = alldtl.product_id
-            WHERE $sql_where
+                        AND $sql_where
             GROUP BY T1.category_id, T2.category_id
 __EOS__;
@ryo-endo ryo-endo added this to the 2.17.0 milestone Oct 26, 2017
@so-amuamu so-amuamu added bug:Middle and removed bug labels Jul 31, 2018
@chihiro-adachi chihiro-adachi modified the milestones: 2.17.0, 2.17.1 Oct 31, 2019
@ryo-endo ryo-endo modified the milestones: 2.17.1, 2.17.2 Jun 29, 2020
@seasoftjapan
Copy link
Contributor Author

冒頭記載の方法では、別の問題を生じるため、別の対応を考えます。

seasoftjapan added a commit to seasoftjapan/eccube-2_13 that referenced this issue Dec 10, 2020
商品0件の場合、dtb_category_count dtb_category_total_count に残さない。
変数名を整理。
配列を短縮構文で記述。
@nanasess nanasess modified the milestones: 2.17.2, 2.17.3 Nov 12, 2021
seasoftjapan added a commit to seasoftjapan/eccube-2_13 that referenced this issue Feb 16, 2024
別件と同時実装し、9bdf20819b897c07696d1377b37c4cee66bd2188 で本件を分離する際に混入したもの。実質的な動作に変化はない。
seasoftjapan added a commit to seasoftjapan/eccube-2_13 that referenced this issue Feb 16, 2024
nanasess added a commit that referenced this issue Mar 24, 2024
カテゴリに紐付いた商品が0となった場合に dtb_category_total_count が更新されない #125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants