Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding text to index


dekop

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

@@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"

Posted

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

Posted

becuase in the index there is an image and now the text is beeing put above the image do i need to alter the place were i called it to adjust that?

Posted

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

Posted

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

Archived

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

×
×
  • Create New...