![]() |
change image size on wishlist?
How would I go about changing the image size to a set size in the wishlist... right now it's grabbing the FULL-SIZED image that each of our designer's have listed... just want a small version - say 150x150 to show... THANKS!
|
Edit the wishlist template:
modules/Wishlist/wl_products.tpl Replace this: image_x=$wl_products[product].image_x image_y=$wl_products[product].image_y with this: image_x=150 |
THANKS! That did it!
|
Re: change image size on wishlist?
Thanks for the tip Balinor! I just implemented this on our site, but our thumbnails aren't all that size - they are no larger than 150x150, but some of them aren't square, so the mod was stretching them.
I changed the line to this, which uses the thumbnail images - now I am NO coder by any stretch of the imagination, but it seems to have worked ok (I basically changed all pimage to timage)? Code:
|
Re: change image size on wishlist?
I changed 'pimage' to 'timage' and it works (so does changin it to 'tmbn'), but the url source is different, and it has a semi-weird image re-load upon each re-visit.
My regular image url for thumbnails is: mydomain.com/store/images/T/damiana-thumb.jpg And the image url (which loads slower) with the modified code is: mydomain.com/store/image.php?type=T&id=1 What is this doing? Putting it in the database? Is there any detriment to this method? |
Re: change image size on wishlist?
If anyone can figure this out please elt me know as well. I am seeing the same code as brocillator shows - but would like to draw the thumbnail image from the T file folder. like the normal category display page.
-e-train |
Re: change image size on wishlist?
billc, what I ended up doing was this:
Edit skin1/modules/Wishlist/wl_products.tpl Find {section name=product loop=$wl_products} on the page, and below it is: <a href="product.php?productid={$wl_products[product].productid}&quantity={$wl_products[product].amount}"> {if $wl_products[product].is_pimage eq 'W' }{assign var="imageid" value=$wl_products[product].variantid}{else} {assign var="imageid" value=$wl_products[product].productid}{/if} {include file="product_thumbnail.tpl" productid=$imageid image_x=$wl_products[product].pimage_x image_y=$wl_products[product].pimage_y product=$wl_products[product].product tmbn_url=$wl_products[product].pimage_url type=$wl_products[product].is_pimage}</a> change to: <a href="product.php?productid={$wl_products[product].productid}&quantity={$wl_products[product].amount}"> {if $wl_products[product].is_timage eq 'W' }{assign var="imageid" value=$wl_products[product].variantid}{else} {assign var="imageid" value=$wl_products[product].productid}{/if} {include file="product_thumbwish.tpl" productid=$imageid image_x=$wl_products[product].timage_x image_y=$wl_products[product].timage_y product=$wl_products[product].product tmbn_url=$wl_products[product].timage_url type=$wl_products[product].is_timage}</a> Then, I created skin1/product_thumbwish.tpl and put the following code: {* $Id: product_thumbwish.tpl,v 1.19 2005/11/17 06:55:36 max Exp $ *} {if $config.Appearance.show_thumbnails eq "Y"}<img{if $id ne ''} id="{$id}"{/if} class="productthumbwish" src="{if $tmbn_url}{$tmbn_url}{else}{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?type={$type|default:"T"}&id={$produc tid}{/if}"{if $image_x ne 0} width="{$image_x}"{/if}{if $image_y ne 0} height="{$image_y}"{/if} alt="{$product|escape}" />{/if} ------- Note: class="productthumbwish" on skin1/product_thumbwish.tpl is my own CSS stylesheet (I turned my store into table-less CSS layout) - so choose your own style. ------- If you "View Image" of the wishist thumb in your browser, the URL will look like: yourdomain.com/store/image.php?type=T&id=6 Whereas, on the products.tpl generated pages (search results, category thumbs) the URL is yourdomain.com/store/images/T/thumbimage.jpg I don't know what it's doing, or why, but at least there are now actual thumb-size instead of modified full-size on the Wishlist page. :) Simply smashing the size of a full-size image into a 75px space looked terrible on some browsers. |
Re: change image size on wishlist?
For 4.1.8 I just changed it from...
Code:
<a href="product.php?productid={$wl_products[product].productid}&quantity={$wl_products[product].amount}">{if $wl_products[product].is_pimage eq 'W' }{assign var="imageid" value=$wl_products[product].variantid}{else}{assign var="imageid" value=$wl_products[product].productid}{/if}{include file="product_thumbnail.tpl" productid=$imageid image_x=$wl_products[product].pimage_x image_y=$wl_products[product].pimage_y product=$wl_products[product].product tmbn_url=$wl_products[product].pimage_url type=$wl_products[product].is_pimage}</a> Code:
<a href="product.php?productid={$wl_products[product].productid}&quantity={$wl_products[product].amount}">{include file="product_thumbnail.tpl" productid=$wl_products[product].productid image_x=$products[product].tmbn_x|default:$config.Appearance.thumbnail_width image_y=$products[product].tmbn_y product=$products[product].product tmbn_url=$products[product].tmbn_url}</a> Basically I just took the routine from products_t.tpl and changed "$products[product].productid" to "$wl_products[product].productid". It seems to work fine. |
All times are GMT -8. The time now is 02:07 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.