Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Set path for existing small image and path for existing large image in product?

Set path for existing small image and path for existing large image in product?

Views: 1,426

Results 1 to 7 of 7
8 Dec 2014, 2:21 PM
#1
njlech avatar

njlech

New Zenner

Join Date:
Dec 2014
Posts:
9
Plugin Contributions:
0

Set path for existing small image and path for existing large image in product?

Is there a way to specify a URL path for a small image as well as a large image in product configuration? I don't want to upload a small and large image for each product, since I already have them uploaded in different folders. All I need is to specify a path for each, but I don't see a way to do that in product configuration. I have the small image configured with a path in the product already, but I want the "larger image" link to pull up an image where the large image already exists in a different path. Any suggestions please?? If there is no workaround, is there a plugin that can do something similar to this?

10 Dec 2014, 6:06 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Set path for existing small image and path for existing large image in product?

Any "workaround" to the stock small/medium/large image handling would mean significantly rejiggering how the image system works. I presume your large images are named with some system (or lack thereof) that is not a simple suffix to the small image name?

10 Dec 2014, 6:20 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Set path for existing small image and path for existing large image in product?

I would suggest looking into Image Handler v4 (IH4) as well as reading some of the FAQs and wikis on images to gain a better understanding of how it all fits together and the expectations/requirements of the underlying system.

11 Dec 2014, 2:28 AM
#4
njlech avatar

njlech

New Zenner

Join Date:
Dec 2014
Posts:
9
Plugin Contributions:
0

Re: Set path for existing small image and path for existing large image in product?

gjh42:

Any "workaround" to the stock small/medium/large image handling would mean significantly rejiggering how the image system works. I presume your large images are named with some system (or lack thereof) that is not a simple suffix to the small image name?

Thanks for the response and the additional question. Yes, my large files are named in a system that I devised a while ago. It follows a certain convention. The small image is in the folder ../accounts/[customername]/[sessiondate]/thumbs/[imagenumber].jpg, and the large image is in the folder ../accounts/[customername]/[sessiondate]/images/[imagenumber].jpg.

The small image (thumbnail) is 150px wide, and the large image is 467px wide. I am a photographer, and I use my site for customer proofs. I need to let the customer see a large version of the image before they add to cart, so they can make any comments about cropping, color, touch ups, etc. I have about 100 images, give or take, for each customer, so it would take a significant amount of space to upload additional large images for everything, according to the Zen Cart convention, when I already have them uploaded in a separate existing folder.

The only other thing I can think of is to add a fancybox script to the product description that shows a "View larger" link, and when clicked pulls up the image in the relative URL path. But I would have to add that into the product description for each product, or insert it into each line of my import CSV before uploading a batch of products with Easy Populate.

11 Dec 2014, 3:54 AM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Set path for existing small image and path for existing large image in product?

njlech:

Thanks for the response and the additional question. Yes, my large files are named in a system that I devised a while ago. It follows a certain convention. The small image is in the folder ../accounts/[customername]/[sessiondate]/thumbs/[imagenumber].jpg, and the large image is in the folder ../accounts/[customername]/[sessiondate]/images/[imagenumber].jpg.

The small image (thumbnail) is 150px wide, and the large image is 467px wide. I am a photographer, and I use my site for customer proofs. I need to let the customer see a large version of the image before they add to cart, so they can make any comments about cropping, color, touch ups, etc. I have about 100 images, give or take, for each customer, so it would take a significant amount of space to upload additional large images for everything, according to the Zen Cart convention, when I already have them uploaded in a separate existing folder.

The only other thing I can think of is to add a fancybox script to the product description that shows a "View larger" link, and when clicked pulls up the image in the relative URL path. But I would have to add that into the product description for each product, or insert it into each line of my import CSV before uploading a batch of products with Easy Populate.

So, sounds like you upload two copies of each file presumably after it has been manually resized to your desired size. Meanwhile, you could relatively keep at least your naming convention, but upload one version of your file that is automatically resized for your customer to see smaller versions of your larger photo with minimal loss. If the small image must be different than the larger image (different image view) it too can be uploaded. Yes, it's different than your existing method and would not be of your own creation, but in the end what is it that you need to make money? Something that is quick, accurate, and provides quality product, or something that takes extra time away from your real work, worrying about file storage on the server instead of what it will take to present quality product to your customer.

Sorry to take such a hardline, but I don't see the value in the reasons not to follow some of the above suggestions. There's no reason to cause yourself to perform extra work when there is something that will accomplish the same task at no extra work on your part.

11 Dec 2014, 3:40 PM
#6
njlech avatar

njlech

New Zenner

Join Date:
Dec 2014
Posts:
9
Plugin Contributions:
0

Re: Set path for existing small image and path for existing large image in product?

mc12345678:

So, sounds like you upload two copies of each file presumably after it has been manually resized to your desired size. Meanwhile, you could relatively keep at least your naming convention, but upload one version of your file that is automatically resized for your customer to see smaller versions of your larger photo with minimal loss. If the small image must be different than the larger image (different image view) it too can be uploaded. Yes, it's different than your existing method and would not be of your own creation, but in the end what is it that you need to make money? Something that is quick, accurate, and provides quality product, or something that takes extra time away from your real work, worrying about file storage on the server instead of what it will take to present quality product to your customer.

Sorry to take such a hardline, but I don't see the value in the reasons not to follow some of the above suggestions. There's no reason to cause yourself to perform extra work when there is something that will accomplish the same task at no extra work on your part.

No apology necessary. Not a hard line at all. When you put it into perspective, it makes sense. I've just been doing it a certain way for so long, it is sometimes difficult to change the method, unless I can see the true benefit of doing it a different way. It is worth taking a look at Image Handler 4 if it will make my life easier in the long run. You are right, I should be concerned with getting the products listed as fast as possible with the same or better image quality, so that I don't waste time. Thank you!

12 Dec 2014, 2:11 AM
#7
gjh42 avatar

gjh42

Black Belt

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

Re: Set path for existing small image and path for existing large image in product?

Since you already have your large images using the same filename as the small images, it should be a relatively simple matter to bulk rename them by adding _LRG or whatever you want to set as the suffix to each large image name. They can be moved in bulk if necessary to the correct folderpath for standard image handling.