Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding text to index


dekop

Recommended Posts

hello

 

i want to add some text to my index.php so that if you enter the website you will se a picture of a comming soon product and below that i want to insert some text but i have try'd a couple of solutions but the wouldn't work can someon please help me

Link to comment
Share on other sites

Open your includes/language/english/index.php and add

 

define('TEXT_FRONT_PAGE', 'Enter your text here');

 

Next open your index.php file and find

 

<tr>

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

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

 

Alter it to

 

<tr>

<td class="main"><?php echo TEXT_FRONT_PAGE; ?></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>

 

You can move the

 

<tr>

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

<tr>

 

to wherevever you want the text to appear as long as it is within the table.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

in my index.php i cant find

 

Next open your index.php file and find

 

<tr>

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

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

 

if i just ctrl + h to search for a word and i use separator i cant even vind it

Link to comment
Share on other sites

@@dekop

 

What @@14steve14 posted refer to the old osCommerce version. Since you probably use version 2.3.x, the section look like this

 

<h1><?php echo HEADING_TITLE; ?></h1>
<div class="contentContainer">
 <div class="contentText">
   <?php echo tep_customer_greeting(); ?>
 </div>
<?php
   if (tep_not_null(TEXT_MAIN)) {
?>
 <div class="contentText">
   <?php echo TEXT_MAIN; ?>
 </div>
<?php
   }
   include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);
   include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);
?>
</div>

 

What you can do is

- Go to file catalog/includes/languages/english/index.php and add anything you want to TEXT_MAIN

- Define a new constant, e.g. MY_FRONTPAGE_TEXT and add it to catalog/index.php in the same way as TEXT_MAIN is getting added

- Take a look at the add ons for a addon called "modular frontpage"

Link to comment
Share on other sites

i use version 2.3.3

 

so if i want to do it i need to instert

 

define('TEXT_FRONT_PAGE', 'Enter your text here');

 

to my language/DUTCH/index.php

 

and then i need to make a new table? in the catalog/index.php with the

<div class="contentText">

<?php echo TEXT_FRONT_PAGE; ?>

</div>

 

or dont i need to create a table at all

Link to comment
Share on other sites

Please post the section of your catalog/index.php file that start after

 

 } else { // default page

 

Do not post the complete file and if possible use code tags, that is the <> symbol in the tools line while typing the post

Link to comment
Share on other sites

it is already below the } else { // default page line

 

 

<?php
 } else { // default page
?>
<h1><?php echo HEADING_TITLE; ?></h1>
<div class="contentContainer">
 <div class="contentText">
   <?php echo tep_customer_greeting(); ?>
 </div>
<div class="contentText">
<?php echo TEXT_FRONT_PAGE; ?>
</div>

 

// the text_front_page is the line i added for the tekst

i can also to be sure just add the line all the way at the bottom of the page but i dont know if it will help

Link to comment
Share on other sites

well those codes were from the catalog/index.php and the image is in the catalog/include/language/Dutch/index.php

 

but this is the code were the image is at

define('TEXT_MAIN', '<h2><IMG SRC="images/sabertooth2.jpg" WIDTH="630" HEIGHT="400" ALT="razer sabertooth controler coming soon">');

 

and the line i just added + the code i just showed you is in the catalog index.php

Link to comment
Share on other sites

Ah, ok, though there is some slider or something. Things are easy, just place the new

 

<div class="contentText">
<?php echo TEXT_FRONT_PAGE; ?>
</div>

 

after the existing

 

<div class="contentText">
<?php echo TEXT_MAIN; ?>
</div>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...