Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Create a new index page?


Guest hectorhe88

Recommended Posts

Guest hectorhe88

Hello:

 

Could you tell me how change the index page?

I need to create a "About page" like about and "Catalog Page" will be a section.

 

Thanks so much!

Link to comment
Share on other sites

Hector, you can easily create about us links from the information box. OR You could have a landing page with information on it and a link to your catalog.

 

 

 

 

 

Chris

Link to comment
Share on other sites

Or you could modify your existing index page to show any information and any content you want

 

Your file catalog/index.php looks basically like this

 if ($category_depth == 'nested') {
.
here we have subcategory listing
.

 } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {
.
Here we have product listing
.

 } else { // default page
.
here we dont have anything = front page
.
 }

 

You are interested in the last section, that looks like this (in version 2.3.1)

 } else { // default page
?>

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

<?php
 }

 

Here you can delete almost everything, so it looks like this

} else { // default page
?>

<div class="contentContainer">
 <div class="contentText">

 ----- here you can start adding what ever you want -----

 </div>
</div>

<?php
 }

 

Nw you can add anything you want, you can treat it as plain html, if you are not very sure about how to do you can take a look here

Link to comment
Share on other sites

  • 2 weeks later...
Guest hectorhe88

Thanks for reply!!

 

multimixer I have 2.2 version...

 

Appears like:

 

<?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>
           <?php /* <td class="main"><?php  if ( SHOW_ACCOUNT > 0) {
	echo ''; 
 } Else {

echo tep_customer_greeting();} ?></td> */ ?>
         </tr>
         <tr>
            <?php /* <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'); ?> <br/><br /> </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
 }
?>

 

How can eliminate this to insert a simple text? Is possible if I can put this code in another page, these will convert un catalog?

 

Thanks so much!!!

Link to comment
Share on other sites

What you call "this code" is a plain html table structure that does basically 3 things:

 

1) Display the "TEXT_MAIN"

2) Display the "new products" module

3) Display the "upcomming products" module

 

Now you need to be clear about what you want to "eliminate" and what you want to keep or add

 

To eliminate like everything, the part of the page will look like this

 

<?php
 } else { // default page
?>
   <td width="100%" valign="top">

   </td>
<?php
 }
?>

 

You can start adding tables (or div's) into this as you like, for example a picture of your dog, or a nice jQuery slideshow

 

Other option is you go to includes/languages/english/index.php and modify the "TEXT_MAIN" to display whatever you want. You can then keep or "eliminate" the other modules that are getting included

Link to comment
Share on other sites

i understand this, but how can i remove the categories sidebar as well. I would like the index page to be like a landing page without the categories and then have the categories sidebar show up on all the other pages. It is not possible to remove the side bar from the template top as i already tried this and it removed it from the entire site.

 

From the index.php you can only customize the 'text_main' area and remove the 'new products' and such.

 

i know creating a new index.php is probably the key, but then i run back into the template top situation?

 

any new ideas on this?

Link to comment
Share on other sites

Sophia

 

I know your problem. I am looking into having a landing page before the shop. I dont want an ordinary html page infront of my shop just in case the customer goes back to it especially as I will have SSL working.

 

Its a shame they dont do an index.php and a index1.php where you can have a welcome page with offers etc and then a button of some kind saying enter shop.

 

ill update you if I get anywhere on this.

 

regards

 

martyn

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...