23Oct/0625
Zen Cart New Product Type Using Ultimate SEO URL Package
This post is to help those who are using Zen Cart and are using new product types with Ultimate SEO URL package installed. There are a couple of things to change in order to make everything work together as it took me a couple of hours to figure out. I hope this will help others save these couple of hours of hair pulling.
Prerequisite:
Zen Cart installed
New product type added
Ultimate SEO URL package installed
Goal:
Have the URLs for the products using the new product type show URLs in this format.
http://www.domain.com/[product name]-p-[product id].html
Changes Required:
NOTE: [handler_name] is the new product type name added.
- File - seo.url.php
Original:
$seo_pages = array(
FILENAME_DEFAULT,
FILENAME_PRODUCT_INFO,
FILENAME_POPUP_IMAGE,
FILENAME_PRODUCT_REVIEWS,
FILENAME_PRODUCT_REVIEWS_INFO,
);Result:
$seo_pages = array(
FILENAME_DEFAULT,
FILENAME_PRODUCT_INFO,
FILENAME_POPUP_IMAGE,
FILENAME_PRODUCT_REVIEWS,
FILENAME_PRODUCT_REVIEWS_INFO,
FILENAME_[handler name]_INFO
); - File - seo.url.php
Original:
$this->reg_anchors = array(
'products_id' => '-p-',
'cPath' => '-c-',
'manufacturers_id' => '-m-',
'pID' => '-pi-',
'products_id_review' => '-pr-',
'products_id_review_info' => '-pri-',Result:
$this->reg_anchors = array(
'products_id' => '-p-',
'cPath' => '-c-',
'manufacturers_id' => '-m-',
'pID' => '-pi-',
'products_id_review' => '-pr-',
'products_id_review_info' => '-pri-',
'[handler name]_id' => '-pji-',
- File - seo.url.php -> function parse_parameters
Find "case 'products_id':"
Within this case statement, add the following.case ($page == FILENAME_[handler name]_INFO):
$url = $this->make_url($page, $this->get_product_name($p2[1]), '[handler_name]_id', $p2[1], '.html', $separator);
break; - File - [webroot]/includes/filenames.php
Add the following definition.define('FILENAME_[handler name]_INFO', '[handler name]_info'); - File - [webroot]/.htaccess
Add the following rewrite rule.RewriteRule ^(.*)-pji-(.*).html$ index\.php?main_page=[ handler_name]_info&products_id=$2&%{QUERY_STRING} [L]
July 9th, 2012 - 19:49
We have lately began your weblog, the information any individual supply on this net internet site has helped us tremendously.
July 4th, 2012 - 00:17
Thanks for the information. Most valuable
June 22nd, 2012 - 20:25
I will be back as you revise.
June 11th, 2012 - 13:18
Thanks for excellent submit, My partner and i in no way notice exceptional internet site such as this, I am going to assessment after.
May 15th, 2012 - 04:22
Numerous cheers ! Hello there Writer! I located your internet site employing Yahoo so when search engines optimizer
July 26th, 2011 - 11:59
very useful,my site is valid now
July 26th, 2011 - 06:50
Great writeup – that’s really helped me out on a client website today!
November 16th, 2010 - 14:54
Hi All,
I had used Ultimate SEO v2.100 URL in my site. While checking my site in xenu link check tool. All the .html link are reported has 404 page not found error. But all the .html file are working fine in the browser. Do you have any idea on this.
Thanks
Immanuel
November 16th, 2010 - 14:53
Hi All,
I had used Ultimate SEO URL v2.100 in my site. While checking my site in xenu link checker tool. All the .html link are reported has “404 page not found” error. But all the .html file are working fine in the browser. Do you have any idea on this.
Thanks
Immanuel
September 4th, 2009 - 02:17
thanks for this, been doing my head in, finally got it sorted, cheers
September 3rd, 2009 - 05:01
thanks for this, very helpful, worked out our site now, cheers!
February 2nd, 2009 - 17:15
To have directory structure urls, as well as the ability to support multi languages and product types, you can check http://simple-seo-url.com/ which is free as well.
November 24th, 2008 - 10:44
Thank you! It works on my site..
November 4th, 2008 - 08:10
I’ve solved the problem now
Thanks for the trick, work perfectly!
November 4th, 2008 - 07:44
I have tried to get it working with document type, but fail.
Should the handler name be document_general?
using zencart 1.3.8 with latest ultimate seo
June 16th, 2008 - 11:59
Sure. You just have to add a category called “personalized chocolate” then add “chocolate bars” as a product under that.
April 3rd, 2008 - 11:29
Is it possible to structure URLS like directories?:
http://www.keepitpersonal.co.uk/personalised-chocolate/chocolate-bars-c-65_66.html
instead of:
http://www.keepitpersonal.co.uk/personalised-chocolate-chocolate-bars-c-65_66.html
October 24th, 2007 - 12:35
Yes, where ever you see [handler_name], you need to replace it with your new product type name.
October 24th, 2007 - 12:01
I’m getting a error in the browser when I try to enable Ultimate SEO
Parse error: parse error
Any ideas? Should I have a value instead of ‘handler name’ ?
October 4th, 2007 - 11:00
I am using Zencart v 1.3.5 and Ultimate Seo URL v 2.103.
October 4th, 2007 - 05:38
Which version of Ultimate Seo URL did you run on?
October 4th, 2007 - 00:17
No, I am using PayPal with ZenCart using this mod. I don’t remember having to do anything special to make it work.
October 2nd, 2007 - 20:43
is there a problem using PayPal with this mod?
January 15th, 2007 - 19:23
np. I’m glad it helped someone.
December 28th, 2006 - 13:11
Very nice, this is just what I needed. Thanks for the post!