Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

STS v4 help with index.php.html


Guest

Recommended Posts

Hi All

 

I'm really stuck on this, I have used STS once before and got it working fine but that was STS v3. It seems a lot has changed since then.

 

My problem is this, I have created a file called index.php.html which has all the code/tags from the original sts_template.html file except I removed the $content tag and replaced it with all the static content I want on the homepage.

 

When uploaded this file the index page appears nicely but all the category links do not work.....

 

I have tried removing the index.php.html and just used an exact copy of it but with the $content tag included and everything works fine.

 

 

This is probably so simple but I just don't get it. Why did this work in v3 and not in v4.... Do i have to modify a specific file to edit the $content tag on the index.php.html template I've created?

 

Thanks for any help

 

Weavers

Link to comment
Share on other sites

I'm sorry I don't think I can help you BUT I'm just wondering if you've upgraded everything you need to?

 

Here's some text from the installation file....

 

Upgrade Installations:

Upgrade from STS PLUS, STS v2 or v3 to STS v4.5

· Make a backup of your application, files and db.

· Do it again.

· Remove STS v2 or v3, but keep the files near, especially sts_user_code.php. Files to modify: configure.php, header.php, column_left.php, column_right.php, footer.php .

· Install STS 4.x version.

· Put back your specialities in the new sts_user_code.php, using the new syntax (see example in the file itself).

· Test well.

Upgrade from STS v4.4 to STS v4.5

Don't forget to backup your files before upgrading. The best is to use a file compare & merge program to merge the changes. Files noted as "replace" can just be overwritten with the new version, if you have not made any changes in those files of course.

- includes/application_top.php (merge with your changes)

- includes/footer.php (merge with your changes)

- includes/classes/sts.php v4.5 (replace)

- includes/modules/sts_inc/general.php v4.5 (replace)

- includes/modules/sts_inc/product_info.php v4.5 (replace)

- includes/modules/sts/sts_default.php v2.1.1 (replace)

- includes/modules/sts/sts_product_info.php v2.1.0 (replace)

Jessica Fuchs

Link to comment
Share on other sites

Hi Ackis

 

Thanks for replying, it is a clean install of the latest osc and STS. I've double checked all the files are correctly uploaded.

 

Like I say. if leave the $content tag on my index.php.html I get the default welcome text pop up and the category links work fine taking you to the product page so all things are working.

 

But I don't want the welcome text or any stuff generated by the $content tag on my home page. What I want is to just have the static content I've designed (see above link)

 

Am I doing something wrong or is it a set-up issue? Should I be designing a separate template for the content of the homepage?

 

Any help is extremely well appreciated

Edited by weavers
Link to comment
Share on other sites

I'm sorry. I can't help you with that. But I think it might be that you have to design a new template...

 

I've a problem as well... I've asked a question in the STS-thread but I haven't got an answer yet. It's not exactly like your's but I think that I have to create a new template as well... When my customers click on a productcategory the categorybox dissapear and the products are shown...

 

So my box dissapear and yours wont take the customers to the products.... hmm...

 

If I can help you later after getting an answer at my own question I'll contact you... but I hope you've already solved your problem then... will see.

 

Regards

Jessica

Jessica Fuchs

Link to comment
Share on other sites

Hi Ackis

 

Thanks for replying, it is a clean install of the latest osc and STS. I've double checked all the files are correctly uploaded.

 

Like I say. if leave the $content tag on my index.php.html I get the default welcome text pop up and the category links work fine taking you to the product page so all things are working.

 

But I don't want the welcome text or any stuff generated by the $content tag on my home page. What I want is to just have the static content I've designed (see above link)

 

Am I doing something wrong or is it a set-up issue? Should I be designing a separate template for the content of the homepage?

 

Any help is extremely well appreciated

 

 

Hi Weavers

 

I'm having exactly the same issue and I'm yet to find a work around. Have you managed to resolve the problem yet?

 

