dko Posted October 30, 2007 Posted October 30, 2007 I have a second proble and hope to fix it as soon as possible, with your help of coursee :rolleyes: I need to make my index page show only text. For example a Welcome text. Without showing products. When i tried to do it, the products wouldn't display at all. The only way i thought of is to make a file welcome.php and make oscommerce read this file instead of index.php when a person types the url. But how can i do that? Please help...
Nullachtfuffzehn Posted October 30, 2007 Posted October 30, 2007 What did you exactly do in order to attempt of getting rid of the products from index.php?
dko Posted October 30, 2007 Author Posted October 30, 2007 1) i made another index.php which displayed the text i need. 2) renamed the original index.php to product_index.php 3) changed in header.php, where index.php was required to show products, to product_index.php But i cannot find one single file where another index.php is required to show products. Please take a look here to make you understand better.
Nullachtfuffzehn Posted October 30, 2007 Posted October 30, 2007 The index.php is the main file which controls most parts of the shop though. It is possible to do what you want, you just need to explain it a bit more detailed so I can get a better imagination of it. As far as i understood by now, you want to get rid of the categories in your header section. Anything else that shouldn't appear in the first place?
Guest Posted October 30, 2007 Posted October 30, 2007 new_products.php in /includes/modules.Put what you want there and will show in index
usernamenone Posted October 30, 2007 Posted October 30, 2007 Instead of going to all the trouble to make extra files that will need to be added to filenames.php and several other hacks why don't you just remove the products of the month and use the define text main that is in your languages file? Open your index.php and remove this chunk of code: <tr> <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> then open your includes > languages > english > index.php and add your text content here. define('TEXT_MAIN', 'added formatted html text will go here!');
dko Posted October 30, 2007 Author Posted October 30, 2007 Instead of going to all the trouble to make extra files that will need to be added to filenames.php and several other hacks why don't you just remove the products of the month and use the define text main that is in your languages file? Open your index.php and remove this chunk of code: <tr> <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> then open your includes > languages > english > index.php and add your text content here. define('TEXT_MAIN', 'added formatted html text will go here!'); I did exactly what you said but some products still appear and the text is not displayed :'(
dko Posted October 30, 2007 Author Posted October 30, 2007 The index.php is the main file which controls most parts of the shop though. It is possible to do what you want, you just need to explain it a bit more detailed so I can get a better imagination of it. As far as i understood by now, you want to get rid of the categories in your header section. Anything else that shouldn't appear in the first place? Actually no. What i need to get rid of is the new products at the first page you see when you type the url and instead of it put a text.
dko Posted October 30, 2007 Author Posted October 30, 2007 The best way to help me is to tell me in which file are the subcategories displayed appart from the header.php
dko Posted October 31, 2007 Author Posted October 31, 2007 OK i've found what i needed. Just in case someone needs to make a welcome page for the site... He should do all what i 've written before and: a) Open the new product_index.php Replace $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%'; echo ' <td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link([color="#FF0000"]FILENAME_DEFAULT[/color], $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n"; if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) { echo ' </tr>' . "\n"; With $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%'; echo ' <td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link([color="#FF0000"]FILENAME_CATEGORIES[/color], $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n"; if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) { echo ' </tr>' . "\n"; open filenames.php define('FILENAME_CATEGORIES', 'product_index.php');
Recommended Posts
Archived
This topic is now archived and is closed to further replies.