Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to change page titles and headings?


Jack_mcs

Recommended Posts

Most new shop masters ask this question and, many times, do it incorrectly. This is meant as a quick quide for how a shops titles and page headings should be handled. The title is the name that appears in the browser. If you look at the title in your browser now, it will show "osCommerce Community Support Forums." The page heading is the text that is displayed on each page of the site. For the home page, it says "What's New Here?"

 

Changing the title for the site can be done by editing the includes/languages/english.php file. Locate the following line in that file and change it as you like:

// page title
define('TITLE', 'osCosmmerce');

If you can't find that code, try looking for the following code instead. This is used in the patched versions of oscommerce and allows the shops title to be set in admin->Configuration.

define('TITLE', STORE_NAME);

 

Changing the page headings for the home page and the category pages can be done by editing the includes/languages/index.php file. Look for the lines beginning with

define('HEADING_TITLE',

There will be three such instances.

 

If you do the above, the title and page heading for your home page will be as you want. But what about your product pages? There is no simple way to change those since the product pages are controlled by one file. The way around this is to install a meta tags contribution. Most, if not all, of them will allow you to control the titles and page headings for the entire site. This is important since the title is the first thing the search engines look at when entering your site. If it is not setup correctly, the chances of doing well in the search engine listings is reduced.

 

As far as what to change the title of the home page to, don't make the mistake of choosing the site name. The title should be the same as the main keyword you are targeting for that page. A keyword is some word or phase that someone will search for using a seach engine. It is very rare for the name of the shop to be searched for so by using that as the title, you are hurting your chances of being found by such searches.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 1 month later...
Most new shop masters ask this question and, many times, do it incorrectly. This is meant as a quick quide for how a shops titles and page headings should be handled. The title is the name that appears in the browser. If you look at the title in your browser now, it will show "osCommerce Community Support Forums." The page heading is the text that is displayed on each page of the site. For the home page, it says "What's New Here?"

 

Changing the title for the site can be done by editing the includes/languages/english.php file. Locate the following line in that file and change it as you like:

// page title
define('TITLE', 'osCosmmerce');

If you can't find that code, try looking for the following code instead. This is used in the patched versions of oscommerce and allows the shops title to be set in admin->Configuration.

define('TITLE', STORE_NAME);

 

Changing the page headings for the home page and the category pages can be done by editing the includes/languages/index.php file. Look for the lines beginning with

define('HEADING_TITLE',

There will be three such instances.

 

If you do the above, the title and page heading for your home page will be as you want. But what about your product pages? There is no simple way to change those since the product pages are controlled by one file. The way around this is to install a meta tags contribution. Most, if not all, of them will allow you to control the titles and page headings for the entire site. This is important since the title is the first thing the search engines look at when entering your site. If it is not setup correctly, the chances of doing well in the search engine listings is reduced.

 

As far as what to change the title of the home page to, don't make the mistake of choosing the site name. The title should be the same as the main keyword you are targeting for that page. A keyword is some word or phase that someone will search for using a seach engine. It is very rare for the name of the shop to be searched for so by using that as the title, you are hurting your chances of being found by such searches.

 

Jack

 

 

OOPS!

 

I found the line define ('TITLE', osCommerce'); and I changed the osCommerce to my stores name and I got the follwing error

 

Parse error: syntax error, unexpected T_STRING in /home/...../public_html/includes/languages/english.php on line 79

 

I changed it back to osCommerce and I still get the error. What did I do wrong?

Link to comment
Share on other sites

You might have placed some special chars or start and end inverted like 'oscommerce' might have been missed.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

You might have placed some special chars or start and end inverted like 'oscommerce' might have been missed.

 

Satish

 

 

Nope I left everything like it was and only changed the osCommerce th emy store name.the ('...'); remains as is. ANy other suggestions

Link to comment
Share on other sites

OOPS!

 

I found the line define ('TITLE', osCommerce'); and I changed the osCommerce to my stores name and I got the follwing error

 

Parse error: syntax error, unexpected T_STRING in /home/...../public_html/includes/languages/english.php on line 79

 

I changed it back to osCommerce and I still get the error. What did I do wrong?

Can you post the offending line?

Link to comment
Share on other sites

do paste your defines.

 

Its for sure that there is some ' in the text.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

  • 3 weeks later...

I just did the same thing , changed the texted only and now I as well get the same error. tried to change it back... same error. retyped the line... same thing.. any suggestions as it crashed the site and i would like to get it back.

 

// charset for web pages and emails

define('CHARSET', 'iso-8859-1');

 

// page title

define('TITLE', 'osCommerce');

 

// header text in includes/header.php

 

this is the line I want to change.. and then changed it back to 'osCommerce'

Link to comment
Share on other sites

I just did the same thing , changed the texted only and now I as well get the same error. tried to change it back... same error. retyped the line... same thing.. any suggestions as it crashed the site and i would like to get it back.
What error are you seeing?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

What error are you seeing?

 

Jack

Thank-you for looking at my Problem Jack

this is the error that shows when I make the change

 

Parse error: parse error, unexpected T_STRING in /var/www/vhosts/pegasusproducts.ca/httpdocs/includes/languages/english.php on line 79

 

When I remove the line completley I error Message moves up one line (78)

 

This has happened before when I have made changes and I have been able to fix the problem by retypeing the while php file but this one is way to big to retype

 

thanks for looking

John

Link to comment
Share on other sites

Thank-you for looking at my Problem Jack

this is the error that shows when I make the change

 

Parse error: parse error, unexpected T_STRING in /var/www/vhosts/pegasusproducts.ca/httpdocs/includes/languages/english.php on line 79

 

When I remove the line completley I error Message moves up one line (78)

 

This has happened before when I have made changes and I have been able to fix the problem by retypeing the while php file but this one is way to big to retype

 

thanks for looking

John

 

Well seems I fixed my problem. The error was not on the line where i made the change it was actually further down. it seems the for some reason when i made the change i wanted the apostophies (') are not recognized as such. i had to remove the (') in the "what's new" so it now reads "whats new" . does anyone know why and how I can put it back??

Link to comment
Share on other sites

Well seems I fixed my problem. The error was not on the line where i made the change it was actually further down. it seems the for some reason when i made the change i wanted the apostophies (') are not recognized as such. i had to remove the (') in the "what's new" so it now reads "whats new" . does anyone know why and how I can put it back??

you need to put a slash in front of the apostrophie so it should look like this: what\'s new

Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Link to comment
Share on other sites

you need to put a slash in front of the apostrophie so it should look like this: what\'s new

Thank you ..... it works now ..

 

I still do not understand why I had the original problem on a line that was half way down the script when all I did was Title change

But it is starting to look good now.

 

Thanks for the help /i am going to need more as I develop this site nice to know it is here

Link to comment
Share on other sites

  • 2 months later...

I used infromation from oscommercehowto.com which is now down and I managed to change the heading title not only to display the stor name but also the name of the category. But I dont remember how I didi it. Now I checked my index php and i found

 

on line 68

 <td class="pageHeading"><?php echo $myCategory['categories_name']; ?></td>

 

on line 234

<td class="pageHeading"><?php echo $myCategory['categories_name']; ?></td>

 

and on line 292

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

is this what I did to display category name on the title header of the browser????

 

ps on the original index.php

 

lines 66-232 and 290 look like

 

td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

Link to comment
Share on other sites

  • 5 months later...

hello

i am building my first oscommerce site and slowly but surely am getting towards where i want to be.

 

i tried to change the page title in languages/english.php:

 

define('TITLE', STORE_NAME);

 

i want the title to be:

 

define('TITLE', Wooden Toys and Gifts from Toywood);

 

but if i have more than one word in my title it gives me the error:

 

Parse error: syntax error, unexpected T_STRING in /homepages/22/d239769018/htdocs/catalog/includes/languages/english.php on line 48

 

if i just have one word it works fine:

 

define('TITLE', Toywood);

 

can anyone tell me what i am doing wrong please?

 

cheers!! :)

Link to comment
Share on other sites

  • 2 months later...

Did you ever figure this out?

 

Is there a reason you wouldn't just change it on the admin page interface?

 

Otherwise, if you use phpMyAdmin, you can go change it in the configuration table. In phpMyAdmin, select the configuration table on the left, then click on "browse." You'll see where to change the configuration_value for STORE_NAME on the first line.

 

Hope this helps someone. :)

Link to comment
Share on other sites

  • 2 weeks later...
hello

i am building my first oscommerce site and slowly but surely am getting towards where i want to be.

 

i tried to change the page title in languages/english.php:

 

define('TITLE', STORE_NAME);

 

i want the title to be:

 

define('TITLE', Wooden Toys and Gifts from Toywood);

 

but if i have more than one word in my title it gives me the error:

 

Parse error: syntax error, unexpected T_STRING in /homepages/22/d239769018/htdocs/catalog/includes/languages/english.php on line 48

 

if i just have one word it works fine:

 

define('TITLE', Toywood);

 

can anyone tell me what i am doing wrong please?

 

cheers!! :)

 

i fixed this by adding the apostrophes before and after the title as they were missing:

 

define('TITLE', Toywood);

 

changed to

 

define('TITLE', 'Wooden Toys and Gifts from Toywood');

 

and it seems to work fine!

Link to comment
Share on other sites

i fixed this by adding the apostrophes before and after the title as they were missing:

 

define('TITLE', Toywood);

 

changed to

 

define('TITLE', 'Wooden Toys and Gifts from Toywood');

 

and it seems to work fine!

I apologize for not responding to your original post. I missed it somehow. But, yes, your fix is correct. Thanks for posting it.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...
I used infromation from oscommercehowto.com which is now down and I managed to change the heading title not only to display the stor name but also the name of the category. But I dont remember how I didi it. Now I checked my index php and i found

 

on line 68

 <td class="pageHeading"><?php echo $myCategory['categories_name']; ?></td>

 

on line 234

<td class="pageHeading"><?php echo $myCategory['categories_name']; ?></td>

 

and on line 292

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

is this what I did to display category name on the title header of the browser????

 

ps on the original index.php

 

lines 66-232 and 290 look like

 

td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

This is a great script. It works. Tip: I changed line 290 to

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

also and it worked fine.

One problem exists though, Nested categories do not show a heading text. I will try to add some code to capture that. If it works I will let you know.

sophiacom

Link to comment
Share on other sites

  • 2 weeks later...
  • 7 months later...

I want to edit the heading_title cose so that the text will be regular text in a paragraph with capitols and lower case letters without all letters being capitols. How do i do this?

 

~Joe

 

Most new shop masters ask this question and, many times, do it incorrectly. This is meant as a quick quide for how a shops titles and page headings should be handled. The title is the name that appears in the browser. If you look at the title in your browser now, it will show "osCommerce Community Support Forums." The page heading is the text that is displayed on each page of the site. For the home page, it says "What's New Here?"

 

Changing the title for the site can be done by editing the includes/languages/english.php file. Locate the following line in that file and change it as you like:

// page title
define('TITLE', 'osCosmmerce');

If you can't find that code, try looking for the following code instead. This is used in the patched versions of oscommerce and allows the shops title to be set in admin->Configuration.

define('TITLE', STORE_NAME);

 

Changing the page headings for the home page and the category pages can be done by editing the includes/languages/index.php file. Look for the lines beginning with

define('HEADING_TITLE',

There will be three such instances.

 

If you do the above, the title and page heading for your home page will be as you want. But what about your product pages? There is no simple way to change those since the product pages are controlled by one file. The way around this is to install a meta tags contribution. Most, if not all, of them will allow you to control the titles and page headings for the entire site. This is important since the title is the first thing the search engines look at when entering your site. If it is not setup correctly, the chances of doing well in the search engine listings is reduced.

 

As far as what to change the title of the home page to, don't make the mistake of choosing the site name. The title should be the same as the main keyword you are targeting for that page. A keyword is some word or phase that someone will search for using a seach engine. It is very rare for the name of the shop to be searched for so by using that as the title, you are hurting your chances of being found by such searches.

 

Jack

Link to comment
Share on other sites

Do you mean you want to change the case of HEADING_TITLE of its contents. If the former, that is not a good idea. It will work but will make your code non-standard and may cause it to fail at some later date as changes are made, expecting standard code. If you mean the latter, then you just type it in that way. There are ways to do it with code but, again, that is non-standard, and overly complicates matters. If you have a lot of text in upper case, a better approach may be to use the Easy Populate and apply a forumla to change the text.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 1 year later...

Most new shop masters ask this question and, many times, do it incorrectly. This is meant as a quick quide for how a shops titles and page headings should be handled. The title is the name that appears in the browser. If you look at the title in your browser now, it will show "osCommerce Community Support Forums." The page heading is the text that is displayed on each page of the site. For the home page, it says "What's New Here?"

 

Changing the title for the site can be done by editing the includes/languages/english.php file. Locate the following line in that file and change it as you like:

// page title
define('TITLE', 'osCosmmerce');

If you can't find that code, try looking for the following code instead. This is used in the patched versions of oscommerce and allows the shops title to be set in admin->Configuration.

define('TITLE', STORE_NAME);

 

Changing the page headings for the home page and the category pages can be done by editing the includes/languages/index.php file. Look for the lines beginning with

define('HEADING_TITLE',

There will be three such instances.

 

If you do the above, the title and page heading for your home page will be as you want. But what about your product pages? There is no simple way to change those since the product pages are controlled by one file. The way around this is to install a meta tags contribution. Most, if not all, of them will allow you to control the titles and page headings for the entire site. This is important since the title is the first thing the search engines look at when entering your site. If it is not setup correctly, the chances of doing well in the search engine listings is reduced.

 

As far as what to change the title of the home page to, don't make the mistake of choosing the site name. The title should be the same as the main keyword you are targeting for that page. A keyword is some word or phase that someone will search for using a seach engine. It is very rare for the name of the shop to be searched for so by using that as the title, you are hurting your chances of being found by such searches.

 

Jack

 

 

Hi Jack,

 

I change page titles as your advise,and it worked.

 

But when I search our store name "dannovo" by Google,the result is "osCommerce",why and what is the problem?

 

Pls kindly advise,thanks.

Link to comment
Share on other sites

I change page titles as your advise,and it worked.

 

But when I search our store name "dannovo" by Google,the result is "osCommerce",why and what is the problem?

 

Pls kindly advise,thanks.

If the title has been changed, look at the top of the web browser while viewing your shop to check that, then it is just because google has not updated your listing. Changes you make to your shop do not instantly changed in the search engine listings. If your site is new and not checked much, it could be a month or two before such a change is made. There's nothing you can to in that case except wait. They will eventually change it.

 

As mentioned in the original post though, using the site name for the main keyword is usually a bad idea so you may want to re-think that.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...