Page 1 of 1
SEO - Product Suffix
Posted: Sun Oct 11, 2026 7:41 am
by Mort_Lemur
Hi,
I have been looking recently at SEO, inspired by a post by
@14Steve14.
I have noticed that Phoenix Cart appears to append the store name to product page titles. For example, the rendered title is:
This is my product Title which can be quite long | MY SITE NAME
The suffix isn’t in the product’s SEO title field, and I’ve seen the same behavior on the Phoenix demo when looking at the page source. As our store name is 18 characters, it can make product titles quite long, which is not really ideal for SEO which recommends product titles of around 50 - 60 characters (although no hard limit is set).
As I don't want to start altering core files, Is there a supported, update-safe way to remove the store-name suffix on product pages while keeping it on other pages? (eg Category pages) Would you recommend changing a setting, configuring the header-tags module, or using another approach such as an override?
Thanks

Re: SEO - Product Suffix
Posted: Sun Oct 11, 2026 8:46 am
by burt
A hook would do it, I think.
Minimal code, 1 new file.
Otherwise
Make a copy of the header tag module, stripping out the separator and other bits that you don't want.
Uninstall core HT module
Install your own new HT module
Minimal(ish) code, 2 new files (as the new HT would need a language file)
Either of these gets the result you want, no core code changes.
Probably simplest, remake the HT module, 5 minutes?
Hook way, you need to find the right injection point, make the hook, test it, etc. Probably slightly more work in the long run.
Re: SEO - Product Suffix
Posted: Sun Oct 11, 2026 11:28 am
by Omar_one
I was also reflecting on that, and having some free time today, I put together the following thoughts after reading Burt's response.
Code: Select all
<?php
/*
$Id$
CE Phoenix, E-Commerce made Easy
https://phoenixcart.org
Copyright (c) 2026 Phoenix Cart
Released under the GNU General Public License
*/
class ht_custom_product_title extends abstract_module {
const CONFIG_KEY_BASE = 'MODULE_HEADER_TAGS_CUSTOM_PRODUCT_TITLE_';
protected $group = 'header_tags';
function execute() {
global $product;
if (isset($_GET['products_id'], $product) && (basename(Request::get_page()) === 'product_info.php') && $product->get('name')) {
$product_title = ((MODULE_HEADER_TAGS_CUSTOM_PRODUCT_TITLE_SEO_TITLE_OVERRIDE === 'True') && (!Text::is_empty($product->get('seo_title')))
? $product->get('seo_title')
: $product->get('name'));
// Check if removal of store suffix is enabled
if (defined('MODULE_HEADER_TAGS_CUSTOM_PRODUCT_TITLE_REMOVE_SUFFIX') && MODULE_HEADER_TAGS_CUSTOM_PRODUCT_TITLE_REMOVE_SUFFIX === 'True') {
$GLOBALS['Template']->set_title($product_title);
} else {
// Use available separator or fallback safely
$separator = defined('MODULE_HEADER_TAGS_PAGES_SEO_SEPARATOR') ? MODULE_HEADER_TAGS_PAGES_SEO_SEPARATOR : ' | ';
$GLOBALS['Template']->set_title($product_title . $separator . $GLOBALS['Template']->get_title());
}
}
}
protected function get_parameters() {
return [
$this->config_key_base . 'STATUS' => [
'title' => 'Enable Custom Product Title Module',
'value' => 'True',
'desc' => 'Do you want to allow custom product titles to be added to the page title?',
'set_func' => "Config::select_one(['True', 'False'], ",
],
$this->config_key_base . 'REMOVE_SUFFIX' => [
'title' => 'Remove Store Suffix on Product Pages',
'value' => 'True',
'desc' => 'Do you want to remove the global store name suffix specifically on product pages?',
'set_func' => "Config::select_one(['True', 'False'], ",
],
$this->config_key_base . 'SORT_ORDER' => [
'title' => 'Sort Order',
'value' => '0',
'desc' => 'Sort order of display. Lowest is displayed first.',
],
$this->config_key_base . 'SEO_TITLE_OVERRIDE' => [
'title' => 'SEO Title Override?',
'value' => 'True',
'desc' => 'Do you want to allow product titles to be over-ridden by your SEO Titles (if set)?',
'set_func' => "Config::select_one(['True', 'False'], ",
],
];
}
}
Code: Select all
<?php
/*
$Id$
CE Phoenix, E-Commerce made Easy
https://phoenixcart.org
Copyright (c) 2026 Phoenix Cart
Released under the GNU General Public License
*/
const MODULE_HEADER_TAGS_CUSTOM_PRODUCT_TITLE_TITLE = 'Custom Product Title (No Store Suffix)';
const MODULE_HEADER_TAGS_CUSTOM_PRODUCT_TITLE_DESCRIPTION = 'Adds product names or SEO titles to the page title on product info pages without appending the global store name suffix.';