Quesri originale
Codice: Seleziona tutto
//TotalB2B start
if (!isset($customer_id)) $customer_id = 0;
$customer_group = tep_get_customers_groups_id();
$specials_query_raw = "select DISTINCT p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image,s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' and ((s.customers_id = '" . $customer_id . "' and s.customers_groups_id = '0') or (s.customers_id = '0' and s.customers_groups_id = '" . $customer_group . "') or (s.customers_id = '0' and s.customers_groups_id = '0')) order by s.specials_date_added DESC";
//TotalB2B end
$specials_split = new splitPageResults($specials_query_raw, MAX_DISPLAY_SPECIAL_PRODUCTS);
if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '2'))) {
e quella della contrib Filter special offer by category
Codice: Seleziona tutto
$specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_SPECIALS . " s, " . TABLE_CATEGORIES . " c where p2c.categories_id = c.categories_id and p.products_status = '1' and p.products_quantity > 0 and p.products_id = p2c.products_id and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1'";
if($categories_id > 0)
$specials_query_raw .= " and p2c.categories_id in (".tep_get_categories_ids($categories_id).$categories_id.")";
$specials_query_raw .= " order by p2c.categories_id, s.specials_date_added DESC";
chi riesce a integrarle?
granzie