Jump to content

Better SEO and Site Titles


kinetic
 Share

Recommended Posts

As we all know today one of the most important things for better search engine friendliness and searching is unique site titles. Google experts tell us a unique page identifier such as a unique and descriptive page title will help immensly in getting better search results. CubeCart3 is lacking in this It DOES have a Site Tile option in Admin and a meta description and meta keywords field in admin but this is reallyonly for the home page. when viewing a product CC3 DOES swap out the meta description however this is only half the deal we need. In CC2.0.7 there was an excellent SEO Fix mod that gave site owners the ability to set the meta keywords and meta description for EACH PRODUCT absolutely lovely mod wish I could remember who made it...

but it still did not address titles in the title bar and specifically did not address Site document titles and for some of us this IS the other half of our stores and without unique page titles for these site docs google will have a time cacheing them if at all and users will not have a unique identifier when they BOOK MARK the site doc.

My client at http://www.usahaircare.com wanted their site docs to get the same treatment that categorys and product pages were getting Page Titles

I first tweaked the viewCatinc.php and viewProdinc.php located in includes/content/

to display the category and subcategory names as a page title as well upgraded the product page to not only display the Product title in the title bar but the immediate category it was in.

now for site docs...

once I was able to get my category sub category and product titles to display properly in the title bar I turned my attention to the forgotton step children called site docs.

IM happy to say that now any page you visit at http://www.usahaircare.com has a Unique and descriptive Page title which will go along way to making this site more search engine friendly.

Once I get my notes and edits together I WILL post the changes I made here for all to take advantage of.

this lack of actual SEO in CubeCart 3 is a slap in the face to all site owners or developers who have chosen to use CUbeCart 3 for without a search engine friendly website we will not get traffic and without traffic we cannot sell our products and if we cannot sell our products then CubeCart 3 is useless. dont get me wrong CubeCart 3 is a wonderful product and has had its share of growing pangs. but this is an area where llittle has been taken into account. :w00t:

Link to comment
Share on other sites

Here is the changes to make if you want more friendly Page titles

BACK UP YOUR FILES FIRST MAKE COPIES HIDE THEM FROM THE DOG THE KIDS and keep them safe!!!!!

UPDATED FOR 3.0.3

1) Open index.php

find at or around line 159

$body->assign("META_TITLE",$config['siteTitle'].c().$meta['siteTitle']);

REPLACE WITH::


$body->assign("META_TITLE",$meta['siteTitle'].c().$config['siteTitle']);

Save and Close index.php



NEXT

2) Open /includes/content/viewCat.inc.php

find at or around line 165


// get current category info

	if(isset($_GET['catId']) && $_GET['catId']>0){

  $currentCatQuery = "SELECT cat_name, cat_father_id, cat_id, cat_image FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_id = ".$db->mySQLSafe($_GET['catId']);

  $currentCat = $db->select($currentCatQuery);

ADD AFTER


$meta['siteTitle'] = $currentCat[0]['cat_name']." - ";

Save and Close viewCat.inc.php



NEXT

3) Open /includes/content/viewProd.inc.php

find at or around line 42


$meta['siteTitle'] = " - ".$prodArray[0]['name'];

REPLACE WITH::


$meta['siteTitle'] = $prodArray[0]['cat_name']." - ".$prodArray[0]['name']." - ";

Save and Close viewProd.inc.php



NEXT

4) Open /includes/content/viewDoc.inc.php

find at or around line 55


