バージョン選択

フォーラム

メニュー

オンライン状況

74 人のユーザが現在オンラインです。 (62 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 74
もっと...

サイト内検索

バグ報告 > 管理機能 > 商品並び替え 正常に機能しない

管理機能

新規スレッドを追加する

| 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
illfrog300
投稿日時: 2009/10/13 16:57
対応状況: −−−
一人前
登録日: 2009/5/4
居住地:
投稿: 106
Re: 商品並び替え 正常に機能しない
いつもお世話になっております。

現在私も、この「商品並び替え」エラーを修正しようと
17853→17938→17959とLC_Page_Products_List.phpを修正しまして
vw_products_allclass_detailとvw_products_allclassをコミュニティバージョンのcreate_view.sqlを参考にビュー修正させて頂きました。しかし、商品一覧画面ではエラー表示。

ビューの参照が上手く処理されたいないと思いまして
ログを見ましたところ下記となつていました。

引用:
SELECT DISTINCT product_id FROM vw_products_allclass AS allcls WHERE del_flg = 0 AND status = 1 AND category_id IN ( ?,? ,? ,? ,? ,? )
DB Error: no such field

SELECT DISTINCT product_id FROM vw_products_allclass AS allcls WHERE del_flg = 0 AND status = 1 AND category_id IN ( 13,'17' ,'16' ,'15' ,'18' ,'14' ) [DB Error: no such field]

/var/www/html/products/list.php 34:LC_Page_Products_List_Ex->process
/var/www/html/data/class_extends/page_extends/products/LC_Page_Products_List_Ex.php 114:LC_Page_Products_List->lfDispProductsList
/var/www/html/data/class/pages/products/LC_Page_Products_List.php 434:SC_Query->getCol
/var/www/html/data/class/SC_Query.php 434:SC_DbConn->getCol
/var/www/html/data/class/SC_DbConn.php 133:DB_common->getCol
/var/www/html/data/module/DB/common.php 1368:DB_common->raiseError
/var/www/html/data/module/DB/common.php 1853:PEAR->raiseError
/var/www/html/data/module/PEAR.php 557:DB_Error->DB_Error
/var/www/html/data/module/DB.php 893:PEAR_Error->PEAR_Error


正直申しまして、旧ビューから今回の修正を行った上で適切となる
新ビューの必要項目がわかりきれていないためcreate_view.sqlの
SQL分をそのまま引用させて頂きビュー改訂を行った次第でございます。

現在の各ビューは下記構成となっております。
たいへん厚かましいご質問となりますが、
本修正を無事完了させるために必要なビュー項目をご教授頂けますと大変助かります。。

▼vw_products_allclass
引用:

product_id integer 変更
name text 変更
deliv_fee numeric 変更
sale_limit numeric 変更
rank integer 変更
status smallint 変更
product_flag text 変更
point_rate numeric 変更
comment1 text 変更
comment2 text 変更
comment3 text 変更
comment4 text 変更
comment5 text 変更
comment6 text 変更
note text 変更
file1 text 変更
file2 text 変更
file3 text 変更
file4 text 変更
file5 text 変更
file6 text 変更
main_list_comment text 変更
main_list_image text 変更
main_comment text 変更
main_image text 変更
main_large_image text 変更
sub_title1 text 変更
sub_comment1 text 変更
sub_image1 text 変更
sub_large_image1 text 変更
sub_title2 text 変更
sub_comment2 text 変更
sub_image2 text 変更
sub_large_image2 text 変更
sub_title3 text 変更
sub_comment3 text 変更
sub_image3 text 変更
sub_large_image3 text 変更
sub_title4 text 変更
sub_comment4 text 変更
sub_image4 text 変更
sub_large_image4 text 変更
sub_title5 text 変更
sub_comment5 text 変更
sub_image5 text 変更
sub_large_image5 text 変更
sub_title6 text 変更
sub_comment6 text 変更
sub_image6 text 変更
sub_large_image6 text 変更
del_flg smallint 変更
creator_id integer 変更
create_date timestamp without time zone 変更
update_date timestamp without time zone 変更
deliv_date_id integer 変更
product_code_min text 変更
product_code_max text 変更
price01_min numeric 変更
price01_max numeric 変更
price02_min numeric 変更
price02_max numeric 変更
stock_min numeric 変更
stock_max numeric 変更
stock_unlimited_min smallint 変更
stock_unlimited_max smallint 変更
class_count bigint 変更
category_rank integer 変更
category_id integer 変更
product_rank



▼vw_products_allclass_detail
引用:

product_id integer 変更
name text 変更
deliv_fee numeric 変更
sale_limit numeric 変更
rank integer 変更
status smallint 変更
product_flag text 変更
point_rate numeric 変更
comment1 text 変更
comment2 text 変更
comment3 text 変更
comment4 text 変更
comment5 text 変更
comment6 text 変更
note text 変更
file1 text 変更
file2 text 変更
file3 text 変更
file4 text 変更
file5 text 変更
file6 text 変更
main_list_comment text 変更
main_list_image text 変更
main_comment text 変更
main_image text 変更
main_large_image text 変更
sub_title1 text 変更
sub_comment1 text 変更
sub_image1 text 変更
sub_large_image1 text 変更
sub_title2 text 変更
sub_comment2 text 変更
sub_image2 text 変更
sub_large_image2 text 変更
sub_title3 text 変更
sub_comment3 text 変更
sub_image3 text 変更
sub_large_image3 text 変更
sub_title4 text 変更
sub_comment4 text 変更
sub_image4 text 変更
sub_large_image4 text 変更
sub_title5 text 変更
sub_comment5 text 変更
sub_image5 text 変更
sub_large_image5 text 変更
sub_title6 text 変更
sub_comment6 text 変更
sub_image6 text 変更
sub_large_image6 text 変更
del_flg smallint 変更
creator_id integer 変更
create_date timestamp without time zone 変更
update_date timestamp without time zone 変更
deliv_date_id integer 変更
product_code_min text 変更
product_code_max text 変更
price01_min numeric 変更
price01_max numeric 変更
price02_min numeric 変更
price02_max numeric 変更
stock_min numeric 変更
stock_max numeric 変更
stock_unlimited_min smallint 変更
stock_unlimited_max smallint 変更
class_count bigint 変更



seasoft
投稿日時: 2009/10/14 0:23
対応状況: −−−
登録日: 2008/6/4
居住地:
投稿: 7367
Re: 商品並び替え 正常に機能しない
私どものお客様の環境で同様の修正を行なう場合、正式版であってもビューはEC-CUBEコミュニティ(eccube-comu)のものに差し替えています。

ただし、EC-CUBEコミュニティは、テーブルに固有の追加列(確かメーカー検索絡み)があるので、その列だけは削除します。


----------------
Seasoft
こちらでの投稿は、アイディア程度に留めさせていただいております。
個別案件の作業は有償で承っております。お気軽にご相談ください。

illfrog300
投稿日時: 2009/10/14 1:15
対応状況: −−−
一人前
登録日: 2009/5/4
居住地:
投稿: 106
Re: 商品並び替え 正常に機能しない
ご返信ありがとう御座います。

かれこれこのビューの定義と格闘し始めて3日目となりました(笑

dtb_products.maker_idは既に外した状態となっています。

他にも修正前のvw_products_allclass_detailとvw_products_allclassをコミュニティ(eccube-comu)の物と見比べ、r17959を適用させた事により一体何の項目を追加させなければいけないのかと検討し試行錯誤しておりますが未だ解決の糸口をつかめていない状況となっています。
(r17959を適用させるにあたりどのようなビューの再定義がひつようとなってくるのかを宜しければご説明願えないでしょうか><)

引用:

FROM
dtb_products
LEFT JOIN
(
SELECT
product_id,
MIN(product_code) AS product_code_min,
MAX(product_code) AS product_code_max,
MIN(price01) AS price01_min,
MAX(price01) AS price01_max,
MIN(price02) AS price02_min,
MAX(price02) AS price02_max,
MIN(stock) AS stock_min,
MAX(stock) AS stock_max,
MIN(stock_unlimited) AS stock_unlimited_min,
MAX(stock_unlimited) AS stock_unlimited_max,
COUNT(*) as class_count
FROM dtb_products_class
GROUP BY product_id
) AS T4
ON dtb_products.product_id = T4.product_id
;

の呼び出し方自体が正式版2.4.0では適合しないとかはないですよね?

最新版:2.4.1のほうは今回の並び替えバグは改善されているのでしょうか?コードを見た限りでは修正されているように思えたのでご質問させて頂きました。(2.4.1のLc_Page_Products_List.phpとvw_products_allclass_detail&vw_products_allclassを入れ替えてみましたが同様のエラーにはなりました。)
seasoft
投稿日時: 2009/10/14 1:21
対応状況: −−−
登録日: 2008/6/4
居住地:
投稿: 7367
Re: 商品並び替え 正常に機能しない
> 他にも修正前のvw_products_allclass_detailとvw_products_allclassをコミュニティ(eccube- comu)の物と見比べ、r17959を適用させた事により一体何の項目を追加させなければいけないのかと検討し試行錯誤しておりますが未だ解決の糸口をつかめていない状況となっています。

見比べるのは大変そうですね。

私自身が、EC-CUBEコミュニティ(eccube-comu) でビューの改善を行なったときは、数段階に分けて展開しました。現状の差分で追うのは骨が折れそうです。


私ならば、自主的には見比べるといった行為は行なわないと思いますが、あえて類似した行為を行なう必要が生じたと仮定するなら、まずはエラーメッセージを重視して追跡すると思います。

それでも解決しない場合、SVN のログなどで、関連するファイルの過去に渡っての差分を追いかけると思います。


> 最新版:2.4.1のほうは今回の並び替えバグは改善されているのでしょうか?

まだだと思います。


----------------
Seasoft
こちらでの投稿は、アイディア程度に留めさせていただいております。
個別案件の作業は有償で承っております。お気軽にご相談ください。

illfrog300
投稿日時: 2009/10/14 1:35
対応状況: −−−
一人前
登録日: 2009/5/4
居住地:
投稿: 106
Re: 商品並び替え 正常に機能しない
引用:

seasoftさんは書きました:
> 最新版:2.4.1のほうは今回の並び替えバグは改善されているのでしょうか?

まだだと思います。


ありがとう御座います!

r17959では、例えば一つの商品に対してカテゴリを2つ持たせていた場合に検索で2重複(3つの場合は3重複)で表示となってしまうためにDISTINCTで重複分を排除させて1つのみを表示させているのかなと
つたない知識で想像しているのですが、その処理をさせるために必要な追加しなければいけない項目(ビュー)が何なのかを探しています。そもそも項目を追加するだけでは間違っている気もしているですが コミュニティ版のsql分は各項目の参照方法が大きく違っていたので。。

勉強が足りないですね;
seasoft
投稿日時: 2009/10/14 9:28
対応状況: −−−
登録日: 2008/6/4
居住地:
投稿: 7367
Re: 商品並び替え 正常に機能しない
r17959 をざっと査読する限り、下記だと思います。漏れがあったらゴメンなさい。
・product_id
・del_flg
・status
・stock_max
・stock_unlimited_max
・category_id
・name
・comment3
・maker_id


査読していて気づいたのですが、この処理、若干無駄がありますね。幾分かの工夫で、高速化の余地があるようです。


----------------
Seasoft
こちらでの投稿は、アイディア程度に留めさせていただいております。
個別案件の作業は有償で承っております。お気軽にご相談ください。

illfrog300
投稿日時: 2009/10/14 13:24
対応状況: −−−
一人前
登録日: 2009/5/4
居住地:
投稿: 106
Re: 商品並び替え 正常に機能しない
引用:

seasoftさんは書きました:
r17959 をざっと査読する限り、下記だと思います。
・product_id
・del_flg
・status
・stock_max
・stock_unlimited_max
・category_id
・name
・comment3
・maker_id

ご回答ありがとう御座います。
上記の項目はビューを再定義する以前の状態で既に
vw_products_allclass_detail/vw_products_allclassともに
すべて(maker_idを除く)含まれているのですが、そうなるとやはり参照方法をコミュニティの状態にしなければいけないという事は考えられますでしょうか?

また、質問ばかり申し訳ないのですが、maker_idの
引用:

    435 // メーカーらのWHERE文字列取得
436 if ( $maker_id ) {
437 $where .= " AND maker_id = ? ";
438 $arrval[] = $maker_id;
439 }

部分は削除して、ビュー項目からも排除した処置をとっているのですがmaker_idも含めた状態でないと正常に動作しない可能性は考えられますでしょうか?


引用:

査読していて気づいたのですが、この処理、若干無駄がありますね。幾分かの工夫で、高速化の余地があるようです。

この点、非常に楽しみであります!

ecbg
投稿日時: 2009/10/14 13:43
対応状況: −−−
仙人
登録日: 2009/2/25
居住地: 東京
投稿: 387
Re: 商品並び替え 正常に機能しない
このバグって、正式版で早めに修正掛けて欲しいですよね。

私の場合、ビューはカスタマイズで手を入れているので、php側だけで何とか修正しましたよ。大幅に手を加えたので、上げられる状態ではないのですが、一応LC_Page_Products_Detail.phpだけでも修正は可能でしたよ。
illfrog300
投稿日時: 2009/10/14 13:52
対応状況: −−−
一人前
登録日: 2009/5/4
居住地:
投稿: 106
Re: 商品並び替え 正常に機能しない
引用:

ecbgさんは書きました:
このバグって、正式版で早めに修正掛けて欲しいですよね。

はい、本当に>< 
最優先に値するレベルのバグだと思うのですが;

引用:

私の場合、ビューはカスタマイズで手を入れているので、php側だけで何とか修正しましたよ。大幅に手を加えたので、上げられる状態ではないのですが、一応LC_Page_Products_Detail.phpだけでも修正は可能でしたよ。

私の方はphpのほうがまだまだでして、修正方法の検討がつかない次第です;
しかしながら、そろそろ4日も延々とこれに時間とられているので
相当まずい状態です(笑

頂けるならヒントを少し教えて頂けないでしょうか
ecbg
投稿日時: 2009/10/14 14:07
対応状況: −−−
仙人
登録日: 2009/2/25
居住地: 東京
投稿: 387
Re: 商品並び替え 正常に機能しない
個人サイトだったのでメッセージ送りました。
« 1 2 3 4 (5) 6 »
| 新しいものから 前のトピック | 次のトピック | トップ


 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,859名です
総投稿数は109,996件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2313
5
umebius
2085
6
yuh
1819
7
h_tanaka
1646
8
red
1570
9
mcontact
1294
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.