♥BlueYon Posted June 25, 2005 Author Share Posted June 25, 2005 This is a great contribution - but I would highly suggest that newbies not mess with this one. It has some flaws such as "ttp" showing up in the URLS (is mentioned quite a bit in the forums, but no actual fix can be found). Also, if you have a subcategory that has the same name as another subcategory, you will get problems also. Also, had categories like "Software" show up! Software? I don't even sell software - where did that come from??? I hope work continues on this contribution, because it will be awesome once completed - but I think I will have to pass on it at this time. <{POST_SNAPBACK}> I think some of the problems you have are bcause of the cache. Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted June 26, 2005 Author Share Posted June 26, 2005 I have a spare month, so 'I'm going to start updating this contribution again. Quote Link to comment Share on other sites More sharing options...
nick Posted June 26, 2005 Share Posted June 26, 2005 If someone could post intstructions for installing with BTS it would be great. I see Blueyon seems to have managed it and said he'd post instruction but I did not see anything posted throughout the remainder of the thread. Any help appreciated Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted June 27, 2005 Author Share Posted June 27, 2005 If someone could post intstructions for installing with BTS it would be great. I see Blueyon seems to have managed it and said he'd post instruction but I did not see anything posted throughout the remainder of the thread. Any help appreciated <{POST_SNAPBACK}> Try replacing the contents of your index.php with this: <?php /* $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require ('includes/application_top.php'); if (isset($HTTP_GET_VARS['products_id'])) { require (DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); $content = CONTENT_PRODUCT_INFO; } else { // 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 } } } require (DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); if ($category_depth == 'nested') { $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 . "'"); $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 ); 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, '; break; case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight, '; break; } } // 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'] . "'"; } 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'] . "'"; } } 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 . "'"; } 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 . "'"; } } 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 pd.products_name"; 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_PRICE': $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; } } $content = CONTENT_INDEX_PRODUCTS; } else { // default page $content = CONTENT_INDEX_DEFAULT; } } include(bts_select('main', $content_template)); require (DIR_WS_INCLUDES . 'application_bottom.php'); ?> Quote Link to comment Share on other sites More sharing options...
oussama Posted June 27, 2005 Share Posted June 27, 2005 (edited) Hi, i have installed this hack and i have this error when i access to the index of catalog : /* * Altered the original file, so now the product in the URL isn't identified by name, but by model. * * File changed by [email protected] * * Released under the GNU General Public License * * Please respect this message in future changes * */ Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\archivos de programa\easyphp1-8\www\catalog\includes\classes\url_rewrite.php:11) in c:\archivos de programa\easyphp1-8\www\catalog\includes\functions\sessions.php on line 67 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\archivos de programa\easyphp1-8\www\catalog\includes\classes\url_rewrite.php:11) in c:\archivos de programa\easyphp1-8\www\catalog\includes\functions\sessions.php on line 67 and when i trie to add a product to cart : http://localhost/catalog/product_info.php/...d90d766551c0089 i have this error : /* * Altered the original file, so now the product in the URL isn't identified by name, but by model. * * File changed by [email protected] * * Released under the GNU General Public License * * Please respect this message in future changes * */ Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\archivos de programa\easyphp1-8\www\catalog\includes\classes\url_rewrite.php:11) in c:\archivos de programa\easyphp1-8\www\catalog\includes\functions\sessions.php on line 67 Warning: Cannot modify header information - headers already sent by (output started at c:\archivos de programa\easyphp1-8\www\catalog\includes\classes\url_rewrite.php:11) in c:\archivos de programa\easyphp1-8\www\catalog\includes\functions\general.php on line 29 the probleme that in the general.php file in the install of the hack they tell that i have to add : Before (around line 956): } Add this code (around line 956): @unlink(DIR_FS_CACHE . 'categories_array.cache'); @unlink(DIR_FS_CACHE . 'manufacturers_array.cache'); @unlink(DIR_FS_CACHE . 'products_array.cache'); but in the line 956 of my general.php (contrubution clean) i have in this line : //// //! Send email (text/html) using MIME // This is the central mail function. The SMTP Server should be configured // correct in php.ini // Parameters: // $to_name The name of the recipient, e.g. "Jan Wildeboer" // $to_email_address The eMail address of the recipient, // e.g. [email protected] // $email_subject The subject of the eMail // $email_text The text of the eMail, may contain HTML entities // $from_email_name The name of the sender, e.g. Shop Administration // $from_email_adress The eMail address of the sender, // e.g. [email protected] so i add the code here : return $greeting_string; @unlink(DIR_FS_CACHE . 'categories_array.cache'); @unlink(DIR_FS_CACHE . 'manufacturers_array.cache'); @unlink(DIR_FS_CACHE . 'products_array.cache'); } i suppose that this is the error. Edited June 27, 2005 by oussama Quote Link to comment Share on other sites More sharing options...
nick Posted June 27, 2005 Share Posted June 27, 2005 Blueyon, thanks for the index file for BTS, worked with a few minor fixes to suite my site. Now the front page comes up ok but I get a Server 500 error if I try click on any link. I can see from the status bar that it's rewriting the URLs as expeted however the 500 error comes almost immediately. I enabled db query logging and none of the db lookups even happen. My Test Website Any ideas??? oh, one last thing ... my hosting provider does not allow access to the apache error or access logs :-( hence making debugging this a bit harder Thanks Nick Quote Link to comment Share on other sites More sharing options...
oussama Posted June 27, 2005 Share Posted June 27, 2005 My test : Mi Test but in the product info the popup of image dont rullz :( Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted June 28, 2005 Author Share Posted June 28, 2005 I'm updating the script now. Hopefully I can release it tomorrow. I have taken alot of stuff out of the url_rewite.php script. I'm still testing, but it should clear up alot of bugs. Also I'm going to start a page caching script. Chemos was good, but I thought it had to many features for just page caching. Quote Link to comment Share on other sites More sharing options...
oussama Posted June 28, 2005 Share Posted June 28, 2005 BlueYon, i suggest to make olse changement of title of product page and path or categorie page. http://hiperdisco.com/catalog/Peliculas-DVD/Accion/ -- title (osCommerce) and : http://www.itchi-tech.co.uk/Midi-Moto/ with title : Midi Moto How can i make it like this ! thanks and sorry for my bad english Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted June 28, 2005 Author Share Posted June 28, 2005 BlueYon, i suggest to make olse changement of title of product page and path or categorie page. http://hiperdisco.com/catalog/Peliculas-DVD/Accion/ -- title (osCommerce) and : http://www.itchi-tech.co.uk/Midi-Moto/ with title : Midi Moto How can i make it like this ! thanks and sorry for my bad english <{POST_SNAPBACK}> I added the meta tag control contribution. I'm thinking of removing it and using a script to generate the tags automically. oSCommerce should have done this in the first place. hopefully it will be added in ms3. Also BTS does this. Quote Link to comment Share on other sites More sharing options...
oussama Posted June 28, 2005 Share Posted June 28, 2005 I added the meta tag control contribution. I'm thinking of removing it and using a script to generate the tags automically. oSCommerce should have done this in the first place. hopefully it will be added in ms3. Also BTS does this. <{POST_SNAPBACK}> Pleas BlueYon, What is the contribution that u use ? http://www.oscommerce.com/community?contributions=&search=meta+tag+control&category=all Thanks Quote Link to comment Share on other sites More sharing options...
♥Vger Posted June 28, 2005 Share Posted June 28, 2005 I'm thinking of removing it and using a script to generate the tags automically. There is already a contribution that does this. However, you lose the flexibility that you have in creating and optimising your own meta tags that you get with Meta Tag Controller. It's not being added to MS3, perhaps MS4. Vger Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted June 28, 2005 Author Share Posted June 28, 2005 Pleas BlueYon, What is the contribution that u use ? http://www.oscommerce.com/community?contributions=&search=meta+tag+control&category=all Thanks <{POST_SNAPBACK}> I combined BTS with meta tag controller. You want me to create meta tag generator? It's not to hard. I quit my job and I'm moving back to the UK next month. I have around 1 month of adding a few contirbutions. Give me time I want to do the page caching first. Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted June 29, 2005 Author Share Posted June 29, 2005 (edited) My test : Mi Test but in the product info the popup of image dont rullz :( <{POST_SNAPBACK}> Ok I found your problem about the popup pictures. Basicly because its running from index.php its not included the javascript for the popup window to work. Just copy this in <script language="javascript"><!-- function popupWindow(url) { ?window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le ft=150') } //--></script> just before it says </head> Edited June 29, 2005 by BlueYon Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted June 29, 2005 Author Share Posted June 29, 2005 Updated this contribution! Hopefully this will fix alot of problems. Please test away! Quote Link to comment Share on other sites More sharing options...
oussama Posted June 29, 2005 Share Posted June 29, 2005 My Test :( Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted June 30, 2005 Author Share Posted June 30, 2005 My Test :( <{POST_SNAPBACK}> What version of BTS are you using? Try replacing my version on index.php with your own or original BTS version. Quote Link to comment Share on other sites More sharing options...
oussama Posted June 30, 2005 Share Posted June 30, 2005 i use the BTSv1.5d and i replace it but i have also the same message :( Quote Link to comment Share on other sites More sharing options...
baluvee Posted July 1, 2005 Share Posted July 1, 2005 well if i want to have .html as extension instead of DMOZ style / then how to go for it plz help Quote Link to comment Share on other sites More sharing options...
boldechidna Posted July 1, 2005 Share Posted July 1, 2005 Hey i've just installed this contrib but my Url's aren't being rewritten properly my urls are coming out like /Store/catalog/index.php/cPath/1_17 Tried to find a solution in this htread but coudl'n't find anything, too many pages to sift thru Any help would be appreciated Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted July 1, 2005 Author Share Posted July 1, 2005 well if i want to have .html as extension instead of DMOZ style / then how to go for itplz help <{POST_SNAPBACK}> Find this line in url_rewrite.php return $url_parts['scheme'] . '://' . $url_parts['host'] . $url_parts['path'] . '/'; and change the '/'; to '.html'; and replace // Put the request URL into an array $request_url_array = explode('/', trim(getenv('REQUEST_URI'), '/')); with // Put the request URL into an array $url = str_replace('.html', '', getenv('REQUEST_URI')); $request_url_array = explode('/', trim($url, '/')); Quote Link to comment Share on other sites More sharing options...
baluvee Posted July 1, 2005 Share Posted July 1, 2005 Thanks a lot for the reply but I am using version 1.5 not 1.6 so where to change in that ? help plz Quote Link to comment Share on other sites More sharing options...
boldechidna Posted July 1, 2005 Share Posted July 1, 2005 is there no answer for my problem? BlueYon? Quote Link to comment Share on other sites More sharing options...
♥BlueYon Posted July 1, 2005 Author Share Posted July 1, 2005 is there no answer for my problem? BlueYon? <{POST_SNAPBACK}> What are you running? Apache, Unix? Can you give the address of your site. Looks like your urls are comming out like search engine safe. Are you sure you did everything on the instructions? What other conributions have u installed? Quote Link to comment Share on other sites More sharing options...
baluvee Posted July 1, 2005 Share Posted July 1, 2005 Blue Yon version 1.6 Fails at code if (!$this->pages(current($url_array=explode('/', trim($url_parts['path'], '/'))))) return $url; if you have your catalog like http://myserver.com/catalog Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.