• Welcome to KonaKart Community Forum. Please login or sign up.
 

Four images on product detail page - where do they come from?

Started by pmw, May 16, 2011, 05:35:49 pm

Previous topic - Next topic

pmw

Hi, all,

I am using the stock KonaKart 5.2.0.0 codebase. Suppose I create a new product in the admin interface and upload between one to four images:

  • uploaded1.jpg

  • uploaded2.jpg

  • uploaded3.jpg


I see that those images are saved to the configured images directory on the filesystem, with those exact names. I suppose I should expect that.

Then I go to KonaKart's storefront and open the product detail page. The center of the page is empty. I look a the source code and see that it tries to load images:

  • uploaded1_1.jpg

  • uploaded1_2.jpg

  • uploaded1_3.jpg

  • uploaded1_4.jpg



In other words, it ignores the images I uploaded except for the first one, then it takes the filename of the first one and inserts "_#" into the filename, # being 1--4 unconditionally. I know this is a feature because I see the code doing this explicitly, without regard for what images I uploaded.

Was KonaKart supposed to create those "_#" files when the first image was uploaded? Or, was KonaKart supposed to rename the other images I uploaded to match the generated filenames?

Right now the only way I can see to satisfy KonaKart's generated HTML is to manually create those four files and upload them to the images directory.

But that still leaves unanswered: what about images 2--4 that I uploaded? No HTML code references those.

trevor

Most users of KonaKart upload images using tools like FTP, and have a naming convention such as SKU_1.jpg, SKU_2.jpg etc. so that the store front can dynamically pick up the images based on this known naming convention.

In our demo store front we use a widget which requires four large and four small images and we've created a naming convention for that widget.

I suppose the bottom line is that you can do as you please. You could have up to 4 hard coded image names in the image attributes of the product or you can create a naming convention for whatever image widget you decide to use in your store-front application.