MostlyConfused Posted February 17, 2021 Posted February 17, 2021 I noticed, that some pages of my shop had HTML TITLE tags and others not. More precisely, those based on main.php do, those on main_checkout.php don't. Both contain the same line <title>{$META_TITLE}</title> but when I check the Smarty debug, there's the correct value in main.php, but no value in main_checkout.php My template is based on Minimaliser. I have changed a lot, but I can't remember anything that would let this varable disappear. Also everything else is working, just not the title. So when I am in the basket for example, the title is empty, at a product page, it shows the product name correctly. Any ideas? Cheers
bsmither Posted February 17, 2021 Posted February 17, 2021 As currently coded, there is no SEO path for any of the checkout pages: basket, confirm, checkout, gateway, complete. Note: just recently, an SEO path was introduced for the Gift Certificate and Contact Us pages. I'm not saying it can't be done. But there is no place in admin to make any settings that are particular to the checkout pages (like there is for the Gift Certificate page), where one can have a text-entry field for what the admin wants the META_TITLE to say.
MostlyConfused Posted February 18, 2021 Author Posted February 18, 2021 10 hours ago, bsmither said: As currently coded, there is no SEO path for any of the checkout pages: basket, confirm, checkout, gateway, complete. Note: just recently, an SEO path was introduced for the Gift Certificate and Contact Us pages. I'm not saying it can't be done. But there is no place in admin to make any settings that are particular to the checkout pages (like there is for the Gift Certificate page), where one can have a text-entry field for what the admin wants the META_TITLE to say. I did not expect this, why would anybody have any page without a title? It's not that important to me that it would rectify asking for any major changes, I just find it strange. So, the most feasible way would be to either hardcode the title in main_checkout, or program a non-CC workaround for it myself I guess?
bsmither Posted February 18, 2021 Posted February 18, 2021 Also, all of the customer's account pages do not have titles, nor Login nor Register (but these last two have actual SEO path names such as login.html and register.html). What would you like for it to be? Just curious. For the following, here are the file and line number where each type of page has the code to build the META_TITLE: Documents: CubeCart->getDocument(), near line 180 Products: Catalogue->displayProduct(), near line 330 Categories: Catalogue->displayCategory(), near line 264 Gift Certificates: CubeCart->_certificates(), near line 899 Contact Us: CubeCart->_contact(), near line 1474 Eventually, all that data gets assigned to the template variables in SEO->displayMetaData() which is called in GUI->displayCommon(). So, most of what you want to look closer at is in the CubeCart class, at the various private functions. Most, if not all, have a hook.
MostlyConfused Posted February 18, 2021 Author Posted February 18, 2021 1 hour ago, bsmither said: What would you like for it to be? Just curious. If there is no TITLE, the browser shows the path instead and that bugs me. The affected pages are not really important for SEO, it's just a cosmetic thing. I modified main.php and main_checkout.php like this and it does the trick for me: {if $META_TITLE} <title>{$META_TITLE}</title> {else} <title>My custom title if no other is present</title> {/if}
havenswift-hosting Posted February 18, 2021 Posted February 18, 2021 10 hours ago, MostlyConfused said: I modified main.php and main_checkout.php like this and it does the trick for me: Except that will give you duplicate titles on different pages - some debate as to whether having duplicates is worse than having no title. To be honest, you shouldnt really be bothered about having a title or getting your basket / checkout pages indexed
Recommended Posts
Archived
This topic is now archived and is closed to further replies.