T-B0N3 Posted June 23, 2009 Share Posted June 23, 2009 Hi there and thanks for the quick answer .. here are the first 68 lines of my index.php (right before the doctype starts) <?php /* $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] 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 } } //get current category tags when a category is selected $cat_tags_query = tep_db_query("SELECT categories_name, title_tag, desc_tag, keywords_tag FROM " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' AND language_id = '" . (int)$languages_id . "'"); $cat_tags = tep_db_fetch_array($cat_tags_query); $categories_name = $cat_tags['categories_name']; $title_tag = $cat_tags['title_tag']; $desc_tag = $cat_tags['desc_tag']; $keywords_tag = $cat_tags['keywords_tag']; //set default $kws_home_default = $categories_name; $desc_home_default = $categories_name; $title_home_default = $categories_name; } else { //no category is selected: randomly select category names as keywords $cat_names_query = tep_db_query("SELECT categories_name FROM " . TABLE_CATEGORIES_DESCRIPTION . " WHERE language_id = '" . (int)$languages_id . "'" . " ORDER BY RAND()"); $kws_home_default = ""; $num_rows = tep_db_num_rows($cat_names_query); if ($num_rows > 20){ $i = rand(1,$num_rows); for ($count = $i; $count < $i + 20; $count++) { $cat_names = tep_db_fetch_array($cat_names_query); $kws_home_default .= $cat_names['categories_name'] . ', '; } } else { while ($cat_names = tep_db_fetch_array($cat_names_query)){ $kws_home_default .= $cat_names['categories_name'] . ', '; } } //default title tag for the index (home) page $title_home_default = "ENTER YOUR DEFAULT TITLE TEXT HERE"; //default keywords for the index (home) page $kws_home_default .= STORE_NAME; //default Description for the index (home) page $desc_home_default = "ENTER YOUR DEFAULT DESCRIPTION TAG TEXT HERE FOR THE HOME PAGE"; } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); ?> Quote Link to comment Share on other sites More sharing options...
T-B0N3 Posted June 23, 2009 Share Posted June 23, 2009 (edited) P.S. I see a similar error is display in the login.php window but under line 17 Fatal error: Call to undefined function tep_redirect() in /home/rcro/public_html/login.php on line 17 Edited June 23, 2009 by T-B0N3 Quote Link to comment Share on other sites More sharing options...
GemRock Posted June 23, 2009 Author Share Posted June 23, 2009 what editor are you using to edit those php files? it looks like your editor has messed up the code. it all becomes one-liner when i pasted it to a proper php editor. you could try to use textpad which is free, if you dont have anything better. below is the code you posted but after i restore it from one line to its proper format: <?php /* $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] 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 } } //get current category tags when a category is selected $cat_tags_query = tep_db_query("SELECT categories_name, title_tag, desc_tag, keywords_tag FROM " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' AND language_id = '" . (int)$languages_id . "'"); $cat_tags = tep_db_fetch_array($cat_tags_query); $categories_name = $cat_tags['categories_name']; $title_tag = $cat_tags['title_tag']; $desc_tag = $cat_tags['desc_tag']; $ keywords_tag = $cat_tags['keywords_tag']; //set default $kws_home_default = $categories_name; $desc_home_default = $categories_name; $title_home_default = $categories_name; } else { //no category is selected: randomly select category names as keywords $cat_names_query = tep_db_query("SELECT categories_name FROM " . TABLE_CATEGORIES_DESCRIPTION . " WHERE language_id = '" . (int)$languages_id . "'" . " ORDER BY RAND()"); $kws_home_default = ""; $num_rows = tep_db_num_rows($cat_names_query); if ($num_rows > 20){ $i = rand(1,$num_rows); for ($count = $i; $count < $i + 20; $count++) { $cat_names = tep_db_fetch_array($cat_names_query); $kws_home_default .= $cat_names['categories_name'] . ', '; } } else { while ($cat_names = tep_db_fetch_array($cat_names_query)){ $kws_home_default .= $cat_names['categories_name'] . ', '; } } //default title tag for the index (home) page $title_home_default = "ENTER YOUR DEFAULT TITLE TEXT HERE"; //default keywords for the index (home) page $kws_home_default .= STORE_NAME; //default Description for the index (home) page $desc_home_default = "ENTER YOUR DEFAULT DESCRIPTION TAG TEXT HERE FOR THE HOME PAGE"; } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);?> theres nothing wrong there. Ken Quote commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
T-B0N3 Posted June 23, 2009 Share Posted June 23, 2009 Hi Ken, and thanks again for your help. I use notepad++ which should be able to handle php files just fine. The php file itself looks like ok to me. So, should I paste the code you gave me into the index just to give it a try or do you have any other suggestions ? Quote Link to comment Share on other sites More sharing options...
GemRock Posted June 23, 2009 Author Share Posted June 23, 2009 pm me the ftp but i can only fix the index.php (home page) time wise... Ken Quote commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
GemRock Posted June 24, 2009 Author Share Posted June 24, 2009 Mi The problem of your site is very simple: your application_top.php was zero byte, ie, a blank file. I now upload one from a standard osc-rc2a download and the site is working now. you could have sent me the ftp last night - it took one minute to figure out once looking at it. you need now to further customise your header tags. Ken Quote commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
T-B0N3 Posted June 24, 2009 Share Posted June 24, 2009 Hi Ken, Thanks a million! I owe you a beer. Sorry about last night ... the baby started crying and I had to hold him and put him to sleep, and by the time he was asleep I was dead. Quote Link to comment Share on other sites More sharing options...
de2yoll Posted June 29, 2009 Share Posted June 29, 2009 HI . This is a great piece of work . Very useful to noobs in the coding area , like me . I have installed it ( v5 ,downloaded from your site ), along with seo url .Unfortunatelly it doesn't seem to work . I don't have any visible errors , nothing seems to be broken but even i change the keywords , title , or description nothing appears when i use the " view source " option of IE . I mean there are no keywords or title right there. Is like the contribution isn't even there . Can you , please , advise me ? thanks in advance . Quote Link to comment Share on other sites More sharing options...
GemRock Posted June 29, 2009 Author Share Posted June 29, 2009 HI . This is a great piece of work . Very useful to noobs in the coding area , like me . I have installed it ( v5 ,downloaded from your site ), along with seo url .Unfortunatelly it doesn't seem to work . I don't have any visible errors , nothing seems to be broken but even i change the keywords , title , or description nothing appears when i use the " view source " option of IE . I mean there are no keywords or title right there. Is like the contribution isn't even there . Can you , please , advise me ? thanks in advance . that only happens if: 1. you have not followed fully the instructions, especially the part of "how to use"; 2. you are using a template system of some sort. while it could work on osc that uses a template system, the instruction does not cover how to install it on a template. you can find out how on this support thread - your fellow site owners have successfully done it. Ken Quote commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
GemRock Posted June 29, 2009 Author Share Posted June 29, 2009 Hi Ken, Thanks a million! I owe you a beer. Sorry about last night ... the baby started crying and I had to hold him and put him to sleep, and by the time he was asleep I was dead. i have no place big enough to keep a million thanks, although a beer would be nice during this hot 31C summer week here in London :) btw, any good/famous beer in your part of the world so that i could check it out on the annual london beer festival? i know the poles are pround of their tyskie. Ken Quote commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
de2yoll Posted June 29, 2009 Share Posted June 29, 2009 that only happens if:1. you have not followed fully the instructions, especially the part of "how to use"; 2. you are using a template system of some sort. while it could work on osc that uses a template system, the instruction does not cover how to install it on a template. you can find out how on this support thread - your fellow site owners have successfully done it. Ken Thank you very much Ken , for such a fast response . Indeed , i use a template bought from templatemonster.com . i am sure that i followed you instructions in "how to use" very well. i installed the contribution on my machine on a xampp installation and on the online server of my hosting (on a copy of my site used for testing ). in the morning i'll do it again and read the full support thread . thank you , again . Quote Link to comment Share on other sites More sharing options...
GemRock Posted June 29, 2009 Author Share Posted June 29, 2009 Thank you very much Ken , for such a fast response . Indeed , i use a template bought from templatemonster.com . i am sure that i followed you instructions in "how to use" very well. i installed the contribution on my machine on a xampp installation and on the online server of my hosting (on a copy of my site used for testing ). in the morning i'll do it again and read the full support thread . thank you , again . i dont know every single template from the said template maker but i have worked on some osc stores that use the templates from the said template maker. from what i have seen, there is no difference between the two (the other being the stock, non-template osc) as far as my contribution is concerned, so your focis may be looking at if you have done the bit called "How to use - adding dynamic header tags to your shop" in the instructions. good luck, Ken Quote commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
T-B0N3 Posted June 30, 2009 Share Posted June 30, 2009 i have no place big enough to keep a million thanks, although a beer would be nice during this hot 31C summer week here in London :) btw, any good/famous beer in your part of the world so that i could check it out on the annual london beer festival? i know the poles are pround of their tyskie. Ken Hi Ken, Hmm ... well .. about the beer thingie. You could give Bergenbier a try (if you find it in there). Romania is not that famous about its beers, but fore its wine and traditional 90 degrees drinks. :) Quote Link to comment Share on other sites More sharing options...
de2yoll Posted June 30, 2009 Share Posted June 30, 2009 i dont know every single template from the said template maker but i have worked on some osc stores that use the templates from the said template maker. from what i have seen, there is no difference between the two (the other being the stock, non-template osc) as far as my contribution is concerned, so your focis may be looking at if you have done the bit called "How to use - adding dynamic header tags to your shop" in the instructions.good luck, Ken Hi , Ken . I have finally figured it up . I took your advice and looked again on " how to use " instruction and i observed that there were 2 options for modifying the products_info.php . First time ( the one thet didn't work out ) i replaced the code with the first option but today i have given the second option a chance and it worked like a charm . Well , the results are amazeing since i can modify all the information about my products from my admin panel . I must say again that this contribution is GREAT , mate . Thank you again for your work and for your prompt and helpful support . Quote Link to comment Share on other sites More sharing options...
Guest Posted July 1, 2009 Share Posted July 1, 2009 Hi and thankyou so much for the cotrib I have a few errors but will post them one at a time so not to clutter things up. The first one is when I go my website and click on anything in the categories menu. I get the following error: 1054 - Unknown column 'title_tag' in 'field list' SELECT categories_name, title_tag, desc_tag, keywords_tag FROM categories_description where categories_id = '47' AND language_id = '1' [TEP STOP] Of course the 'categories_id =' is different in each category Where do you think I went wrong? What would you suggest please? Quote Link to comment Share on other sites More sharing options...
Guest Posted July 1, 2009 Share Posted July 1, 2009 (edited) Second error is when I am in oscommerce admin/catalog and I click on Product Meta Tags I get a screen with the following Header Tags Entry/Edit 1054 - Unknown column 'pd.title_tag' in 'field list' select p.products_id, p.manufacturers_id, pd.products_name, pd.title_tag, pd.desc_tag, pd.keywords_tag, p.manufacturers_id from products p, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' limit 0, 16 [TEP STOP] Edited July 1, 2009 by amirage Quote Link to comment Share on other sites More sharing options...
Guest Posted July 1, 2009 Share Posted July 1, 2009 Next error is when clicking on Category Meta Tags 1054 - Unknown column 'cd.title_tag' in 'field list' select c.categories_id, cd.categories_name, c.parent_id, cd.title_tag, cd.desc_tag, cd.keywords_tag from categories c, categories_description cd where c.categories_id = cd.categories_id and cd.language_id = '1' and c.parent_id = '0' order by c.sort_order, cd.categories_name [TEP STOP]Category Nmae Page Title Tag (Optional) Description Tag (Optional) Keywords Tag (Optional) code] Anyone able to help with where I went wrong?At the end of the SE DYNAMIC Installation it also saysNow, go to your osCommerce Home page, click a category or product. This will add 3 new fields to the tables of products_description and categories_description in the database Unsure which tables it adds, wanted to check I see them in there, can anyone tell me which tables they are to ensure I have it done correctly?Sorry about all the questions...I'm a UNIVERSAL student willing to learn ;) Thanks in advance Quote Link to comment Share on other sites More sharing options...
GemRock Posted July 1, 2009 Author Share Posted July 1, 2009 ...1054 - Unknown column 'cd.title_tag' in 'field list'... very simple: you have NOT follow the instructions FULLY. in particular, failed to add some code to the application_top.php, which add the missing fields to the db/tables automatically. Ken Quote commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
Guest Posted July 1, 2009 Share Posted July 1, 2009 very simple: you have NOT follow the instructions FULLY. in particular, failed to add some code to the application_top.php, which add the missing fields to the db/tables automatically. Ken YOU are simply a LEGEND thanks so much, I took another look and couldn't find where I'd gone wrong so just started with the additions again and voila no more errors. Now, time to knuckle down and add some keywords and titles and get my ranking back up. Thanks again BRILLIANCE! :rolleyes: Quote Link to comment Share on other sites More sharing options...
a12c4magic Posted July 5, 2009 Share Posted July 5, 2009 Thanks Ken for great contribution that works, no problems whatsoever here. :) Quote Link to comment Share on other sites More sharing options...
Gubbanoa Posted July 16, 2009 Share Posted July 16, 2009 Thanks for a great contrib. Love the step-by-step guide. No problems installing it! -Thanks! Quote Link to comment Share on other sites More sharing options...
GemRock Posted July 18, 2009 Author Share Posted July 18, 2009 thank all for the appreciation! Ken Quote commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
Drezzzer Posted August 1, 2009 Share Posted August 1, 2009 I have a problem. After first installing the contribution Ultimate SEO URLs I checked everything and everything was working 100%. Then I installed this contribution and it works like a charm in the shop that the customers see (thanks Ken for your great contribution!). The problem comes when I'm trying to login to the Admin area, I only get an error now stating: Warning: include_once(includes/classes/seo.class.php) [function.include-once]: failed to open stream: No such file or directory in /home/stars/domains/mydomain.com/public_html/admin/includes/functions/html_output.php on line 22 Warning: include_once() [function.include]: Failed opening 'includes/classes/seo.class.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/stars/domains/mydomain.com/public_html/admin/includes/functions/html_output.php on line 22 Fatal error: Class 'SEO_URL' not found in /home/stars/domains/mydomain.com/public_html/admin/includes/functions/html_output.php on line 25 Any idea of what could be wrong? I have checked everything and the file that it is asking for (seo.class.php) is in the correct folder, and I have also uploaded it again to be sure it is no problem with that. Please help me, thanks! Quote Link to comment Share on other sites More sharing options...
GemRock Posted August 1, 2009 Author Share Posted August 1, 2009 I have a problem... the problem did not relate to this contribution. the site just moved to a new server and have some file mis-matched here & there plus some old php 4 function not being compatible with the phpv5 now on the server. but all fixed now. Good stuff sold on the site! Ken Quote commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience. Link to comment Share on other sites More sharing options...
Okari Posted August 4, 2009 Share Posted August 4, 2009 (edited) Great mod and worked first time after installing. However, there are two slight problems. 1. The homepage keywords tag displays my category names before displaying my default keywords. Eg. "category 1, category 2, category 3, category 4, default keyword 1, default keyword 2, default keyword 3...." I would like to know if it is possible to not display the categories. 2. The title tags on the product pages displays the category before my own title Eg. "Category - My Own Title" Again, please let me know how to amend so that it only displays my own title. This is a great contribution though and will be using on all future sites i work on! Excellent work!! Oh and i've used V.5.0 - <title><?php echo (strlen($title_tag) > 1) ? $title_tag . ' - ' . TITLE : $title_home_default . ' - ' . TITLE; ?></title> <meta name="description" content="<?php echo (strlen(strip_tags($desc_tag)) < 5)? $desc_home_default : strip_tags($desc_tag); ?>"> <meta name="keywords" content="<?php echo (strlen(strip_tags($keywords_tag)) < 5) ? $kws_home_default : strip_tags($keywords_tag); ?>"> Edited August 4, 2009 by Okari 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.