Forums / Setting Up Categories, Products, Attributes / product ID/SKU and picture naming

product ID/SKU and picture naming

Views: 2,944

Results 1 to 10 of 10
5 Mar 2010, 1:39 AM
#1
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

product ID/SKU and picture naming

I have a couple of questions:

  1. do products have unique IDs or SKUs, or are they simply identified by their name?

  2. I looked at the FAQ, but couldn't find this: is there a recommended directory/file naming convention for product images? Do people just store them all in a flat directory, or is there some preferred topology here?

If my store gets reasonably large, I can foresee problems with a flat directory. Any organizational tips here would be appreciated.

Thanks.

5 Mar 2010, 1:50 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: product ID/SKU and picture naming

  1. do products have unique IDs or SKUs, or are they simply identified by their name?
    Each product entered is indexed with an ID - such as:
&cPath=50_46&products_id=94

Where cPath =50 is the cat ID and products_id=94 is the product ID

  1. I looked at the FAQ, but couldn't find this: is there a recommended directory/file naming convention for product images? Do people just store them all in a flat directory, or is there some preferred topology here?
    What ever makes you life easier but inside the /images Directory

Zen-Venom Get Bitten

5 Mar 2010, 1:56 AM
#3
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: product ID/SKU and picture naming

Thanks, Kobra. One on hand, I don't want to get the directories too deeply nested, but I've also heard that servers bog down a big when directories get very large.

I suppose it would be way overkill to have a separate subdirectory under /images for each product?

Would it be a bad idea to name the product pics after the product ID?

What about naming pics of different sizes for the same products? Is there a convention for this?

Thanks.

5 Mar 2010, 2:15 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: product ID/SKU and picture naming

I suppose it would be way overkill to have a separate subdirectory under /images for each product?
Yes overkill - - maybe by category???

Would it be a bad idea to name the product pics after the product ID?
If you can keep track that way - If you have model ID's that may be easier, at least for me
What about naming pics of different sizes for the same products? Is there a convention for this?
There is but if you intend on having as any as you elude to I suggest you use the 3rd party module ImageHandler2
Then you only upload your large size image - optimized for the web it takes care of smaller sizes

I only use the builtin schema for small, medium, and large where a site might want to have a different view at one or many sizes
Additional images is actually better for most
Image name is the key and not the actual image

https://www.zen-cart.com/tutorials/index.php?article=224

Zen-Venom Get Bitten

5 Mar 2010, 7:01 PM
#5
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: product ID/SKU and picture naming

So, if I understand you (and the readme for Image Handler 2), if I use IH2, I can get around all the hassle of multiple sizes of the same image? That sounds worthwhile.

Regarding model ID: there isn't much of anything in the tutorials/FAQ section about this. Do I assume correctly that this is just a field in the products record? Is there a way to get ZC to automatically assign a unique model ID to products I add?

5 Mar 2010, 10:09 PM
#6
gjh42 avatar

gjh42

Black Belt

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

Re: product ID/SKU and picture naming

It already does that with product id; it would be redundant to have auto indexing model numbers as well. That field should be something that is meaningful to you if you are going to use it at all.

5 Mar 2010, 10:21 PM
#7
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: product ID/SKU and picture naming

gjh42:

It already does that with product id; it would be redundant to have auto indexing model numbers as well. That field should be something that is meaningful to you if you are going to use it at all.

I'm not at all sure I need to use the model ID. I'm just trying to come up with some naming scheme for my image files. Using the product ID might be OK, but I'll have to know what number ZC is going to assign in order to rename my pics before upload. Not sure how I'll go about that.

What do most people do for an image naming convention?

5 Mar 2010, 10:40 PM
#8
gjh42 avatar

gjh42

Black Belt

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

Re: product ID/SKU and picture naming

If you will have enough products that a version of the product name would be cumbersome as the image name, then you would probably be well served by developing a model number/name system to apply to products. If you can keep track of your products just by name, you can probably do the same with their images.
The medium, large and additional images all have strict name suffix conventions, so there should be no confusion there.

Do be sure that no image filename is completely contained inside another product's image name (like red_ball.jpg and red_ball_with_spots.jpg).

5 Mar 2010, 10:45 PM
#9
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: product ID/SKU and picture naming

gjh42:

If you will have enough products that a version of the product name would be cumbersome as the image name, then you would probably be well served by developing a model number/name system to apply to products. If you can keep track of your products just by name, you can probably do the same with their images.
The medium, large and additional images all have strict name suffix conventions, so there should be no confusion there.

I'm using IH2, so no worries on the sizes. Not sure how IH2 handles additional images; I'll worry about that later.

Do be sure that no image filename is completely contained inside another product's image name (like red_ball.jpg and red_ball_with_spots.jpg).

A-ha. A very good reason to use a numeric naming system, no?

5 Mar 2010, 11:00 PM
#10
gjh42 avatar

gjh42

Black Belt

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

Re: product ID/SKU and picture naming

Potentially so. If you do that, you need to pack the name with leading zeros so you don't get 12.jpg and 120.jpg.
(Use 012.jpg and 120.jpg.)