marianama Posted January 5, 2010 Share Posted January 5, 2010 Hi, I am new to all this and the problem is the posted products just don't show up. At the beginning they did show up when I added about 4 products. However, after more have been post, there is just no product showing! Would anyone pls help? By the way, the website is chinesezone.cz.cc Link to comment Share on other sites More sharing options...
Guest Posted January 5, 2010 Share Posted January 5, 2010 Do they show up in Admin? Are they disabled? Do they have positive (more than 0) quantities? Link to comment Share on other sites More sharing options...
marianama Posted January 5, 2010 Author Share Posted January 5, 2010 Do they show up in Admin? Are they disabled? Do they have positive (more than 0) quantities? Yes they do show in admin and are active with each quantity of 50. I have just defined the mainpage as product so that you can see them now on the index page but they still do not show up in catalogue. I do put all of them under the catalogue. Link to comment Share on other sites More sharing options...
Guest Posted January 5, 2010 Share Posted January 5, 2010 1) Fix the permissions on includes/configure.php. Warning: I am able to write to the configuration file: /home/www/chinesezone.cz.cc/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. 2) I think that this is not an issue with the products not showing up, but rather some PHP error in a file you've recently changed (perhaps index.php or includes/modules/products_listing.php?) that is causing the PHP file to parse incorrectly. Undo whatever changes you've made since it worked, verify that it works again, then diff the two sets of files until you find the mix-up. -jared Link to comment Share on other sites More sharing options...
marianama Posted January 5, 2010 Author Share Posted January 5, 2010 Thank you Jared. 1. I have set the permission. 2. I did not make any change of either mentioned php files during the time. What I might have done was to the English.php in which I tried to make a change of the footer text and I have undone it. But the catalogue still shows empty. I don't know what to do now. In addition, I found it different if I enter http://chinesezone.cz.cc/index.php/cPath/1 instead of the catalogue path http://chinesezone.cz.cc/index.php/cPath/5. Seems something wrong with cPath/5. Mariana Link to comment Share on other sites More sharing options...
Guest Posted January 5, 2010 Share Posted January 5, 2010 Some changes have to have been made -- osCommerce does not come stock like that. The footer isn't even showing up on the category pages. The products show up if you browse to them individually -- it's just the category page (index.php) that's not showing up. Just for fun, try uploading the stock catalog/index.php and see what happens (back up your current one first, of course). -jared Link to comment Share on other sites More sharing options...
♥mdtaylorlrim Posted January 5, 2010 Share Posted January 5, 2010 I get sent to a login screen when I click on what I believe to be a product category on the left. Did you do any mod to the index.php around line 65 or so? Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...? Link to comment Share on other sites More sharing options...
marianama Posted January 5, 2010 Author Share Posted January 5, 2010 I get sent to a login screen when I click on what I believe to be a product category on the left. Did you do any mod to the index.php around line 65 or so? I did not do anything to the index.php. Actually I know almost nothing about coding. Link to comment Share on other sites More sharing options...
marianama Posted January 5, 2010 Author Share Posted January 5, 2010 Seems the index.php goes wrong. I copied it as below: <?php /* $Id: index.php,v 1.2 2003/09/24 14:33:15 wilt Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // the following cPath references come from application_top.php $category_depth = 'top'; if (isset($cPath) && tep_not_null($cPath)) { $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $category_depth = 'products'; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } } $events_category_depth = 'top'; if (isset($ecPath) && tep_not_null($ecPath)) { $events_categories_events_query = tep_db_query("select count(*) as total from " . TABLE_EVENTS_TO_EVENTS_CATEGORIES . " where events_categories_id = '" . (int)$current_events_category_id . "'"); $events_categories_events = tep_db_fetch_array($events_categories_events_query); if ($events_categories_events['total'] > 0) { $events_category_depth = 'events'; // display events } else { $events_category_parent_query = tep_db_query("select count(*) as total from " . TABLE_EVENTS_CATEGORIES . " where parent_id = '" . (int)$current_events_category_id . "'"); $events_category_parent = tep_db_fetch_array($events_category_parent_query); if ($events_category_parent['total'] > 0) { $events_category_depth = 'nested'; // navigate through the categories } else { $events_category_depth = 'events'; // category has no events, but display the 'no events' message } } } $subscription_category_depth = 'top'; if (isset($sucPath) && tep_not_null($sucPath)) { $subscription_categories_subscription_query = tep_db_query("select count(*) as total from " . TABLE_SUBSCRIPTION_TO_SUBSCRIPTION_CATEGORIES . " where subscription_categories_id = '" . (int)$current_subscription_category_id . "'"); $subscription_categories_subscription = tep_db_fetch_array($subscription_categories_subscription_query); if ($subscription_categories_subscription['total'] > 0) { $subscription_category_depth = 'subscription'; // display subscriptions } else { $subscription_category_parent_query = tep_db_query("select count(*) as total from " . TABLE_SUBSCRIPTION_CATEGORIES . " where parent_id = '" . (int)$current_subscription_category_id . "'"); $subscription_category_parent = tep_db_fetch_array($subscription_category_parent_query); if ($subscription_category_parent['total'] > 0) { $subscription_category_depth = 'nested'; // navigate through the categories } else { $subscription_category_depth = 'subscription'; // category has no events, but display the 'no events' message } } } $static_category_depth='top'; if(isset($stcPath) && tep_not_null($stcPath)){ $static_categories_static_query = tep_db_query("select count(*) as total from " . TABLE_MAINPAGE . " where parent_id = '" . (int)$current_static_category_id . "'"); $static_categories_static = tep_db_fetch_array($static_categories_static_query); if ($static_categories_static['total'] > 0) { $static_category_depth = 'static'; // display static // echo "hi i m static"; } else { //echo "hi i m nested"; $static_category_parent_query = tep_db_query("select * from " . TABLE_MAINPAGE . " where parent_id = '" . (int)$current_static_category_id . "'"); $static_category_parent = tep_db_fetch_array($static_category_parent_query); $static_category_depth = 'nested'; // navigate through the categories } } $services_category_depth = 'top'; if (isset($secPath) && tep_not_null($secPath)) { $services_categories_services_query = tep_db_query("select count(*) as total from " . TABLE_SERVICES_TO_SERVICES_CATEGORIES . " where services_categories_id = '" . (int)$current_services_category_id . "'"); $services_categories_services = tep_db_fetch_array($services_categories_services_query); if ($services_categories_services['total'] > 0) { $services_category_depth = 'services'; // display services } else { $services_category_parent_query = tep_db_query("select count(*) as total from " . TABLE_SERVICES_CATEGORIES . " where parent_id = '" . (int)$current_services_category_id . "'"); $services_category_parent = tep_db_fetch_array($services_category_parent_query); if ($services_category_parent['total'] > 0) { $services_category_depth = 'nested'; // navigate through the categories } else { $services_category_depth = 'services'; // category has no services, but display the 'no services' message } } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); if ($category_depth == 'nested') { //Code change for Categories Description 1.5 // $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'"); //Changed to the following $category_query = tep_db_query("select cd.categories_name, cd.categories_heading_title, cd.categories_description, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . $current_category_id . "' and cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" . $languages_id . "'"); //End Categories Description 1.5 $category = tep_db_fetch_array($category_query); $content = CONTENT_INDEX_NESTED; } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) { // create column list $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE, 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW, 'PRODUCT_LIST_DESCRIPTION'=>6 ); asort($define_list); $column_list = array(); reset($define_list); while (list($key, $value) = each($define_list)) { if ($value > 0) $column_list[] = $key; } $select_column_list = ''; for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model, '; break; case 'PRODUCT_LIST_NAME': $select_column_list .= 'pd.products_name, '; break; case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name, '; break; case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity, '; break; case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image_1,p.products_title_1, '; break; case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight, '; break; case 'PRODUCT_LIST_DESCRIPTION': $select_column_list .= 'pd.products_description, '; break; } } // cgdis start // Get the category name and description /*$category_query = tep_db_query("select cd.categories_name, cd.categories_heading_title, cd.categories_description, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . $current_category_id . "' and cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" . $languages_id . "'"); $category = tep_db_fetch_array($category_query);*/ // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category //$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; //$listing_sql="select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; $listing_sql="select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'"; } else { // We show them all //$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; $listing_sql="select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"; } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory //$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } else { // We show them all // $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'"; } } //CGDiscountSpecials end if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by p.products_sort_order"; break; } } } else { $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); $sort_order = substr($HTTP_GET_VARS['sort'], 1); $listing_sql .= ' order by '; switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : ''); break; case 'PRODUCT_LIST_MANUFACTURER': $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_QUANTITY': $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_IMAGE': $listing_sql .= "pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_DESCRIPTION': $listing_sql .= "pd.products_description " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; //cgdis start case 'PRODUCT_LIST_PRICE': $listing_sql .= "p.products_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; //cgdis end } } $content = CONTENT_INDEX_PRODUCTS; } else { // default page $content = CONTENT_INDEX_DEFAULT; } //for events added if ($events_category_depth == 'nested') { $events_category_query = tep_db_query("SELECT ecd.events_categories_name, ecd.events_categories_heading_title, ecd.events_categories_description, ec.events_categories_image from " . TABLE_EVENTS_CATEGORIES . " ec, " . TABLE_EVENTS_CATEGORIES_DESCRIPTION . " ecd where ec.events_categories_id=ecd.events_categories_id and ec.events_categories_id = '" . $current_events_category_id . "' and ecd.language_id = '" . $languages_id . "'"); $events_category = tep_db_fetch_array($events_category_query); $content = CONTENT_INDEX_EVENTS_NESTED; } elseif ($events_category_depth == 'events') { $define_events_list = array( 'EVENT_LIST_IMAGE' => EVENT_LIST_IMAGE, 'EVENT_LIST_NAME' => EVENT_LIST_NAME, 'EVENT_LIST_FEES'=>EVENT_LIST_FEES, 'EVENT_LIST_MAX_REGT' => EVENT_LIST_MAX_REGT, 'EVENT_LIST_MAX_RES' => EVENT_LIST_MAX_RES, 'EVENT_LIST_SESSIONS' => EVENT_LIST_SESSIONS, 'EVENT_LIST_DESCRIPTION' => EVENT_LIST_DESCRIPTION ); $column_events_list = array(); reset($define_events_list); while (list($events_key, $events_value) = each($define_events_list)) { if ($events_value > 0) $t=10;$column_events_list[] = $events_key; } $select_events_column_list = ''; for ($i=0, $n=sizeof($column_events_list); $i<$n; $i++) { switch ($column_events_list[$i]) { case 'EVENT_LIST_NAME': $select_events_column_list .= 'ed.events_name, '; break; case 'EVENT_LIST_FEES': $select_events_column_list .= 'e.events_fees, '; break; case 'EVENT_LIST_IMAGE': $select_events_column_list .= 'e.events_image, '; break; case 'EVENT_LIST_MAX_RES': $select_events_column_list .= 'e.events_max_reserve, '; break; case 'EVENT_LIST_DESCRIPTION': $select_events_column_list .= 'ed.events_description, '; break; } } if (tep_not_null($current_events_category_id)) { $listing_sql = "SELECT " . $select_events_column_list . " e.events_id,e.events_tax_class_id from " . TABLE_EVENTS . " e, " . TABLE_EVENTS_DESCRIPTION . " ed, " . TABLE_EVENTS_TO_EVENTS_CATEGORIES . " e2c where e.events_status = '1' and e.events_id = e2c.events_id and ed.events_id = e2c.events_id and ed.language_id = '" . (int)$languages_id . "' " . EVENTS_CONDITION_STATUS . " and e2c.events_categories_id = '" . (int)$current_events_category_id . "'"; } else { $listing_sql = "SELECT " . $select_events_column_list . " e.events_id,e.events_tax_class_id from " . TABLE_EVENTS . " e," . TABLE_EVENTS_DESCRIPTION . " ed where ed.events_id = e.events_id and ed.language_id = '" . (int)$languages_id . "' " . EVENTS_CONDITION_STATUS; } // Get the events_category name and description $events_category_query = tep_db_query("select ecd.events_categories_name, ecd.events_categories_heading_title, ecd.events_categories_description, ec.events_categories_image from " . TABLE_EVENTS_CATEGORIES . " ec, " . TABLE_EVENTS_CATEGORIES_DESCRIPTION . " ecd where ec.events_categories_id = '" . $current_events_category_id . "' and ecd.events_categories_id = '" . $current_events_category_id . "' and ecd.language_id = '" . $languages_id . "'"); $events_category = tep_db_fetch_array($events_category_query); $listing_sql .= ' order by events_name '; $content = CONTENT_INDEX_EVENTS; } if ($subscription_category_depth == 'nested') { $subs_category_sql = "SELECT sucd.subscription_categories_name, sucd.subscription_categories_heading_title, sucd.subscription_categories_description, suc.subscription_categories_image from " . TABLE_SUBSCRIPTION_CATEGORIES . " suc, " . TABLE_SUBSCRIPTION_CATEGORIES_DESCRIPTION . " sucd where suc.subscription_categories_id=sucd.subscription_categories_id and suc.subscription_categories_id = '" . $current_subscription_category_id . "' and sucd.language_id = '" . $languages_id . "'"; $subs_category_query = tep_db_query($subs_category_sql); $subs_category = tep_db_fetch_array($subs_category_query); $content = CONTENT_INDEX_SUBSCRIPTIONS_NESTED; } else if ($subscription_category_depth=="subscription") { $define_subscription_list = array( 'SUBSCRIPTION_LIST_IMAGE' => SUBSCRIPTION_LIST_IMAGE, 'SUBSCRIPTION_LIST_NAME' => SUBSCRIPTION_LIST_NAME, 'SUBSCRIPTION_LIST_COSTS'=>SUBSCRIPTION_LIST_COSTS, 'SUBSCRIPTION_LIST_PERIOD' => SUBSCRIPTION_LIST_PERIOD, 'SUBSCRIPTION_LIST_BUY_NOW' => SUBSCRIPTION_LIST_BUY_NOW); $column_subscription_list = array(); reset($define_subscription_list); while (list($subscription_key, $subscription_value) = each($define_subscription_list)) { if ($subscription_value > 0) $t=10;$column_subscription_list[] = $subscription_key; } $select_subscription_column_list = ''; for ($i=0, $n=sizeof($column_subscription_list); $i<$n; $i++) { switch ($column_subscription_list[$i]) { case 'SUBSCRIPTION_LIST_NAME': $select_subscription_column_list .= 'sud.subscription_name, '; break; case 'SUBSCRIPTION_LIST_COSTS': $select_subscription_column_list .= 'su.subscription_costs, '; break; case 'SUBSCRIPTION_LIST_IMAGE': $select_subscription_column_list .= 'su.subscription_image, '; break; case 'SUBSCRIPTION_LIST_PERIOD': $select_subscription_column_list .= 'su.subscription_period, '; break; } } if (tep_not_null($current_subscription_category_id)) { $listing_sql = "SELECT " . $select_subscription_column_list . "subscription_tax_class_id,su.subscription_id,sud.subscription_description from " . TABLE_SUBSCRIPTIONS . " su, " . TABLE_SUBSCRIPTIONS_DESCRIPTION . " sud, " . TABLE_SUBSCRIPTION_TO_SUBSCRIPTION_CATEGORIES . " su2c where su.subscription_id = su2c.subscription_id and sud.subscription_id = su2c.subscription_id and sud.language_id = '" . (int)$languages_id . "' and su2c.subscription_categories_id = '" . (int)$current_subscription_category_id . "' " . SUBSCRIPTION_CONDITION_STATUS; } else { $listing_sql = "SELECT " . $select_subscription_column_list . "subscription_tax_class_id,su.subscription_id,sud.subscription_description from " . TABLE_SUBSCRIPTIONS . " su," . TABLE_SUBSCRIPTIONS_DESCRIPTION . " sud where sud.subscription_id = su.subscription_id and sud.language_id = '" . (int)$languages_id . "' " . SUBSCRIPTION_CONDITION_STATUS; } // Get the events_category name and description $subscription_category_query = tep_db_query("select sucd.subscription_categories_name, sucd.subscription_categories_heading_title, sucd.subscription_categories_description, suc.subscription_categories_image from " . TABLE_SUBSCRIPTION_CATEGORIES . " suc, " . TABLE_SUBSCRIPTION_CATEGORIES_DESCRIPTION . " sucd where suc.subscription_categories_id = '" . $current_subscription_category_id . "' and sucd.subscription_categories_id = '" . $current_subscription_category_id . "' and sucd.language_id = '" . $languages_id . "'"); $subscription_category = tep_db_fetch_array($subscription_category_query); $listing_sql .= ' order by subscription_name '; $content = CONTENT_INDEX_SUBSCRIPTIONS; } if ($static_category_depth == 'nested') { $static_category_query = tep_db_query("SELECT mp.page_id, mp.parent_id, mp.sort_order, mp.page_status from " . TABLE_MAINPAGE . " mp, " . TABLE_MAINPAGE_DESCRIPTIONS . " mpc where mpc.page_id=mp.page_id and mp.page_id = '" . $spl_stcid[1] . "' and mpc.language_id = '" . $languages_id . "'"); $static_category = tep_db_fetch_array($static_category_query); $content = CONTENT_INDEX_STATIC; } else if ($static_category_depth=="static") { $static_category_query = tep_db_query("SELECT mp.page_id, mp.parent_id, mp.sort_order, mp.page_status from " . TABLE_MAINPAGE . " mp, " . TABLE_MAINPAGE_DESCRIPTIONS . " mpc where mpc.page_id=mp.page_id and mp.page_id = '" . $current_static_category_id . "' and mpc.language_id = '" . $languages_id . "'"); $static_category = tep_db_fetch_array($static_category_query); $content = CONTENT_INDEX_STATIC; } //services if ($services_category_depth == 'nested') { $sers_category_query = tep_db_query("SELECT sucd.services_categories_name, sucd.services_categories_heading_title, sucd.services_categories_description, suc.services_categories_image from " . TABLE_SERVICES_CATEGORIES . " suc, " . TABLE_SERVICES_CATEGORIES_DESCRIPTION . " sucd where suc.services_categories_id=sucd.services_categories_id and suc.services_categories_id = '" . $current_services_category_id . "' and sucd.language_id = '" . $languages_id . "'"); $sers_category = tep_db_fetch_array($sers_category_query); $content = CONTENT_INDEX_SERVICES_NESTED; } else if ($services_category_depth=="services") { $define_services_list = array('SERVICES_LIST_IMAGE' => SERVICES_LIST_IMAGE, 'SERVICES_LIST_NAME' => SERVICES_LIST_NAME, 'SERVICES_LIST_COSTS'=>SERVICES_LIST_COSTS, 'SERVICES_LIST_BUY_NOW' => SERVICES_LIST_BUY_NOW); $column_services_list = array(); reset($define_services_list); while (list($services_key, $services_value) = each($define_services_list)) { if ($services_value > 0) $t=10;$column_services_list[] = $services_key; } $select_services_column_list = ''; for ($i=0, $n=sizeof($column_services_list); $i<$n; $i++) { switch ($column_services_list[$i]) { case 'SERVICES_LIST_NAME': $select_services_column_list .= 'sed.service_name, '; break; case 'SERVICES_LIST_COSTS': $select_services_column_list .= 'se.service_costs, '; break; case 'SERVICES_LIST_IMAGE': $select_services_column_list .= 'se.service_image,sed.service_description, '; break; } } if (tep_not_null($current_services_category_id)) { $listing_sql = "SELECT " . $select_services_column_list . " se.include_resource,se.include_resource_price,se.service_tax_class_id,se.service_id from " . TABLE_SERVICES . " se, " . TABLE_SERVICES_DESCRIPTION . " sed, " . TABLE_SERVICES_TO_SERVICES_CATEGORIES . " se2c where se.service_id = se2c.service_id and sed.service_id = se2c.service_id and sed.language_id = '" . (int)$languages_id . "' and se2c.services_categories_id = '" . (int)$current_services_category_id . "' " . SERVICES_CONDITION_STATUS; } else { $listing_sql = "SELECT " . $select_services_column_list . "se.service_tax_class_id,se.service_id from " . TABLE_SERVICES . " se," . TABLE_SERVICES_DESCRIPTION . " sed where vd.service_id = v.service_id and vd.language_id = '" . (int)$languages_id . "' " . SERVICES_CONDITION_STATUS; } // Get the events_category name and description $services_category_query = tep_db_query("select secd.services_categories_name, secd.services_categories_heading_title, secd.services_categories_description, sec.services_categories_image from " . TABLE_SERVICES_CATEGORIES . " sec, " . TABLE_SERVICES_CATEGORIES_DESCRIPTION . " secd where sec.services_categories_id = '" . $current_services_category_id . "' and secd.services_categories_id = '" . $current_services_category_id . "' and secd.language_id = '" . $languages_id . "'"); $services_category = tep_db_fetch_array($services_category_query); $listing_sql .= ' order by service_name '; $content = CONTENT_INDEX_SERVICES; } require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Link to comment Share on other sites More sharing options...
marianama Posted January 5, 2010 Author Share Posted January 5, 2010 Now I create a new catalogue named "new" and it shows up properly. The original catalogue "chinese qipao cheongsam" did run properly as well when there was 3 or 4 products in it and when the number of products increased (now it is 10) the catalogue went wrong. Anyone would kindly help to check what should be done to the index.php codes? Thank you all for taking time helping me. Mariana Link to comment Share on other sites More sharing options...
marianama Posted January 5, 2010 Author Share Posted January 5, 2010 I found each catalogue can contain at most 5 products otherwise it will go wrong ending up showing nothing. Any setting should be made to fix the problem? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.