[Tep-j-general] Re: 複数の価格帯を持つ商品の検索

Back to archive index

Fujimoto-Kru2krungthep.com fujim****@kru2k*****
2005年 10月 24日 (月) 13:50:25 JST


はまださま、いつもありがとうございます。



検索結果(advanced_search_result.php)通常は以下のようになっており、
1つの価格帯をたとえば、5000円(pfrom)〜1万円(pto)とし、
p.products_priceから検索されるようになっております。


  $rate = $currencies->get_value($currency);
  if ($rate) {
    $pfrom = $HTTP_GET_VARS['pfrom'] / $rate;
    $pto = $HTTP_GET_VARS['pto'] / $rate;
  }

  if (DISPLAY_PRICE_WITH_TAX == 'true') {
    if ($pfrom) $where_str .= " and (IF(s.status, 
s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is 
null, 1, 1 + (tr.tax_rate / 100) ) >= " . $pfrom . ")";
    if ($pto)   $where_str .= " and (IF(s.status, 
s.specials_new_products_price, p.products_price) * if(gz.geo_zone_id is 
null, 1, 1 + (tr.tax_rate / 100) ) <= " . $pto . ")";
  } else {
    if ($pfrom) $where_str .= " and (IF(s.status, 
s.specials_new_products_price, p.products_price) >= " . $pfrom . ")";
    if ($pto)   $where_str .= " and (IF(s.status, 
s.specials_new_products_price, p.products_price) <= " . $pto . ")";
  }

これをたとえば複数の価格帯とするならばどうなりますでしょうか。


当方ではp.products_priceとは別に

pd.products_rents 





Tep-j-general メーリングリストの案内
Back to archive index