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

Upsell (related items) ... thumnails?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-06-2002, 06:43 AM
  Hyperdelicious's Avatar 
Hyperdelicious Hyperdelicious is offline
 

Senior Member
  
Join Date: Sep 2002
Location: In the Middle of Nowhere
Posts: 138
 

Default Upsell (related items) ... thumnails?

===============================================

Thanks to some of the x-ers here I am now able to have the upsell items
display an image instead of a number.... However, that is still not quite
what I looking for... I would like the related items image to be a thumb-
nail of the image as opposed to full size... any ideas???

Here's what I have tried thus far:
adding an {if image_x / image_y} statement and also tried replacing the
image code of the upsell_product.tpl with that of the product_thumbnail.tpl

----------------------------------------------------THANKS FOR THE HELP-------


Hyperdelicious
===============================================
===============================================
Reply With Quote
  #2  
Old 11-06-2002, 09:40 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

have you tried setting an absolute width to the image code ?

This way the width stays constant and the height stays relative.
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 11-06-2002, 10:13 AM
  Hyperdelicious's Avatar 
Hyperdelicious Hyperdelicious is offline
 

Senior Member
  
Join Date: Sep 2002
Location: In the Middle of Nowhere
Posts: 138
 

Default Have not tried that

===============================================

No I have not tried that... How would I set an absolute width?... Would
I be able to set an absolute hieght instead? Please forgive my ignorance.

----------------------------------------------------------------THANKS-----------


Hyperdelicious
===============================================
===============================================
Reply With Quote
  #4  
Old 11-06-2002, 10:19 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

post the bit of code your working on and ill show you
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #5  
Old 11-06-2002, 10:30 AM
  Hyperdelicious's Avatar 
Hyperdelicious Hyperdelicious is offline
 

Senior Member
  
Join Date: Sep 2002
Location: In the Middle of Nowhere
Posts: 138
 

Default

===============================================

Here's the code from related_products.tpl...

Code:
<td width=100%> [img]../image.php?productid={$product_links[cat_num].productid}[/img] <font class=TableCenterSubCategoryListTitleBlue>{ $product_links[cat_num].product|escape}</font> </td>

Now, I have been playing around with the {if $image_x} statements.


-------------------------------------------------------------THANK YOU----------


Hyperdelicious
===============================================
===============================================
Reply With Quote
  #6  
Old 11-06-2002, 10:39 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

Quote:
<td width=100%>

[img]../image.php?productid={$product_links[cat_num].productid}[/img] <font class=TableCenterSubCategoryListTitleBlue>{ $product_links[cat_num].product|escape}</font>

</td>

additions in bold and I removed your if statements

give that a try, its just standard html
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #7  
Old 11-06-2002, 11:05 AM
  Hyperdelicious's Avatar 
Hyperdelicious Hyperdelicious is offline
 

Senior Member
  
Join Date: Sep 2002
Location: In the Middle of Nowhere
Posts: 138
 

Default That will work

===============================================

Thanks shan... It worked!!! embarrased at how simple the
solution was...

However, I really don't care for the image distortion... in the future I
may look into asigning each product two images... one full size and a
thumbnail... in hopes to maintain a consistent image quality.

----------------------------------------------------THANKS AGAIN---------------


Hyperdelicious
===============================================
===============================================
Reply With Quote
  #8  
Old 11-06-2002, 11:44 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

No problems, theres usually an easier way to do everything, its just knowing what it is eh

the idea with the images in xcart is that the standard image should never be any bigger then say 150 pixels as this is essentialy your thumbnail image.

Only have a bigger image when you use detail images.
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #9  
Old 11-07-2002, 05:08 PM
 
successful successful is offline
 

eXpert
  
Join Date: Sep 2002
Location: Brooklyn
Posts: 208
 

Default Re: That will work

Quote:
Originally Posted by Hyperdelicious
===============================================

Thanks shan... It worked!!! embarrased at how simple the
solution was...

However, I really don't care for the image distortion... in the future I
may look into asigning each product two images... one full size and a
thumbnail... in hopes to maintain a consistent image quality.

----------------------------------------------------THANKS AGAIN---------------


Hyperdelicious
===============================================
===============================================

Can I take a peek at your site ? I'd love to see this mod.
__________________
Visit us at http://www.Successfulhosting.com
We\'ll make your web site a success!

Register your own domain name for only $14.99 at http://DiscountDomainRegistry.com
Reply With Quote
  #10  
Old 11-11-2002, 12:16 PM
 
chris chris is offline
 

Senior Member
  
Join Date: Sep 2002
Location: UK
Posts: 145
 

Default Thumbnails, main images and detailed images = poor quality

I wrote earlier about this and to reiterate would state that the way xcart uses the code to redimension the image is not a good idea as either the thumbnail suffers or the larger image does. This is simply because the browser or the code can not employ advanced sampling techniques (bilinear or bicubic resampling) or even better enable the use of 2 separate images - one for the thumbnail and an entirely different image for the main image.

If you look at a lot of the xcarts out there you will find this poor image quality is quite pronounced on a number of the sites.

So I have paid the xcart developers to modify the code so that I can upload separate images for all the categories of images in xcart including:
thumbnails
main images
detailed images
banners
special images which I use to show brands and special offers
icons

ALL IMAGES ARE STORED OUTSIDE THE DATABASE WITH ONLY POINTERS TO THE IMAGES INSIDE THE DATABASE.

There is another real benefit in doing this and that is that the database does not get bloated with unmanageable BLOBS (Binary Large Objects) which produce reams of meaningless hexi text and makes it difficult to edit the database using phpMyAdmin for example.

BUT AND THIS IS IMPORTANT - IF YOU ARE USING A WINDOWS MACHINE FOR DEVELOPMENT YOU WILL FIND THAT WINDOWS WILL SCREW UP SQL DUMPS AS IT WILL INSERT INCORRECT NEW LINES.

INCIDENTALLY AGAIN IF YOU ARE USING A WINDOWS MACHINE YOU MUST MAKE SURE THAT IF YOU FTP ANY TEMPLATES TO YOUR SITE THAT YOU SET YOUR FTP CLIENT FOR BINARY AND NOT ASCII FOR THE .TPL EXTENSION.

Hope all this helps as I have learnt the above the very hard way!!

Chris
__________________
Chris
some carts at v4.4.5 security patched on a hardened managed unix server
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 06:45 PM.

   

 
X-Cart forums © 2001-2020