Re: AJAX IMAGE Swapper support thread
Quote:
Originally Posted by
dscott1966
Sorry took so long to get back with you but i just tested what you said. What i did was got the correct image size that i would have needed which was W:160 H:213 and resized the image to that then replaced it like you said and it worked out correctly, just like you said it would. Now with that in mind would i have to do it like that all the time? or when i upload it the images using AIS would they resize automatically?
Cna be seen here:
http://dealz-r-us.com/index.php?main...dex&cPath=2_24
It does work in firefox but I just looked in IE7 and the browser isn't resizing it on the product info page like we'd like. The route I'm thinking now is since you'd essentially like to display your medium product image on the product listing maybe there's a way we can ask for that image instead of the thumbnail, which is what zen cart stores as a products main image. Unfortunately the way they store it makes it hard since it uses php to append the _MED suffix when needed instead of a db value that would make it a piece of cake.
If you know a good thread to ask how to get the product_listing.php page to display the medium image instead of a thumbnail I'd try that. I'll keep thinking of a fix in the mean time.
Re: AJAX IMAGE Swapper support thread
Quote:
Originally Posted by
greydawgjr
It does work in firefox but I just looked in IE7 and the browser isn't resizing it on the product info page like we'd like. The route I'm thinking now is since you'd essentially like to display your medium product image on the product listing maybe there's a way we can ask for that image instead of the thumbnail, which is what zen cart stores as a products main image. Unfortunately the way they store it makes it hard since it uses php to append the _MED suffix when needed instead of a db value that would make it a piece of cake.
If you know a good thread to ask how to get the product_listing.php page to display the medium image instead of a thumbnail I'd try that. I'll keep thinking of a fix in the mean time.
ok i will try that and see if i can get an answer that way. Thanks for all your help.
Re: AJAX IMAGE Swapper support thread
GREYDAWGJR,
If i modify this section of
/includes/modules/your_template/product_listing.php:
case 'PRODUCT_LIST_IMAGE':
$lc_align = 'center';
if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
$lc_text = '';
} else {
if (isset($_GET['manufacturers_id'])) {
$lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';
} else {
$lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>';
}
}
break;
This part of the file:
zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"')
which i think displays the image, and take $listing->fields['products_image'] and make it point to the medium image filename. Would this work? If so how would i code this to make it work? this points to the product listing image.
Re: AJAX IMAGE Swapper support thread
Hey, is there any way to adjust the quality of the images created by Ajax Image Swapper? I've had a number of people point out the quality problems, here's a product I just added which has this problem:
http://www.chuckwa.com/store/index.p...products_id=65
If you look at the default images shown, they all have very noticeable banding and some blockyness.
For instance, here's the image show by default:
Default Image
Here's the original image, which is displayed when you click on the above:
Original/Large Image
Notice the image is nice and sharp with no real banding.
My guess is that the compression settings are set to high. I don't mind larger file sizes if I get better quality. My products are art toys, and its the pictures that sell them.
Re: AJAX IMAGE Swapper support thread
Quote:
Originally Posted by
Chuckwa
Hey, is there any way to adjust the quality of the images created by Ajax Image Swapper? I've had a number of people point out the quality problems, here's a product I just added which has this problem:
http://www.chuckwa.com/store/index.p...products_id=65
If you look at the default images shown, they all have very noticeable banding and some blockyness.
For instance, here's the image show by default:
Default Image
Here's the original image, which is displayed when you click on the above:
Original/Large Image
Notice the image is nice and sharp with no real banding.
My guess is that the compression settings are set to high. I don't mind larger file sizes if I get better quality. My products are art toys, and its the pictures that sell them.
Look at post #381 that will help with your image problem.
Re: AJAX IMAGE Swapper support thread
Quote:
Originally Posted by
Chuckwa
Hey, is there any way to adjust the quality of the images created by Ajax Image Swapper? I've had a number of people point out the quality problems, here's a product I just added which has this problem:
http://www.chuckwa.com/store/index.p...products_id=65
If you look at the default images shown, they all have very noticeable banding and some blockyness.
For instance, here's the image show by default:
Default Image
Here's the original image, which is displayed when you click on the above:
Original/Large Image
Notice the image is nice and sharp with no real banding.
My guess is that the compression settings are set to high. I don't mind larger file sizes if I get better quality. My products are art toys, and its the pictures that sell them.
Actually grab the file in post #387 since your images are in portrait form. The file in 387 includes a previous bug fix to the portrait aspect ratio calculation...
Re: AJAX IMAGE Swapper support thread
Quote:
Originally Posted by
greydawgjr
Actually grab the file in post #387 since your images are in portrait form. The file in 387 includes a previous bug fix to the portrait aspect ratio calculation...
Ok, that seems to have helped a lot. What variables in the PHP would I need to change if I wanted to tweak the .jpg compression levels? I think this should (ATTN: Jaycode) be added to the admin interface.
Another question I asked before, but never got an answer. How do I change the order in which the images are displayed? It just seems random. Neither the order in which they are uploaded, "sort order", file name, or title seem to affect the order.
*Most* of the time it seems to be order uploaded, but not always. Sometimes the 3rd or 4th image uploaded will randomly get chosen as the first image and there's nothing I can do to fix it.
Re: AJAX IMAGE Swapper support thread
Quote:
Originally Posted by
Chuckwa
Ok, that seems to have helped a lot. What variables in the PHP would I need to change if I wanted to tweak the .jpg compression levels? I think this should (ATTN: Jaycode) be added to the admin interface.
Another question I asked before, but never got an answer. How do I change the order in which the images are displayed? It just seems random. Neither the order in which they are uploaded, "sort order", file name, or title seem to affect the order.
*Most* of the time it seems to be order uploaded, but not always. Sometimes the 3rd or 4th image uploaded will randomly get chosen as the first image and there's nothing I can do to fix it.
If you rely on php to resize/resample images it's pretty much a tossup between the GD library or the imagemagic library. AIS is using the GD library and I simply changed the method using imagecreatetruecolor instead of what it was before. I don't remember if there was a way to specify the compression level but I don't think so. If your server has imagemagic installed on it then there may be other options but I don't know. If you've seen this feature in other modules let me know because I'm interested in it :D
As far as image order:
Zen cart has a few simple rules on how it handles the order in which images are displayed. Forget everything in the Image Swapper here because Zen cart itself is making the decision on sort order.
The primary thing you need to know is that all images associated with a product need to have a consistent naming scheme. That name can be whatever you like but a good rule of thumb is to make it descriptive.
The second thing you need to know is that zen cart is going to display this group of images alphabetically with a few rules. Subsequent images will have the consistent name that you’ve chosen, followed by an underscore and a suffix. The image you want to display first will have the shortest name and no underscoring.
All groups of images will look something like this if their file names were listed in a spread sheet:
basename (this image will display first, and only images associated with that product should have this base)
basename_suffixone
basename_suffixtwo
basename_suffixthree
Zen cart is going to alphabetize the suffix names and line them up in the thumbnails. These 4 images will display in the following order:
basename
basename_suffixone
basename_suffixthree
basename_suffixtwo
With a little planning you can give the images names that will get them to display in the exact order you wish. I recommend you get descriptive with the suffixes as well so you know exactly what image is associated with that file name, ie:
pinkblanket
pinkblanket_black
pinkblanket_zoom
If you wanted zoom to come before black you’d have to get a little creative and name it pinkblanket_azoom.
In the Image Swapper you can leave all the sort orders at 0. These images will naturally sort because of their names.
A couple tips:
- No pronunciation in your image names.
- Use numbers or don’t use numbers. If you use it on one use it on all, ie, pinkblanket_1, pinkblanket_2, etc. These will sort 1, 2, 3
- No spaces in image names BUT do use underscores to separate the base name from its suffix
.
Re: AJAX IMAGE Swapper support thread
Thanks again greydawgjr. That was how I understood things, but I have found that it doesn't always seem to work that way.
Again, see my Munny Zipper Pulls.
You'll see the images are sorted:
munnyzip-4
munnyzip-3
munnyzip-2
munnyzip-1
munnyzip-5
They were uploaded in order from 1-5. Is it the "-" that screws up the sorting?
Re: AJAX IMAGE Swapper support thread
Quote:
Originally Posted by
Chuckwa
Thanks again greydawgjr. That was how I understood things, but I have found that it doesn't always seem to work that way.
Again, see my
Munny Zipper Pulls.
You'll see the images are sorted:
munnyzip-4
munnyzip-3
munnyzip-2
munnyzip-1
munnyzip-5
They were uploaded in order from 1-5. Is it the "-" that screws up the sorting?
I don't think so but possibly... Are all the sort orders set to 0 in the image swapper? I should have mentioned that there is a difference depending on whether or not you have sub directories underneath the images directories. You can read more about it here: https://www.zen-cart.com/tutorials/index.php?article=58 . Specifically, the underscore actually plays a role in the image name if you have sub directories. I don't think it's required if all your images are in the default directory as yours are.
I know what you mean about the randomness of it, I struggled with it all day once, finally I created a subdirectory and it hasn't seemed to be an issue since. (If you do this then underscores are required for proper display order)