Totally Zenned
- Join Date:
- Apr 2005
- Location:
- Houston, TX
- Posts:
- 1,356
- Plugin Contributions:
- 1
Chemo's Ultimate URL's
Ok, I just added a new product type and this is how I did it (product type is gemring)
Go to the file: includes/classes/seo.url.php
Find this section:
$seo_pages = array(
FILENAME_DEFAULT,
FILENAME_PRODUCT_INFO,
FILENAME_POPUP_IMAGE,
FILENAME_PRODUCT_REVIEWS,
FILENAME_PRODUCT_REVIEWS_INFO,
);
Add in your product type like this (this is mine: gemring):
$seo_pages = array(
'product_gemring_info',
FILENAME_DEFAULT,
FILENAME_PRODUCT_INFO,
FILENAME_POPUP_IMAGE,
FILENAME_PRODUCT_REVIEWS,
FILENAME_PRODUCT_REVIEWS_INFO,
);
Find this section:
'products_id_review_info' => '-pri-',
'products_id_review' => '-pr-',
'products_id_review_info' => '-pri-',
'products_id_review' => '-pr-',
'products_id_review_info' => '-pri-',
Add your product type:
'products_id_review_info' => '-pri-',
'products_id_review' => '-pr-',
'products_id_review_info' => '-pri-',
'products_id_review' => '-pr-',
'products_id_review_info' => '-pri-',
'products_gemring_info' => '-pgr-',
Notice that I added a new suffix - pgr (product gem ring), you can choose what you want. Notice that there is an 's' at the end of product.
Find this section:
case ($page == FILENAME_PRODUCT_REVIEWS_INFO):
$url = $this->make_url($page, $this->get_product_name($p2[1]), 'products_id_review_info', $p2[1], '.html', $separator);
break;
Add your product type below like this:
case ($page == FILENAME_PRODUCT_REVIEWS_INFO):
$url = $this->make_url($page, $this->get_product_name($p2[1]), 'products_id_review_info', $p2[1], '.html', $separator);
break;
case ($page == 'product_gemring_info'):
$url = $this->make_url($page, $this->get_product_name($p2[1]), 'products_gemring_info', $p2[1], '.html', $separator);
break;
Now go the htaccess and find this section:
RewriteRule ^(.*)-pr-([0-9]+).html$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
Add your code on the line below this:
RewriteRule ^(.*)-pgr-([0-9]+).html$ index\.php?main_page=product_gemring_info&products_id=$2&%{QUERY_STRING} [L]
There you go! Just substitute the name of your product type and the correct suffix.
Here is the end product of mine:
http://www.moissaniteco.com/7x5mm-octagonal-cultured-gemstone-moissanite-ring-14k-wy-pgr-3131.html