I tried with a static index.php page to avoid adding the osCommerce generated content, but as you have described the category navigation stopped working (it appears where it should on the page and seems to be functional, but doesn't populate the page).

 

I then tried adding the $content variable to the inde.php.html page which added the standard generated index blurbb & the new products for the current month. Not what I was looking for!!

 

I then created an index.php.html file for just the content area and placed it in the "sts_template > myTemplate > content" folder.... didn't work either!

 

I have been through the instructions several times and it appears that this is the correct way to setup the files, but no joy.

 

If anybody has any ideas I'd really appreciate some help with this.

 

Thanks

Link to comment
Share on other sites

Hi Wicky

 

Yes I did find a work around in the end.

 

I found the index.php file with all the standard blurb in and copied all the html code from my static design into the following code:

 

define('TEXT_MAIN',' add your stuff here ');

 

This worked great but still left the header text at the top but I found an answer here:

 

http://www.oscommerce.com/forums/index.php?showtopic=260756

Link to comment
Share on other sites

Hi Wicky

 

Yes I did find a work around in the end.

 

I found the index.php file ( catalog/includes/language/english/index.php ) with all the standard blurb in and copied all the html code from my static design into the following area:

 

define('TEXT_MAIN',' add your stuff here ');

 

This worked great but still left the header text at the top but I found an answer here:

 

http://www.oscommerce.com/forums/index.php?showtopic=260756

Edited by weavers
Link to comment
Share on other sites

Hi Wicky

 

Yes I did find a work around in the end.

 

I found the index.php file ( catalog/includes/language/english/index.php ) with all the standard blurb in and copied all the html code from my static design into the following area:

 

define('TEXT_MAIN',' add your stuff here ');

 

This worked great but still left the header text at the top but I found an answer here:

 

http://www.oscommerce.com/forums/index.php?showtopic=260756

 

Thanks for the reply.

 

Yeah, I found the same page before installing STS, but I can't work out how to avoid having the new products for this month on the page. I can see the code for the table header which I have commented out, but it doesn't affect the table and contents.

 

Any ideas how to remove this?

 

Seems weird that the index.php.html in the contents folder doesn't work correctly.

 

Cheers

Edited by Wicky
Link to comment
Share on other sites

I would say to remove the new products for month is further down in the same file. Unfortunately I'm not a programmer so can't say exactly but try commenting out one of the following and test.

 

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

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

Link to comment
Share on other sites

I would say to remove the new products for month is further down in the same file. Unfortunately I'm not a programmer so can't say exactly but try commenting out one of the following and test.

 

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

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

 

 

I did. I commented out everything pretty much, but the item sthat you listed above only affect the table headings and not the tables themselves. I have no idea where the table is coming from.

 

This is what I have done:

 

 

define('TEXT_MAIN', '');
//define('TEXT_MAIN', 'This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top"><b>Error Messages</b><br><br>If there are any error or warning messages shown above, please correct them first before proceeding.<br><br>Error messages are displayed at the very top of the page with a complete <span class="messageStackError">background</span> color.<br><br>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.</td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/2.gif') . '</td><td class="main" valign="top"><b>Editing Page Texts</b><br><br>The text shown here can be modified in the following file, on each language basis:<br><br><nobr class="messageStackSuccess">[path to catalog]/includes/languages/' . $language . '/' . FILENAME_DEFAULT . '</nobr><br><br>That file can be edited manually, or via the Administration Tool with the <nobr class="messageStackSuccess">Languages->' . ucfirst($language) . '->Define</nobr> or <nobr class="messageStackSuccess">Tools->File Manager</nobr> modules.<br><br>The text is set in the following manner:<br><br><nobr>define(\'TEXT_MAIN\', \'<span class="messageStackSuccess">This is a default setup of the osCommerce project...</span>\');</nobr><br><br>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:<br><br><nobr>define(\'TEXT_MAIN\', \'\');</nobr><br><br>More information concerning the PHP define() function can be read <a href="http://www.php.net/define" target="_blank"><u>here</u></a>.</td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/3.gif') . '</td><td class="main" valign="top"><b>Securing The Administration Tool</b><br><br>It is important to secure the Administration Tool as there is currently no security implementation available.</td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/4.gif') . '</td><td class="main" valign="top"><b>Online Documentation</b><br><br>Online documentation can be read at the <a href="http://www.oscommerce.info" target="_blank"><u>osCommerce Knowledge Base</u></a> site.<br><br>Community support is available at the <a href="http://www.oscommerce.com/forums" target="_blank"><u>osCommerce Community Support Forums</u></a> site.</td></tr></table><br>If you wish to download the solution powering this shop, or if you wish to contribute to the osCommerce project, please visit the <a href="http://www.oscommerce.com" target="_blank"><u>support site of osCommerce</u></a>. This shop is running on osCommerce version <font color="#f0000"><b>' . PROJECT_VERSION . '</b></font>.');
define('TABLE_HEADING_NEW_PRODUCTS', '');
//define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', '');
//define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
define('TABLE_HEADING_DATE_EXPECTED', '');
//define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

/*if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
 define('HEADING_TITLE', '');
 //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', '');
 //define('HEADING_TITLE', 'What\'s New Here?');
} elseif ($category_depth == 'nested') {
 define('HEADING_TITLE', 'Categories');
}*/
?>

Link to comment
Share on other sites

I worked it out. You need to edit all of the following files:

 

catalog > includes > languages > english.php

catalog > includes > languages > english > index.php

catalog > index.php

 

I think that STS was designed to avoid having to do this (hunt down several files & make lots of edits), but I can't get the index page to work as I want with STS.... I've tried everything!

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...