zencart:おすすめ売り切れ非表示

Posted on 月曜日, 8 月 10th, 2009 at 4:16 PM

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
  $featured_products_query = "select distinct p.products_id, p.products_image, pd.products_name, p.products_date_added
                           from (" . TABLE_PRODUCTS . " p
                           left join " . TABLE_FEATURED . " f on p.products_id = f.products_id
                           left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
                           where p.products_id = f.products_id and p.products_id = pd.products_id and p.products_status = 1 and f.status = 1 and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
} else {

 ---------------------

  $featured_products_query = "select distinct p.products_id, p.products_image, pd.products_name, p.products_date_added, p.products_quantity

                           where p.products_id = f.products_id and p.products_id = pd.products_id and p.products_status = '1' and p.products_quantity >= 1  and f.status = 1 and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";

 

参考掲示板

関連記事

You can leave a response, or trackback from your own site.

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment