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

Limiting the image size in the shopping cart

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-11-2005, 12:50 PM
 
hyratech hyratech is offline
 

Senior Member
  
Join Date: Jul 2005
Posts: 172
 

Default Limiting the image size in the shopping cart

Is there a way to limit the size of the image in the shopping cart?

to avoid errors.. I'm only using 1 Image as both the Main image and thumbnail..

The Product page.. it's the same image but just limited to 80 pixels..

and the detail's picture it's all set to 300 pixels..


Is there a way to do this to the images in the shopping cart also?
__________________
hyratech
X-CART Gold 4.1.10
Hosted - Unix
Reply With Quote
  #2  
Old 11-11-2005, 01:01 PM
 
balinor balinor is offline
 

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

Default

Just edit the x value where the image appears in the code to a specific number, ie in cart.tpl, replace this

Code:
image_x=$products[product].image_x

with this

Code:
image_x=100

replace 100 with whatever number you want. You'll also have to remove the image_y all together so that it doesn't stretch the image.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 11-11-2005, 01:25 PM
 
hyratech hyratech is offline
 

Senior Member
  
Join Date: Jul 2005
Posts: 172
 

Default

is the cart.tpl in customer/main/cart.tpl?
__________________
hyratech
X-CART Gold 4.1.10
Hosted - Unix
Reply With Quote
  #4  
Old 11-11-2005, 01:25 PM
 
balinor balinor is offline
 

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

Default

Yes
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 11-11-2005, 01:32 PM
 
hyratech hyratech is offline
 

Senior Member
  
Join Date: Jul 2005
Posts: 172
 

Default

the image is not in proportion..

the width is 70 now.. but the height is still the original.. and the picture is just stretched....
__________________
hyratech
X-CART Gold 4.1.10
Hosted - Unix
Reply With Quote
  #6  
Old 11-11-2005, 01:35 PM
 
balinor balinor is offline
 

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

Default

Like I said above, you need to remove the y component all together. Just delete this part:

image_y=$products[product].image_y
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 11-11-2005, 01:42 PM
 
hyratech hyratech is offline
 

Senior Member
  
Join Date: Jul 2005
Posts: 172
 

Default

That did the trick.... Thanx a LOT!!! you guys are the best!
__________________
hyratech
X-CART Gold 4.1.10
Hosted - Unix
Reply With Quote
  #8  
Old 01-24-2007, 12:34 PM
 
floydiology floydiology is offline
 

Newbie
  
Join Date: Jan 2007
Posts: 2
 

Default Re: Limiting the image size in the shopping cart

I have tried all these steps here and I still do not see any change. I even deleted the entire line of code and no effect to the site. It appears that it is not using this template? where can I find the proper template to edit. I am editing skin1/customer/main/cart.tpl
Reply With Quote
  #9  
Old 01-30-2007, 07:55 PM
 
LisaB LisaB is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 74
 

Default Re: Limiting the image size in the shopping cart

Hi! Looked for that line in my cart.tpl and couldn't even find it. Would it be different in my version? And can the same be done for the wish list? Thanks!
__________________
XCart Version 4.1.6
PHP 4.4.4
MySQL 4.1.21-standard
Reply With Quote
  #10  
Old 01-30-2007, 09:04 PM
 
LisaB LisaB is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 74
 

Default Re: Limiting the image size in the shopping cart

I found it, and fixed it. Worked for both the cart and the wishlist.
__________________
XCart Version 4.1.6
PHP 4.4.4
MySQL 4.1.21-standard
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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:09 PM.

   

 
X-Cart forums © 2001-2020