[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 /** 3 * products_all 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 14 15 16 $breadcrumb->add(NAVBAR_TITLE); 17 // display order dropdown 18 $disp_order_default = PRODUCT_ALL_LIST_SORT_DEFAULT; 19 require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER)); 20 21 $products_all_array = array(); 22 23 $products_all_query_raw = "SELECT p.products_type, p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, 24 p.products_date_added, m.manufacturers_name, p.products_model, 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 ON (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd 28 WHERE p.products_status = 1 29 AND p.products_id = pd.products_id 30 AND pd.language_id = :languageID " . $order_by; 31 32 $products_all_query_raw = $db->bindVars($products_all_query_raw, ':languageID', $_SESSION['languages_id'], 'integer'); 33 $products_all_split = new splitPageResults($products_all_query_raw, MAX_DISPLAY_PRODUCTS_ALL); 34 35 //check to see if we are in normal mode ... not showcase, not maintenance, etc 36 $show_submit = zen_run_normal(); 37 38 // check whether to use multiple-add-to-cart, and whether top or bottom buttons are displayed 39 if (PRODUCT_ALL_LISTING_MULTIPLE_ADD_TO_CART > 0 and $show_submit == true and $products_all_split->number_of_rows > 0) { 40 41 // check how many rows 42 $check_products_all = $db->Execute($products_all_split->sql_query); 43 $how_many = 0; 44 while (!$check_products_all->EOF) { 45 if (zen_has_product_attributes($check_products_all->fields['products_id'])) { 46 } else { 47 // needs a better check v1.3.1 48 if ($check_products_all->fields['products_qty_box_status'] != 0) { 49 if (zen_get_products_allow_add_to_cart($check_products_all->fields['products_id']) !='N') { 50 if ($check_products_all->fields['product_is_call'] == 0) { 51 if ((SHOW_PRODUCTS_SOLD_OUT_IMAGE == 1 and $check_products_all->fields['products_quantity'] > 0) or SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) { 52 if ($check_products_all->fields['products_type'] != 3) { 53 if (zen_has_product_attributes($check_products_all->fields['products_id']) < 1) { 54 $how_many++; 55 } 56 } 57 } 58 } 59 } 60 } 61 } 62 $check_products_all->MoveNext(); 63 } 64 65 if ( (($how_many > 0 and $show_submit == true and $products_all_split->number_of_rows > 0) and (PRODUCT_ALL_LISTING_MULTIPLE_ADD_TO_CART == 1 or PRODUCT_ALL_LISTING_MULTIPLE_ADD_TO_CART == 3)) ) { 66 $show_top_submit_button = true; 67 } else { 68 $show_top_submit_button = false; 69 } 70 if ( (($how_many > 0 and $show_submit == true and $products_all_split->number_of_rows > 0) and (PRODUCT_ALL_LISTING_MULTIPLE_ADD_TO_CART >= 2)) ) { 71 $show_bottom_submit_button = true; 72 } else { 73 $show_bottom_submit_button = false; 74 } 75 } 76 ?>
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 |
![]() |