prefix."product_list` WHERE `display_frontpage` IN('1') AND `active` IN('1')"; $product_list = $wpdb->get_results($sql,ARRAY_A); $output = "
".print_r($categories,true).""); $siteurl = get_option('siteurl'); if(get_option('permalink_structure') != '') { $seperator ="?"; } else { $seperator ="&"; } foreach((array)$activated_widgets as $widget_container) { if(is_array($widget_container) && array_search(TXT_WPSC_DONATIONS, $widget_container)) { $no_donations_sql = "AND `".$wpdb->prefix."product_list`.`donation` != '1'"; break; } } foreach((array)$categories as $category) { $full_view = null; if($category['display'] == 'full') { $full_view = $category['display']; } $sql = "SELECT DISTINCT `".$wpdb->prefix."product_list`.*, `".$wpdb->prefix."item_category_associations`.`category_id`,`".$wpdb->prefix."product_order`.`order`, IF(ISNULL(`".$wpdb->prefix."product_order`.`order`), 0, 1) AS `order_state` FROM `".$wpdb->prefix."product_list` LEFT JOIN `".$wpdb->prefix."item_category_associations` ON `".$wpdb->prefix."product_list`.`id` = `".$wpdb->prefix."item_category_associations`.`product_id` LEFT JOIN `".$wpdb->prefix."product_order` ON ( ( `".$wpdb->prefix."product_list`.`id` = `".$wpdb->prefix."product_order`.`product_id` ) AND ( `".$wpdb->prefix."item_category_associations`.`category_id` = `".$wpdb->prefix."product_order`.`category_id` ) ) WHERE `".$wpdb->prefix."product_list`.`active` = '1' AND `".$wpdb->prefix."item_category_associations`.`category_id` IN ('".$category['id']."') $no_donations_sql ORDER BY `order_state` DESC,`".$wpdb->prefix."product_order`.`order` ASC"; $product_list = $wpdb->get_results($sql,ARRAY_A); $output = "
";
}
$output .="";
if($product['image'] != '') {
$output .= "\n\r";
}
$output .= "";
$output .= "" . stripslashes($product['name']) . "";
$output .= TXT_WPSC_PRICE.": " . nzshpcrt_currency_display($product['price'], $product['notax']) . " "; if ($full_view != null) { $output .= " | ";
} else {
$output .= " ";
}
if (get_option('hide_name_link')!=1) {
if(($product['special']==1) && ($variations_output[1] === null)) {
$output .= "$specialSpecial / Sale Price - " . stripslashes($product['name']) . "";
} else {
//$output .= "$special" . stripslashes($product['name']) . "";
}
} else {
if(($product['special']==1) && ($variations_output[1] === null)) {
$output .= "$specialSpecial / Sale Price - " . stripslashes($product['name']) . "";
} else {
//$output .= "$special" . stripslashes($product['name']) . "";
}
}
if ($full_view !=null) {
if($product['description'] != '') {
$output .= " ".nl2br(stripslashes($product['description'])) . " "; } if($product['additional_description'] != '') { $output .= ""; $output .= ""; $output .= TXT_WPSC_MOREDETAILS.""; $output .= ""; $output .= nl2br(stripslashes($product['additional_description'])) . ""; $output .= " "; } } if ($full_view != null) { if(get_option('product_ratings') == 1) { $output .= " "; } $output .=" | ";
$output .="