Well now you can change it to a more SEO-friendly structure. The “most important” keywords should be placed at the beginning of your Page Title, not at the end as default. So here’s a quick, simple way to fix that.
Note, this only has an effect on products and categories where you have not added your own page title. This functionality replaces the default generation of the page title when it is otherwise blank.
Please make a back-up of any files you change before making any edits live on your site.
Open, depending on your CS-Cart version (Professional or Ultimate, # denotes Store ID):
/skins/your-skin/customer/index.tpl
```<br />
OR<br />
```php
/stores/#/skins/your-skin/customer/index.tpl
```<br />
<br />
Locate this code:<br />
```php
{strip}<br />
<title><br />
{if $page_title}<br />
{$page_title|escape:"html"}<br />
{else}<br />
{foreach from=$breadcrumbs item=i name="bkt"}<br />
{if !$smarty.foreach.bkt.first}{$i.title|unescape|strip_tags|escape:"html"}{if !$smarty.foreach.bkt.last} :: {/if}{/if}<br />
{/foreach}<br />
{if !$skip_page_title}{if $breadcrumbs|count > 1} - {/if}{$location_data.title|escape:"html"}{/if}<br />
{/if}<br />
</title><br />
{/strip}
```<br />
And replace it with this code:<br />
```php
<br />
{strip}<br />
<title><br />
{if $page_title && $controller != 'products' && $controller != 'categories'}<br />
{$page_title|escape:"html"}<br />
{else}<br />
{foreach from=$breadcrumbs|array_reverse item=i name="bkt"}<br />
{if !$smarty.foreach.bkt.last}{if !$smarty.foreach.bkt.first} - {/if}{$i.title|unescape|strip_tags|escape:"html"}{/if}<br />
{/foreach}<br />
{if !$skip_page_title}{if $breadcrumbs|count > 1} - {/if}{$location_data.title|escape:"html"}{/if}<br />
{/if}<br />
</title><br />
{/strip}<br />
```<br />
<br />
This modification is tried and tested in V2.2.X and V3.0.X. It may also work for previous versions, but I am unable to test on 2.1.X or below.
Very interesting and cool. Honestly never realized I have probably been doing this wrong for some time now. Now I see that I should not be putting anything in the “page title” field, but I cannot seem to get it to switch around like you are saying. Is there something other than the code you have here that I need to have set different on the site?
Someone would have to extend the data for the product and category. Products have the cscart_product_data field to store additional “stuff” related to a product however I'm not aware of a similar one for categories. In any event, someone would have to use the available hooks and develop the pre/post controllers to support the new data.
But why not just put what you want in the page title field if you're going to add a new field for customized info?
Thats standard use already in CS-Cart, I was jsut saying that if I want stronger SEO then I need my own meta title and the store name at the end. inorder to avoid rewritng it over and over again.
I thought someone had posted some free modification that would allow you to specify your page title using variable names… I don't use it so you'll have to look.
The nice thing about the add-on from 1clue is you don't have to change any core files plus you can change them to any direction you want and add more stuff, like the price. We'll see if it helps.
Now there is a hook in title {hook name=“index:title”} so you can just open in my_changes folder (located in /design/themes/YOUR_THEME/templates/addons/) a folder with the name index and inside put the file title.override.tpl with this content
Thanks for sharing its work. but can you help, its the right place because I can not see how gogle sees my title. i look arround but cant find live test.