Ajeh Posted April 21, 2003 Share Posted April 21, 2003 This is for MS1 You should just need to change the one line per the 3 sections, exact line numbers may vary, but you are replace the HEADING_TITLE with the new code in each case. The new functions can go either in general.php or you can add a new funciton file and add an include line to the general.php so that you keep new functions seperate from existing functions. Example: create a file called /includes/functions/my_functions.php and add to the general.php file at the bottom, before the ?> require(DIR_WS_FUNCTIONS . my_functions.php'); The Parse error sounds like you missed the closing bracket on one of the new functions. Note: when you edit the general.php make sure there are no trailing blank spaces or lines after the end of the file's ?> Link to comment Share on other sites More sharing options...
sangam Posted December 4, 2003 Share Posted December 4, 2003 can anyone provide support on how to fix this in 2.2ms2 i cant find file default.php anywhere :( Link to comment Share on other sites More sharing options...
enchantedneedle Posted December 14, 2003 Share Posted December 14, 2003 Sangam, I believe the default.php was renamed to index.php for ms2. Tammy Link to comment Share on other sites More sharing options...
CleoK Posted December 19, 2003 Share Posted December 19, 2003 I'm so lost... Instead of seeing "Let's see what we have here" with the products listed below it when I click on a category.. I want to see the Category name.. then the products "Lets see what we have here" is defined in catalogs/includes/languages/english/index.php (i don't see a default.php in that directory OR in the "catalog/" directory) i want to have the Category name.. I don't need manufactures.. just the category name instead of "let's see what we have here" exactly HOW do i affect that change... and where? Link to comment Share on other sites More sharing options...
CleoK Posted December 20, 2003 Share Posted December 20, 2003 desperately bumping this up in hope for some "how to" from a php SantaGuru! Link to comment Share on other sites More sharing options...
OceanRanch Posted December 20, 2003 Share Posted December 20, 2003 Change the define to define('HEADING_TITLE', $categories['categories_name']); then a little below that change the nested define from } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); to } elseif ($category_depth == 'nested') { define('HEADING_TITLE', $categories['categories_name']); HTH Tom Link to comment Share on other sites More sharing options...
CleoK Posted December 23, 2003 Share Posted December 23, 2003 Tom thank You.. but, you're dealing with a real newbie here.. I can't find the places to make these changes on catalog/index.php are they in some other file??? Link to comment Share on other sites More sharing options...
OceanRanch Posted December 23, 2003 Share Posted December 23, 2003 The file is in catalog/includes/languages/english/index.php Don't worry you'll get used to getting lost in the directory structure. ;) Don't give up we were all newbies at one time. HTH Tom Link to comment Share on other sites More sharing options...
CleoK Posted December 23, 2003 Share Posted December 23, 2003 Bless you Tom! It worked beautifully! Happy Holidays to You! and to all you love! .. Cleo Link to comment Share on other sites More sharing options...
cburd Posted December 31, 2003 Share Posted December 31, 2003 hey thanks to all I needed to do the same and modded this slightly I still wanted it to say Let's see what we have in the so I added the following: <?php echo 'Let\'s see what we have in the ' . tep_get_category_name($current_category_id); ?> it makes it that much nicer :D Link to comment Share on other sites More sharing options...
cburd Posted December 31, 2003 Share Posted December 31, 2003 I added the following lines to mine to further edit this, I liked the idea of it displaying the category name but I wanted it to say let's see what we have in the (whatever the category name was) category. Hope this helps someone else along the way <?php echo 'Let\'s see what we have in the ' . tep_get_category_name($current_category_id) . (' category'); ?></td> :D Happy new years Link to comment Share on other sites More sharing options...
Guest Posted February 23, 2004 Share Posted February 23, 2004 Just as an add on in OSC2.2MS2 the 'Let's see what we have here' for manufactures can be easily be changed using the code below. This includes the category name change as well in catalog/includes/languages/english/index.php change the code from if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { define('HEADING_TITLE', 'Let\'s See What We Have Here'); define('TABLE_HEADING_IMAGE', ''); ... ... } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } to if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { if (isset($HTTP_GET_VARS['manufacturers_id'])) { define('HEADING_TITLE', $manufacturers['manufacturers_name']. ' Products'); } else{ define('HEADING_TITLE', $categories['categories_name']); } define('TABLE_HEADING_IMAGE', ''); ... ... } elseif ($category_depth == 'nested') { define('HEADING_TITLE', $categories['categories_name']); } Rob Link to comment Share on other sites More sharing options...
daveboyle99 Posted April 17, 2004 Share Posted April 17, 2004 Rob, Thanks for that, much simpler than the earlier posts. Much appreciated. Dave Link to comment Share on other sites More sharing options...
JHouse Posted July 2, 2004 Share Posted July 2, 2004 Tom, That worked like a champ. Thank you so much. JHouse Link to comment Share on other sites More sharing options...
rathcroghan Posted August 25, 2004 Share Posted August 25, 2004 Rob cheers I was tearing my hair out until I found your elegant solution. Link to comment Share on other sites More sharing options...
Yikes Posted September 29, 2004 Share Posted September 29, 2004 Dang! And I read through the whole darned thread just to find this PERFECT AND SIMPLE solution -- AT THE END >_< Thanks! :thumbsup: Link to comment Share on other sites More sharing options...
muxlow Posted December 10, 2004 Share Posted December 10, 2004 N'mind... Link to comment Share on other sites More sharing options...
NHRAFan Posted January 1, 2005 Share Posted January 1, 2005 Change the define to define('HEADING_TITLE', $categories['categories_name']); then a little below that change the nested define from } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); to } elseif ($category_depth == 'nested') { define('HEADING_TITLE', $categories['categories_name']); HTH Tom <{POST_SNAPBACK}> This worked perfectly. I had tried to use the hack in the contributions, but that never worked for me. Link to comment Share on other sites More sharing options...
oblivion77 Posted January 5, 2005 Share Posted January 5, 2005 Thanks, I spent so much time trying to find out how to change this. I don't understand why ocCommerce does not have the category name in the heading_title in the first place. It took me a little while to find the file to change but that is because I am new at this. includes/languages/english/index.php is where the file is located that needs to be changed. Link to comment Share on other sites More sharing options...
happydance Posted January 19, 2005 Share Posted January 19, 2005 This worked perfectly. I had tried to use the hack in the contributions, but that never worked for me. <{POST_SNAPBACK}> Yes! I've been trying to figure this out on my own! I am so glad I ran into your note! Thanks... :) Link to comment Share on other sites More sharing options...
yehudas Posted January 19, 2005 Share Posted January 19, 2005 Thanks a lot it makes a big difference to my site. by the way is there a way to get subcategories to show as (for instance) books - children? many thanks to all of you, you make putting up a site a breeze. Yehuda Like it says: One who is embarrassed will never learn! Link to comment Share on other sites More sharing options...
jacklawry Posted July 25, 2005 Share Posted July 25, 2005 GREAT WORKS 100% ;-) so simple yet so effective! Change the define to define('HEADING_TITLE', $categories['categories_name']); then a little below that change the nested define from } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); to } elseif ($category_depth == 'nested') { define('HEADING_TITLE', $categories['categories_name']); HTH Tom <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
Guest Posted July 26, 2005 Share Posted July 26, 2005 I am doing an oscommerce install - wanted to get rid of the "See What We Have" line. The exeisting fix is great but I wanted to display Category - Subcategory (Books - Childrens) This works but is not very elegant. In the includes/languages/english/index.php file 1 - ADD THESE LINES AFTER define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); // **************************************************************************** // ***** Use the cPath variable to find category id $main_cat_id = explode("_",$cPath); $main_cat_id = $main_cat_id[0]; // ***** Query the db $sql = tep_db_query("SELECT categories_name FROM categories_description WHERE categories_id='" . $main_cat_id ."'"); $row = tep_db_fetch_array($sql); $main_cat_display = $row["categories_name"]; // ***** Avoid displaying "Books Books" if ($categories['categories_name'] <> $main_cat_display){ $heading_title_display = $main_cat_display . " " . $categories['categories_name']; }else { $heading_title_display = $categories['categories_name']; } // **************************************************************************** 2 - REPLACE THE 'products' HEADING TITLE LINE WITH THIS: define('HEADING_TITLE', $heading_title_display); 3 - REPLACE THE 'nested' HEADING TITLE LINE WITH THIS: define('HEADING_TITLE', $heading_title_display); Link to comment Share on other sites More sharing options...
yodergraphics Posted July 27, 2005 Share Posted July 27, 2005 This worked for me (combining a lot of the previous posts) The big change is the customer wanted to say "Now Available in..." before the main category and sub cateogory names. (I'm a php newbie, so backup before you try!) catalog/includes/languages/english/index.php define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); // **************************************************************************** // ***** Use the cPath variable to find category id $main_cat_id = explode("_",$cPath); $main_cat_id = $main_cat_id[0]; // ***** Query the db $sql = tep_db_query("SELECT categories_name FROM categories_description WHERE categories_id='" . $main_cat_id ."'"); $row = tep_db_fetch_array($sql); $main_cat_display = $row["categories_name"]; // ***** Avoid displaying "Books Books" if ($categories['categories_name'] <> $main_cat_display){ $heading_title_display = 'Now Available in' . " " . $main_cat_display . " " . $categories['categories_name']; }else { $heading_title_display = 'Now Available in' . " " . $categories['categories_name']; } // **************************************************************************** if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { define('HEADING_TITLE', $heading_title_display); define('TABLE_HEADING_IMAGE', ''); and then at the bottom. } elseif ($category_depth == 'top') { define('HEADING_TITLE', $heading_title_display); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', $heading_title_display); } Link to comment Share on other sites More sharing options...
yodergraphics Posted July 27, 2005 Share Posted July 27, 2005 I ended up changing the bottom snippet so the index page would say "Welcome". I didn't realise that this particular 'HEADING_TITLE' controlled that. catalog/includes/languages/english/index.php define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); // **************************************************************************** // ***** Use the cPath variable to find category id $main_cat_id = explode("_",$cPath); $main_cat_id = $main_cat_id[0]; // ***** Query the db $sql = tep_db_query("SELECT categories_name FROM categories_description WHERE categories_id='" . $main_cat_id ."'"); $row = tep_db_fetch_array($sql); $main_cat_display = $row["categories_name"]; // ***** Avoid displaying "Books Books" if ($categories['categories_name'] <> $main_cat_display){ $heading_title_display = 'Now Available in' . " " . $main_cat_display . " " . $categories['categories_name']; }else { $heading_title_display = 'Now Available in' . " " . $categories['categories_name']; } // **************************************************************************** if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { ?define('HEADING_TITLE', $heading_title_display); ?define('TABLE_HEADING_IMAGE', ''); and then at the bottom. } elseif ($category_depth == 'top') { define('HEADING_TITLE', 'Welcome'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', $heading_title_display); } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.