Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Titles on index category pages.


dburchm1

Recommended Posts

  • Replies 72
  • Created
  • Last Reply

Hi Jojee,

 

Check if what version of STS you're using.

 

Did you do the step: "Modify the model query to include products_name" correctly?

You have to replace the old query code whit this code:

 

$model_query = tep_db_query("select p.products_model, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . $languages_id . "'");

 

Hope this helps you, otherwise I dont know :thumbsup:

Link to comment
Share on other sites

Once again it appears I am overlooking the obvious after a long day, but here goes anyway.

I have HDC installed and my catalog seems to be working so far, but whenever I try to edit the includes/languages/english/header_tags.php file to get rid of the "osCommerce" and display my store name, then reload my page...it pulls up a blank.

I have STS installed and recently uninstalled the Master Products contrib.

I can re-upload the original file and everything works again, but if I change 1 word it goes bezerk.

It's been a long day and I'm probably just brain dead.

Link to comment
Share on other sites

Hi

 

I have made all the changes Alex outlined at the begining of this thread, but when I get to the part o change the index.php I am not sure what I need to chage?

 

This is what I am talking about..

 

Now in both default.php and product_info.php change

 

 

QUOTE

<title><?php echo TITLE; ?></title>

 

 

 

to

 

 

QUOTE

<title><?php echo TITLE; ?> - <?php echo $page_title; ?></title>

 

But I don't see anything that looks similar in the index.php can anyone help?

Thanks!

Toni

Link to comment
Share on other sites

Toni,

 

Look after the "<title></title>" tags in index.php

Paste "<?php echo $page_title; ?>" between the two tags.

If you don't have any <title> tags at all, create them benith the <head> tag

 

Hope this helps

Link to comment
Share on other sites

Toni,

 

Look after the "<title></title>" tags in index.php

Paste "<?php echo $page_title; ?>" between the two tags.

If you don't have any <title> tags at all, create them benith the <head> tag

 

Hope this helps

 

I think I must be in the wrong file? I dunno.. here is what mine looks like

 

 

?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 © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

define('TEXT_MAIN', 'Welcome To The Kit N Caboodle! We hope you will enjoy your visit to our site. We are still in the process of loading products into our store. If you do not see what you are looking for, please feel free to email us and we will see what we can do.');

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', 'The Kit N Caboodle');

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');

}

?>

 

 

this is the index.php file .. please keep in mind, im tired and my brain hurts :lol:

 

BTW thank you SOOOOO Much!!!!

Link to comment
Share on other sites

Hi Guys

 

I followed most of the steps, but got a little stuck on

Then after the breadcrumb ->add insert

 

 

QUOTE 

$page_title = $model['products_name'];

 

I could not find the line

breadcrumb ->add insert
in the file.

I'm pretty sure on the last past after this, but not tried it yet.

 

Thanks in advance.

Paul

Regards

Paul

Link to comment
Share on other sites

I added the code to use with STS and everything works. However, is there a way to put customized title and meta tag descriptions on the main index page?

 

Thanks,

Paul

Link to comment
Share on other sites

  • 2 weeks later...
To use this tip/trick whit STS 2.01 (simple template system) you need to do the following:

 

1. In the template file, default named "sts_template.html" in the includes folder, you need to remove any <TITLE>Any Title Text</TITLE> code, if there are any.

 

2. Open your template file (default named "sts_template.html" in the includes folder), search for this code:

Edit the echo command line, eg this line:

echo "<title>" . TITLE . "</title>";

 

Replace above line whit:

echo "<title>YOUR STORE NAME - $page_title</title>";

 

:D

 

Cheers,

Peter

 

Peter,

 

Your mod will work fine so long as you make it to the correct file.

 

The correct file is the sts_display_output.php file - NOT the sts_template.html file.

 

Best,

JB :thumbsup:

Steep learning curve? Hell, I don't even know enough to formulate a stupid question!!

Link to comment
Share on other sites

Peter,

 

Your mod will work fine so long as you make it to the correct file.

 

The correct file is the sts_display_output.php file - NOT the sts_template.html file.

 

Best,

JB :thumbsup:

 

Oh :huh: I'm sorry about that, my misstake of course, thanks for the correction JB! :blush:

Link to comment
Share on other sites

  • 5 years later...

Sorry, I do not very speak English.

Read on this forum the word "benith"

"Add benith"

What does this mean, I could not translate this word.

I understand:

Change to, Add below, REPLACE, but what is the "Add benith" not like I can not understand.

Maybe someone can tell what this means? This means adding code before or after a specified finding the code, or replace? What it is "benith"? It is a below?

Thank you.

Link to comment
Share on other sites

Probably this is some kind of shorthand, or composed of two words, a word that is not translated, but that knowledge of the language people understand. This is probably a vulgar dialect, or some kind of term. This word occurs on the third page of 58 topic

 

Toni,

 

Look after the "<title></title>" tags in index.php

Paste "<?php echo $page_title; ?>" between the two tags.

If you don't have any <title> tags at all, create them benith the <head> tag

 

Hope this helps

 

So i asked here. But before that, many times i've seen this word in describing the installation of the downloaded modules. Tried to translate here translate.google.com automatic language detection, with English, with German, but not as failed.

Thanks again for the very fast replay!!

Link to comment
Share on other sites

  • 3 months later...

I implemented Alex's idea, and it works great, with one exception: when on the front page, instead of the title being 'MYSTORE', it is now 'MYSTORE - '.

In order to fix this, make the following small changes:

 

Whereever you added $page_title, such as

 

replace it with

 

And then, in Index.php and in product_info.php, place the following:

 

or better yet,

 

(Though I haven't tried the second option, in ought to work)

 

This way, the hyphen is part of the variable, and isn't displayed when not needed.

 

-Ethan

 

Hi Ethan,

 

When you make the above change the space between the store name and page title is gone, so the title is now joined to the store name. I'm sure this is a simple fix but being a novice I have no idea what the fix is?

Knowledge is useless, unless transferred.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...