EC-CUBE / EC-CUBE/ec-cube3

個別税率が適用されない

Open
#46 1 comment 0 reactions 0 assignees View on GitHub
bug:Middle Status: discussion
Dominant language
PHP
Stars
13
Forks
26
PR merge metrics
No merged PRs in 30d

Description

## 概要(Overview)
EC-CUBE/ec-cube#2158 の修正により、個別税率が正しく取得できなくなっているようです。
src/Eccube/Doctrine/EventSubscriber/TaxRuleEventSubscriber.phpのpostLoad()にて、$entity->getProduct()がNULLになってしまいます。

[個別税率が反映されるページ]
商品一覧
購入確認
(受注データには反映されています)

[個別税率が反映されないページ]
商品詳細
カート

商品詳細については、ProductRepository.phpのget()内で、ProductClassesをselectしているために起こっているようです。

## 期待する内容(Expect) or 要望 (Requirement)
src/Eccube/Doctrine/EventSubscriber/TaxRuleEventSubscriber.phpのpostLoad()にて、$entity->getProduct()が正しく取得できること。

## 再現手順(Procedure)
管理画面で個別税率を設定して、フロントで商品詳細を表示

### 環境 (environment)
EC-CUBE: 3.0.14
PHP: 7.0
DB:
MySQL 5.7

## 関連情報 (Ref)
EC-CUBE/ec-cube#2158

Contributor guide

Open the contributing guide

Research direction

Start by reading src/Eccube/Doctrine/EventSubscriber/TaxRuleEventSubscriber.php, especially postLoad(), and ProductRepository.php get(), then reproduce the issue by setting an individual tax rate in the admin and opening a product detail page. Done means getProduct() is correctly available in postLoad() and the individual tax rate is reflected on product details and in the cart.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.