Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Home page text edit on template


VCG

Recommended Posts

Posted

Hi all,

 

I'm new to the forum and not sure where to post this, so I apologise in advance if it's in the wrong area.

 

I've got a downloaded free OSCommerce 2.2 template installed on my website www.thegraphicsboat.co.uk, i'm having problems finding how to indert text into the main front page, i've searched the forum and also google but still can not find an answer.

 

So far we've tried english.php and index.php files but it does not change the front page.

 

Any help on this would be greatly received.

 

Many thanks

 

Will

Posted

Hi Will

on your index.pgp near the bottom your should have a line like <?php echo TEXT_MAIN?> if you cannot find it then its been removed and this is why it wont work.

Also check includes / langauges / english / index.php you should also have a line that is like define('TEXT_MAIN', ' yout text in here'); if there is nothing in there then add some works in between the ' and ' and try again.

Nic

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Posted

Hi Will

on your index.pgp near the bottom your should have a line like <?php echo TEXT_MAIN?> if you cannot find it then its been removed and this is why it wont work.

Also check includes / langauges / english / index.php you should also have a line that is like define('TEXT_MAIN', ' yout text in here'); if there is nothing in there then add some works in between the ' and ' and try again.

Nic

Hi Nic

 

Thanks for replying we already looked at the index.php in the htdocs and found no Text_Main option nor in the includes/languages/english/index.php so we added a line define('TEXT_MAIN', 'This is a default setup of the osCommerce project...'); into the file (Not sure if it's in the right place!) but still not showing any text on the website.

 

Below is the text in the langueages/english/index.php

 

Again your help is appreciated

 

Many thanks

 

Will

 

 

 

<?php

/*

$Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

define('TEXT_MAIN', 'This is a default setup of the osCommerce project...');

define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

define('HEADING_TITLE', 'Let\'s See What We Have Here');

define('TABLE_HEADING_IMAGE', '');

define('TABLE_HEADING_MODEL', 'Model');

define('TABLE_HEADING_PRODUCTS', 'Product Name');

define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');

define('TABLE_HEADING_QUANTITY', 'Quantity');

define('TABLE_HEADING_PRICE', 'Price');

define('TABLE_HEADING_WEIGHT', 'Weight');

define('TABLE_HEADING_BUY_NOW', 'Buy Now');

define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');

define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');

define('TEXT_SHOW', '<b>Show:</b>');

define('TEXT_BUY', 'Buy 1 \'');

define('TEXT_NOW', '\' now');

define('TEXT_ALL_CATEGORIES', 'All Categories');

define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');

} elseif ($category_depth == 'top') {

define('HEADING_TITLE', 'What\'s New Here?');

} elseif ($category_depth == 'nested') {

define('HEADING_TITLE', 'Categories');

}

?>

Posted

at the bottom of your index.php file look for

} else { // defualt

 

within a set ot <table> tages add the following

 

<tr>

<td class="main"><?php echo TEXT_MAIN; ?></td>

</tr>

Nic

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Posted

at the bottom of your index.php file look for

} else { // defualt

 

within a set ot <table> tages add the following

 

<tr>

<td class="main"><?php echo TEXT_MAIN; ?></td>

</tr>

Nic

 

From the default part this is how a default root index.php file looks

 

<?php
 } else { // default page
?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
 	<tr>
   	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
     	<tr>
       	<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
       	<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
     	</tr>
   	</table></td>
 	</tr>
 	<tr>
   	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 	</tr>
 	<tr>
   	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
     	<tr>
       	<td class="main"><?php echo tep_customer_greeting(); ?></td>
     	</tr>
     	<tr>
       	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     	</tr>
     	<tr>
       	<td class="main"><?php echo TEXT_MAIN; ?></td>
     	</tr>
     	<tr>
       	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     	</tr>
     	<tr>
       	<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
     	</tr>
<?php
include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);
?>
   	</table></td>
 	</tr>
</table></td>
<?php
 }
?>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Nic

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Posted

Nic, you are an absolute star....

 

Just copied the whole later part of what you said index.php looks like from default down, and well you can see it works like a dream.

 

We spent ages trying to find this solution out, bloomin templates lol

 

Right time to play now to get rid of the what's new here part and we're off

 

Again many thanks for your speedy responses.

 

Will

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...