| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
Page Title in 4.2 | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Page Title in 4.2
4.2 came out with some new features including meta keywords, meta descriptions and clean url's, but QT left out something very important - PAGE TITLE. Page title is still "product name-category name-store name" or "store name-category name-product name" and there is no setting to change that. I wonder why they didn't include page title for products, categories, static pages....
Anyway here is how this can be added. Please note that this is for stores that do not have 3rd party SEO addons and is for 4.2. Please make backups to your DB and store files first 1. Add new field to xcart_products table. I called my product_page_title and is varchar(255), latin1_swedish_ci 2. Add new language variable - lbl_product_page_title with value "Product Page Title" 3. Open include/product_modify.php and find Code:
Code:
4. Open skin1/main/product_details.tpl and add Code:
5. Open include/import_products.php and find Code:
Code:
6. Open skin1/customer/service_head.tpl and find Code:
Code:
Same logic can be applied to the categories changing the coresponding files
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#2
|
|||||||||
|
|||||||||
Re: Page Title in 4.2
this is very usefull, thank you for this post. I've been thinking about something like this for a while. It always looks good in serp's when your title does not get cut off half way on a word. I've changed it up a little though.
This line of code for skin1/main/product_details.tpl , i've added a maxchar limit to where google truncates the title tag: Code:
or what would be even better than this is a char counter on the text box that would show you how many characters you have left before Google truncation, but still allowed you to make a longer title tag.
__________________
X-Cart Gold v4.2.0 [Linux] Add-On: X-Magnifier Altered Cart Add-On: One Page Checkout |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: Page Title in 4.2
Yes Google picks up the first 64 characters but you can still show more in the title. That's the reason i left it without 64 character restriction. Glad someone got use of it though
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#4
|
|||||||
|
|||||||
Re: Page Title in 4.2
FANTASTIC mod clf! Thanks a TON for this.
Would you happen to know how to do this same thing for static pages / mind giving a quick tutorial on how to do it? Thanks again!
__________________
v 4.1.11, v 4.2 |
|||||||
#5
|
|||||||||
|
|||||||||
Re: Page Title in 4.2
Happy it works out for you. I haven't done it for anything except product and category pages. The default x-cart way for right now works fine for my static pages so I didn't even look at the code and try to change it. I would say if you follow the same logic you will find the way. I might look at doing this a later time
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#6
|
|||||||||
|
|||||||||
Re: Page Title in 4.2
OK guys here it is. This mod is for stores that do not use any 3rd party SEO mods and was tested on 4.2.1. I am pretty sure it will work on 4.2 as well. Use it and/or modify it in any way you want to fit your needs, after all it is FREE, just please do not charge other people for it claiming is something you did
1. Backup your store and database first. Better yet try this mod on a test store and make sure it works before applying it to your live store. 2. Adding language variables. You can use myphpadmin or x-cart patch/upgrade section for this, or just add them manually in the language section Code:
3. Adding new fields for category, product, manufacturer and static pages in the corresponding tables. You can use myphpadmin or x-cart patch/upgrade section for this. Code:
4. FOR CATEGORY PAGE TITLE open admin/category_modify.php, find Code:
Code:
open skin1/admin/main/category_modufy.tpl, find Code:
Code:
open include/import_categories.php, find Code:
Code:
in the same include/import_categories.php find Code:
Code:
5. FOR PRODUCT PAGE TITLE open include/product_modify.php and find Code:
Code:
open skin1/main/product_details.tpl, find Code:
Code:
open include/import_products.php and find Code:
Code:
Continue in the next thread
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#7
|
|||||||||
|
|||||||||
Re: Page Title in 4.2
...... from the previous thread
6. FOR MANUFACTURER PAGE TITLE open modules/Manufacturers/manufacturers.php and find Code:
Code:
Code:
Code:
open skin1/modules/Manufacturers/manufacturers.tpl, find Code:
Code:
7. FOR STATIC PAGE TITLE open admin/pages.php, find Code:
Code:
Code:
Code:
Code:
Code:
Code:
Code:
Code:
Code:
open skin1/admin/main/page_edit.tpl, find Code:
Code:
Continue in the next thread
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#8
|
|||||||||
|
|||||||||
Re: Page Title in 4.2
...... from the previous thread
8. MAKE THE NEW TITLES APPEAR open skin1/customer/service_head.tpl, find Code:
Code:
9. Run cleanup.php That's it. Hope it will work for you. It works for me. I tried to keep it clean and easy to follow. If you have trouble installing it I can do it for you. Enjoy!
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
#9
|
|||||||
|
|||||||
Re: Page Title in 4.2
I am having some problems with the above modifications. I have followed all steps, but now when I want to edit a product it x-cart tells me to fill in all fields. But all are already filled in.
Can anyone tell me what I do wrong?
__________________
X-Cart Gold V4.2 |
|||||||
#10
|
|||||||||
|
|||||||||
Re: Page Title in 4.2
What kind of errors?
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|