bluefusionweb Posted March 2, 2007 Share Posted March 2, 2007 Hi all completly new to this im using STS4 and trying to fully cutomise the way my shop looks, and I want to just simply on the homepage edit the "WHATS NEW HERE?" bit...ive removed all the text from the index.php file so now all thats displayed is the title "What's new here?" then "Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?" and then a picture of the only product in my database so far. Where do I actually edit this bit to define what is displayed on the homepage when it first loads the site? (because im using STS4 i've literally just put $content# into a central table within my page template) Hope that all makes sense im sure its very simple. Cheers James Link to comment Share on other sites More sharing options...
bkellum Posted March 3, 2007 Share Posted March 3, 2007 Hi all completly new to this im using STS4 and trying to fully cutomise the way my shop looks, and I want to just simply on the homepage edit the "WHATS NEW HERE?" bit...ive removed all the text from the index.php file so now all thats displayed is the title "What's new here?" then "Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?" and then a picture of the only product in my database so far. Where do I actually edit this bit to define what is displayed on the homepage when it first loads the site? (because im using STS4 i've literally just put $content# into a central table within my page template) Hope that all makes sense im sure its very simple. Cheers James James, May I suggest the following:To get rid of "Let's See What We Have Here" or "What's New Here" for your Categories and Sub-Categories, you can replace them dynamically with the name of the categories or subcategories name. Here is how I hacked the OsCommerce code to do it: Open the following file in a text editor: /yourstore/index.php Do a search for the following line of code: <?php echo HEADING_TITLE; ?> You will find three instances of each. Do the following: To see the name of your CATAGORIES instead of "let's see what we have here" text, just replace the first instance of the code: <?php echo HEADING_TITLE; ?> with the following: <?php echo $category['categories_name'] ?> To also have SUBCATEGORIES displayed dynamically as the CATAGORIES above, just replace the second instance of the code: <?php echo HEADING_TITLE; ?> with the following: <?php $category_query1 = 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 . "'"); $category1 = tep_db_fetch_array($category_query1); if ($category1['categories_name'] != "") {echo $category1['categories_name'];} else { echo HEADING_TITLE;} ?> The third <?php echo HEADING_TITLE; ?> should be left alone so you do not need to modify it at all. Don't forget to save your document as the same name as the original index.php. That's all there is to it. Note: The change for the generic text that is on the default osCommerce store's introduction and welcome is altered in the catalog/includes/languages/english/index.php file. This index.php file will need to be changed in all of the language folders. Good luck, Bill Kellum Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
bluefusionweb Posted March 3, 2007 Author Share Posted March 3, 2007 Hi Bill, Thanks that seems to work, I've actually blanked out alot fo lines now so at the moment the only thing coming up on my homepage is the result of this line: <?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?> Thats obvisouly showing the new products. How can I change that to show the SPECIAL OFFERS instead of new products? Cheers James Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.