Tech Blog Using technology to help your business

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.

  1. 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
    );
  2. 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-',

  3. 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;
  4. File - [webroot]/includes/filenames.php
    Add the following definition.define('FILENAME_[handler name]_INFO', '[handler name]_info');
  5. File - [webroot]/.htaccess
    Add the following rewrite rule.RewriteRule ^(.*)-pji-(.*).html$ index\.php?main_page=[
    handler_name]_info&products_id=$2&%{QUERY_STRING} [L]
Comments (25) Trackbacks (0)
  1. We have lately began your weblog, the information any individual supply on this net internet site has helped us tremendously.

  2. Thanks for the information. Most valuable

  3. I will be back as you revise.

  4. Thanks for excellent submit, My partner and i in no way notice exceptional internet site such as this, I am going to assessment after.

  5. Numerous cheers ! Hello there Writer! I located your internet site employing Yahoo so when search engines optimizer

  6. very useful,my site is valid now

  7. Great writeup – that’s really helped me out on a client website today!

  8. 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

  9. 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

  10. thanks for this, been doing my head in, finally got it sorted, cheers

  11. thanks for this, very helpful, worked out our site now, cheers!

  12. 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.

  13. Thank you! It works on my site..

  14. I’ve solved the problem now
    Thanks for the trick, work perfectly!

  15. 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

  16. Sure. You just have to add a category called “personalized chocolate” then add “chocolate bars” as a product under that.

  17. Yes, where ever you see [handler_name], you need to replace it with your new product type name.

  18. 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’ ?

  19. I am using Zencart v 1.3.5 and Ultimate Seo URL v 2.103.

  20. Which version of Ultimate Seo URL did you run on?

  21. No, I am using PayPal with ZenCart using this mod. I don’t remember having to do anything special to make it work.

  22. is there a problem using PayPal with this mod?

  23. np. I’m glad it helped someone.

  24. Very nice, this is just what I needed. Thanks for the post!


Leave a comment

No trackbacks yet.

Plugin from the creators of Brindes :: More at Plulz Wordpress Plugins