Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

change image size on wishlist?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-28-2006, 06:47 AM
 
Amy Amy is offline
 

Senior Member
  
Join Date: Feb 2004
Posts: 147
 

Default 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!
__________________
X-Cart Pro 4.0.19; Unix

Other:
XAOM
XOffers
XGift Reg

Other Mods:
Customers Who Also Bought, Download Link Regenerate, Easy Checkout, Newest Products, SEO/CDSEO, Marketing Manager Pro, View Wishlist for Providers (custom by xcart), Email New Releases (a fav!), Telefirma's Dynamic Image Generator, Download Links on Invoice
Reply With Quote
  #2  
Old 07-28-2006, 07:08 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 07-28-2006, 08:50 AM
 
Amy Amy is offline
 

Senior Member
  
Join Date: Feb 2004
Posts: 147
 

Default

THANKS! That did it!
__________________
X-Cart Pro 4.0.19; Unix

Other:
XAOM
XOffers
XGift Reg

Other Mods:
Customers Who Also Bought, Download Link Regenerate, Easy Checkout, Newest Products, SEO/CDSEO, Marketing Manager Pro, View Wishlist for Providers (custom by xcart), Email New Releases (a fav!), Telefirma's Dynamic Image Generator, Download Links on Invoice
Reply With Quote
  #4  
Old 04-09-2007, 10:12 PM
 
fazzbech fazzbech is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 52
 

Default 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:
var="imageid" value=$wl_products[product].productid}{/if}{include file="product_thumbnail.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>&nbsp;
__________________
Fayette

X-Cart Pro v4.1.6
Reply With Quote
  #5  
Old 10-23-2007, 05:09 PM
 
brocillator brocillator is offline
 

Newbie
  
Join Date: Sep 2007
Location: Florida, USA
Posts: 8
 

Default 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?
__________________
X-Cart Gold 4.1.8
AOM 4.1.8
Apache 1.3.37 (Unix)
OS Linux
PHP 5.2.3
SQL 5.0.45
Reply With Quote
  #6  
Old 03-04-2008, 10:57 AM
 
billc billc is offline
 

Newbie
  
Join Date: Feb 2008
Posts: 1
 

Default 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
__________________
ver 4.1.9
Reply With Quote
  #7  
Old 03-04-2008, 11:56 AM
 
brocillator brocillator is offline
 

Newbie
  
Join Date: Sep 2007
Location: Florida, USA
Posts: 8
 

Default 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}&amp;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>&nbsp;

change to:

<a href="product.php?productid={$wl_products[product].productid}&amp;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"}&amp;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.
__________________
X-Cart Gold 4.1.8
AOM 4.1.8
Apache 1.3.37 (Unix)
OS Linux
PHP 5.2.3
SQL 5.0.45
Reply With Quote
  #8  
Old 05-22-2008, 08:19 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default 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}&amp;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>&nbsp;
to
Code:
<a href="product.php?productid={$wl_products[product].productid}&amp;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.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:10 AM.

   

 
X-Cart forums © 2001-2020