Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Product URL without Product ID?

Product URL without Product ID?

Views: 1,369

Results 1 to 5 of 5
18 Aug 2011, 6:11 PM
#1
yourguide avatar

yourguide

New Zenner

Join Date:
Apr 2010
Posts:
10
Plugin Contributions:
0

Product URL without Product ID?

Heres the scoop... I have a product import that I wrote in PHP that runs daily to import my products from our accounting system.
The problem is I wrote it to just dump the products before it imports the new ones.... so everyday the product ID changes when new products are added. This is a problem because I cant link directly to a product using the Product ID... for like marketing and stuff.

Anyone know if there is a way to link to a product page without using the product ID? I have unique model numbers...
I really dont want to rewrite my import.
Thanks.

19 Aug 2011, 12:34 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Product URL without Product ID?

You need to rewrite your import ... because another side effect of what you've done is that search engines will never have accurate information due to your ever-changing links. Plus you'll eventually needlessly blow out the database with insanely large product ID numbers. Rewrite your import tool to match on model number and update instead of inserting.

8 Sep 2011, 2:32 AM
#3
yourguide avatar

yourguide

New Zenner

Join Date:
Apr 2010
Posts:
10
Plugin Contributions:
0

Re: Product URL without Product ID?

:oops:
Good point on the search engines! Didn't see that one coming.
Though I don't have to worry about the insanely large Product ID's they start from 1 each day.

I just found out where to put code in the includes\modules\pages\product_info\header_php.php to use Model Number in the URL..... but I still have the other issue with the search engines....

I wonder, is there a way to change the product URL that is generated to use &products_model= instead of &products_id= ? in the advanced search results, since my menu is driven by them?
I am not using Categories like a regular zencart store.

Or am I clinging to a faulty design? :)

8 Sep 2011, 6:23 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product URL without Product ID?

It sounds like you will need to rewrite either your import code to update instead of replace, or the core Zen Cart URL generator and everything that uses its output (and then maintain that rewrite through future ZC upgrades). Your choice...

10 Apr 2014, 8:14 PM
#5
osdparts avatar

osdparts

New Zenner

Join Date:
Nov 2012
Posts:
16
Plugin Contributions:
0

Re: Product URL without Product ID?

yourguide:

:oops:
I just found out where to put code in the includes\modules\pages\product_info\header_php.php to use Model Number in the URL..... but I still have the other issue with the search engines....

I wonder, is there a way to change the product URL that is generated to use &products_model= instead of &products_id= ? in the advanced search results, since my menu is driven by them?

I know this is an old thread but applies to what I need to do. When people search for one of my parts by part number on Google, the search isn't doing as well as it could because my products part numbers aren't in my Zen URL. I searched through many posts and this one seemed like the closest to what I need to do. Can someone point me to the info I need for figuring out how to have part numbers included in the URL for my products?