Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customizing the home page


anel73

Recommended Posts

Hello. Thank you all for all the help provided on this board. I have just installed OS Commerce, however, I am wondering how do I change the home page. In other words, when I go to my page on OS Commerce, I get this message:

 

Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?

 

This is a default setup of the osCommerce project, products shown are for demonstrational purposes, any products purchased will not be delivered nor will the customer be billed. Any information seen on these products is to be treated as fictional.

 

Error Messages

 

If there are any error or warning messages shown above, please correct them first before proceeding.

 

Error messages are displayed at the very top of the page with a complete background color.

 

Several checks are performed to ensure a healthy setup of your online store - these checks can be disabled by editing the appropriate parameters at the bottom of the includes/application_top.php file.

Editing Page Texts

 

The text shown here can be modified in the following file, on each language basis:

 

[path to catalog]/includes/languages/english/index.php

 

That file can be edited manually, or via the Administration Tool with the Languages->English->Define or Tools->File Manager modules.

 

The text is set in the following manner:

 

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

 

The text highlighted in green may be modified - it is important to keep the define() of the TEXT_MAIN keyword. To remove the text for TEXT_MAIN completely, the following example is used where only two single quote characters exist:

 

define('TEXT_MAIN', '');

 

More information concerning the PHP define() function can be read here.

Securing The Administration Tool

 

It is important to secure the Administration Tool as there is currently no security implementation available.

Online Documentation

 

Online documentation can be read at the osCommerce Wiki Documentation Effort site.

 

Community support is available at the osCommerce Community Support Forums site.

 

 

 

I need to change this but have no clue how to. Please help!!! Many thanks in advance

Yelena

Link to comment
Share on other sites

The text itself provides detailed instructions for how to remove it. Start at the line that begins with:

 

The text shown here can be modified in the following file, on each language basis:

 

Hi Jason, thanks so much. I have tried to do that and obviously did something wrong since this is what i iget now:

Parse error: parse error, unexpected T_STRING in /home/kiddiewo/public_html/osCommerce/catalog/includes/languages/english/index.php on line 13

I thought i found the define command and i had put "test" in it, but i ithink i had screwed it up now totally.

Any idea?

Link to comment
Share on other sites

For your 'test' word to show up,

 

this is what you would see in catalog/includes/languages/english/index.php

 

define('TEXT_MAIN', 'test');

 

You need the single quote marks ' around text_main and around your test word, then you also need the closing parentheses and the semi colon, or else you'll get a parse error.

 

Feel free to post what you have in that file :)

 

Hi Jason, thanks so much. I have tried to do that and obviously did something wrong since this is what i iget now:

Parse error: parse error, unexpected T_STRING in /home/kiddiewo/public_html/osCommerce/catalog/includes/languages/english/index.php on line 13

I thought i found the define command and i had put "test" in it, but i ithink i had screwed it up now totally.

Any idea?

Link to comment
Share on other sites

For your 'test' word to show up,

 

this is what you would see in catalog/includes/languages/english/index.php

 

define('TEXT_MAIN', 'test');

 

You need the single quote marks ' around text_main and around your test word, then you also need the closing parentheses and the semi colon, or else you'll get a parse error.

 

Feel free to post what you have in that file :)

I thought I didi that, but i guess i did it in the wrong place. so this is th ecomplete file that i have now:

 

This is a default setup of the osCommerce project...\');

 

The text highlighted in green may be modified - it is important to keep the define() of the TEXT_MAIN keyword. To remove the text for TEXT_MAIN completely, the following example is used where only two single quote characters exist:

 

define(\'TEXT_MAIN\', \'\');

 

More information concerning the PHP define() function can be read here.' . tep_image(DIR_WS_IMAGES . 'default/3.gif') . 'Securing The Administration Tool

 

It is important to secure the Administration Tool as there is currently no security implementation available.' . tep_image(DIR_WS_IMAGES . 'default/4.gif') . 'Online Documentation

 

Online documentation can be read at the osCommerce Wiki Documentation Effort site.

 

Community support is available at the osCommerce Community Support Forums site.

If you wish to download the solution powering this shop, or if you wish to contribute to the osCommerce project, please visit the support site of osCommerce. This shop is running on osCommerce version ' . PROJECT_VERSION . '.'); 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', 'Show:'); 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'); } ?>

 

 

 

THANKS SO MUCH!!

Link to comment
Share on other sites

Hmm, just use what I pasted below....but read on....

 

A couple of questions...

 

Are you editing with the file manager tool in your OSC admin panel? It looks like it. It's not a good idea. It's seems really convenient and cool, but it's buggy and I would strongly suggest avoiding it.

 

It's better to use FTP to download a copy of the file, save a copy as backup, then edit, upload....then reupload your backup if needed. That way you don't ever have to worry about making changes because you always have a 'safe' backup copy.

 

Two free programs that I would not have made it this far without...you can find them on google:

 

Filezilla (for FTP)

PHP Designer 2005 (for editing the files)

 

There are other free text and/or php editors...everyone has a preference, but that one is mine.

 

Here is a complete catalog/includes/languages/english/index.php with no demo text in it.

 

This file will work.with one exception...if you paste this file in that window in the admin tool, it will mess it up, instanty :o

 

<?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 (c) 2003 osCommerce

 Released under the GNU General Public License
*/

define('TEXT_MAIN', '');
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');
}
?>

 

 

I thought I didi that, but i guess i did it in the wrong place. so this is th ecomplete file that i have now:

 

This is a default setup of the osCommerce project...\');

 

The text highlighted in green may be modified - it is important to keep the define() of the TEXT_MAIN keyword. To remove the text for TEXT_MAIN completely, the following example is used where only two single quote characters exist:

 

define(\'TEXT_MAIN\', \'\');

 

More information concerning the PHP define() function can be read here.' . tep_image(DIR_WS_IMAGES . 'default/3.gif') . 'Securing The Administration Tool

 

It is important to secure the Administration Tool as there is currently no security implementation available.' . tep_image(DIR_WS_IMAGES . 'default/4.gif') . 'Online Documentation

 

Online documentation can be read at the osCommerce Wiki Documentation Effort site.

 

Community support is available at the osCommerce Community Support Forums site.

If you wish to download the solution powering this shop, or if you wish to contribute to the osCommerce project, please visit the support site of osCommerce. This shop is running on osCommerce version ' . PROJECT_VERSION . '.'); 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', 'Show:'); 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'); } ?>

THANKS SO MUCH!!

Link to comment
Share on other sites

Hmm, just use what I pasted below....but read on....

 

A couple of questions...

 

Are you editing with the file manager tool in your OSC admin panel? It looks like it. It's not a good idea. It's seems really convenient and cool, but it's buggy and I would strongly suggest avoiding it.

 

Mark, THANK YO SOOO MUCH! I pasted the text and it worked!!!!!!! Thank you, thank you , thank you!

I am actually using a control panel in my web hosting provider and i iam just changing the file in there. But i think your idea is probably better. I am new to all of this, but I am very impatient, so that is how I screw myself. But these boards are wonderful. And people that help impatient newbies like me ROCK!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...