[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 /** 3 * products_new header_php.php 4 * 5 * @package page 6 * @copyright Copyright 2003-2006 Zen Cart Development Team 7 * @copyright Portions Copyright 2003 osCommerce 8 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 9 * @version $Id: header_php.php 4261 2006-08-25 04:35:20Z ajeh $ 10 */ 11 12 require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php')); 13 $breadcrumb->add(NAVBAR_TITLE); 14 // display order dropdown 15 $disp_order_default = PRODUCT_NEW_LIST_SORT_DEFAULT; 16 require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER)); 17 $products_new_array = array(); 18 // display limits 19 // $display_limit = zen_get_products_new_timelimit(); 20 $display_limit = zen_get_new_date_range(); 21 22 $products_new_query_raw = "SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price, 23 p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, 24 p.products_quantity, p.products_weight, p.product_is_call, 25 p.product_is_always_free_shipping, p.products_qty_box_status 26 FROM " . TABLE_PRODUCTS . " p 27 LEFT JOIN " . TABLE_MANUFACTURERS . " m 28 ON (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd 29 WHERE p.products_status = 1 30 AND p.products_id = pd.products_id 31 AND pd.language_id = :languageID " . $display_limit . $order_by; 32 33 $products_new_query_raw = $db->bindVars($products_new_query_raw, ':languageID', $_SESSION['languages_id'], 'integer'); 34 $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW); 35 36 //check to see if we are in normal mode ... not showcase, not maintenance, etc 37 $show_submit = zen_run_normal(); 38 39 // check whether to use multiple-add-to-cart, and whether top or bottom buttons are displayed 40 if (PRODUCT_NEW_LISTING_MULTIPLE_ADD_TO_CART > 0 and $show_submit == true and $products_new_split->number_of_rows > 0) { 41 42 // check how many rows 43 $check_products_all = $db->Execute($products_new_split->sql_query); 44 $how_many = 0; 45 while (!$check_products_all->EOF) { 46 if (zen_has_product_attributes($check_products_all->fields['products_id'])) { 47 } else { 48 // needs a better check v1.3.1 49 if ($check_products_all->fields['products_qty_box_status'] != 0) { 50 if (zen_get_products_allow_add_to_cart($check_products_all->fields['products_id']) !='N') { 51 if ($check_products_all->fields['product_is_call'] == 0) { 52 if ((SHOW_PRODUCTS_SOLD_OUT_IMAGE == 1 and $check_products_all->fields['products_quantity'] > 0) or SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) { 53 if ($check_products_all->fields['products_type'] != 3) { 54 if (zen_has_product_attributes($check_products_all->fields['products_id']) < 1) { 55 $how_many++; 56 } 57 } 58 } 59 } 60 } 61 } 62 } 63 $check_products_all->MoveNext(); 64 } 65 66 if ( (($how_many > 0 and $show_submit == true and $products_new_split->number_of_rows > 0) and (PRODUCT_NEW_LISTING_MULTIPLE_ADD_TO_CART == 1 or PRODUCT_NEW_LISTING_MULTIPLE_ADD_TO_CART == 3)) ) { 67 $show_top_submit_button = true; 68 } else { 69 $show_top_submit_button = false; 70 } 71 if ( (($how_many > 0 and $show_submit == true and $products_new_split->number_of_rows > 0) and (PRODUCT_NEW_LISTING_MULTIPLE_ADD_TO_CART >= 2)) ) { 72 $show_bottom_submit_button = true; 73 } else { 74 $show_bottom_submit_button = false; 75 } 76 } 77 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 16:45:43 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |