EC-CUBE / EC-CUBE/ec-cube

フロント側商品一覧画面で、商品別税率機能を使って「価格の高い順」に並べ替えしたところ意図した並び順にならない。

Open
#4,534 1 comment 1 reaction 0 assignees View on GitHub
bug:Middle
Dominant language
PHP
Stars
788
Forks
719
Avg merge
4d 4h
Merged PRs (30d)
39

Description

## 概要(Overview)
商品別税率機能を使い、
https://site4.ec-cube.net/admin/setting/shop
より、税設定の商品別税率機能を指定しました。

商品一覧画面で、「価格の高い順」に並べ替えしたところ意図した並び順にならない。

## 期待する内容(Expect) or 要望 (Requirement)

期待する内容(Expect)
- 税込み価格でソートができる。

要望 (Requirement)
- そもそもフロント側の商品一覧での価格が、税抜 or 税込 とどちらか表示してほしい。
- 税抜とする場合は、画面別で表示が違ってても問題どうか見解がほしい。(商品詳細画面で「税込」のため、画面によって表記が違う)
- 税抜とする場合は、規格あり商品をセレクトボックスで選択しても税抜価格で算出する。
- 税込とする場合は、QueryBuilderの改修。

## 再現手順(Procedure)

https://site4.ec-cube.net/admin/setting/shop
より、税設定の商品別税率機能を指定

価格の同一の商品A、商品Bを作成する。
商品Aの「商品規格登録 商品管理」より税率を指定する。
このとき、商品A>商品Bになるように税率を設定する。

https://site4.ec-cube.net/products/list?mode=&category_id=&name=&pageno=1&disp_number=0&orderby=1
並び順を「価格の高い順」を指定すると、本来「商品A」「商品B」の順に並ぶのが
商品B、商品Aで並ぶ。

### 環境 (environment)
+ EC-CUBE: 4.0.x
+ PHP: 7.x.x
+ DB:
- PostgreSQL x.x.x
- MySQL x.x.x

## 関連情報 (Ref)
1)フロント側商品一覧画面 該当箇所(twigファイル)
https://github.com/EC-CUBE/ec-cube/blob/4.0/src/Eccube/Resource/template/default/Product/list.twig#L156-L164
 税込価格で表示している。

2)フロント側商品一覧画面 該当箇所(Repogitoryファイル)
https://github.com/EC-CUBE/ec-cube/blob/4.0/src/Eccube/Repository/ProductRepository.php#L180
 税抜価格に対してOrderbyしている。

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.