if(isset($result) && $result == TRUE){

	

	$view_doc->assign("DOC_NAME",$result[0]['doc_name']);

	$view_doc->assign("DOC_CONTENT",$result[0]['doc_content']);

ADD AFTER::


$meta['siteTitle'] = $result[0]['doc_name']." - ";

Save and Close viewDoc.inc.php

Now upload these 4 files to your server and voila spiffy Page titles any search engine spider would be proud of!!!!

I will continue to tweak these files so that Site Docs and Categories/subcategories and product pages have BETTER methods of adding meta descriptions and meta keywords. Hope this helps all of you!!!

Kinetic :w00t:

Link to comment
Share on other sites

let me know if you implement this SEO fix for your site Id love to see your cool page titles!!!

If you have problems editing the files let me know as well and Illhelp anyone who is having trouble but I dont think theres many who will have trouble this is an EASY mod

Kinetic

Link to comment
Share on other sites

Guest rukiman

Don't forget to add the line

$meta['metaDescription'] = strip_tags($config['metaDescription']);

in both viewCat.inc.php and viewDoc.inc.php whenever you assign $meta['siteTitle'] otherwise you will LOSE your description meta tag in all your category and site document pages. DO NOT add it to viewProd.inc.php it is already there!

The search engine friendly mod adds product and category names to the title. I will update it to include the document names and also retain the category structure within the title atm it only displays the current category name and current product name.

As for being able to have customized keywords/desciption/titles for products/categories, I will look into this.

Link to comment
Share on other sites

I didnt add the meta description code as it just pulls the main description and not a unique description there needs to be a mod so that in admin you can when adding or editing a product you have 2 text areas added where you can input a specific set of keywords and a specific meta description like we could in 2.0.7 with the SEO Fix mod same with the site docs when creating or editing a site doc there needs to be 2 additional text areas to input specific keywords and a meta description. the cheesy "SEO option" in store settings is lame it only really covers the home page... every page on a store should have a unique Page title meta keywords and meta description. but truly nowadays you can even get by w/o the meta keywords and meta description as google is placing MORE emphasis on unique page titles good content and back links

Link to comment
Share on other sites

Guest rukiman

I was thinking in the admin there would be these extra fields, pretty much the same as what you said.

In Add/Edit Product -> At the bottom a SEF URL table with text fields for "title", "keywords", "description". And for each box an dropdown box where you can specify whether the information will be "appended to main metas" OR "replaces main metas". If any of the text boxes are empty those fields empty will by default use the main metas.

Same story for Add/Edit Site Documents AND categories.

I think this is the most flexible approach. Any suggestions/comments?

Link to comment
Share on other sites

Guest rukiman

Ok made progress. I have decided to simply have title, keywords, descriptions for each sitedoc, product and category.

I will then have a drop down box in the general settings page where the admin can decide the behaviour of the new metas. They can choose to disable the new metas, make the new metas replace the global ones or combine the new metas with the global ones.

I will put this in v4 of the search engine mod.

Link to comment
Share on other sites

That sounds like a great plan. Would it mean adding a table to the db? No biggie for those with PHPMyAdmin, just a small import. The work you have done so far has gona a long way towards SEO. I am working on a viable Google SiteMapper and as soon as I resolve the login and reg redirects to minimize the editing I hope to be able to generate site maps for whoever needs them.

Link to comment
Share on other sites

seeing how I paid for your search engine mod and CANNOT use it I would like the meta keywords and meta titles and descriptions seprate from your search engine friendly URLS unless in version 4 you can show that search engine friendly URLS will work in all server environments

Link to comment
Share on other sites

Guest rukiman

Yes the inventory, categories and sitedocs will need to be expanded with three new text fields. I will try and create a script kinda like the upgrade script in cubecart to do this for users automatically.

Link to comment
Share on other sites

Guest rukiman

I will release it as soon as cube cart 3.0.3 is released, I want to update the baseline of the mod to this version.

Question is when is cube cart 3.0.3 going to be released? ;)

Link to comment
Share on other sites

I have just started with 3.2 and just was dismayed at the fact that the metas cannot be changed for each product, there would not seem to be any point in having the shop as the rankings would be poor and any chance of getting close to the coverted page 1 of google would be zero. I am about to add loads of products by hand, and this mod would be great, could you not relase it now rarther than wait for 3.3, it would be a great benefit for all who have just got or about to get 3.2 for the first time.

Actually I am very suprised looking through all the various posts, that the good parts of version 2 were not incorporated into version 3 I thought the idea of versions was that you improved on the preveious version not took away facilities.

Oh yes the other thing I wanted to ask was it was mentioned about opening index.php to start the changes, but which index.php as there are many in various folders.

Thanx

Link to comment
Share on other sites

Oh yes the other thing I wanted to ask was it was mentioned about opening index.php to start the changes, but which index.php as there are many in various folders.

the MAIN index.php

the index.php in your sites root

the index.php that runs the whole show...

that index.php

the big kahuna index.php

the index.php thats was in the unzipped files "upload" folder

NOT admin/index.php that wouldnt make any sense now would it? as we dont care if search engines spider our password protected admin area...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...