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

create thumbs from large image

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 11-10-2006, 12:15 PM
 
mrkenzie mrkenzie is offline
 

Senior Member
  
Join Date: May 2006
Posts: 182
 

Default Re: create thumbs from large image

Sorry, I did not realize until now you are on 4.0.18. The mod was done on 4.1.x.

I have not done anything on 4.0.x. Sorry.
__________________
Mike Kenzie
X Cart Gold Ver. 4.1.3
X-RMA
X-AOM
X-Product Comparison
Reply With Quote
  #22  
Old 11-11-2006, 09:30 AM
 
Impact_1 Impact_1 is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 88
 

Default Re: create thumbs from large image

I get this error in 4.1.3 and no images show up either in the products list or the product details pages The links are there but no images.

Warning: imagejpeg() [function.imagejpeg]: Unable to open 'images/cache/573bdf0aec6ca29dfe28a0c511966179.jpg' for writing in /hsphere/local/home/impacts/impact-styling.com/newcart/Smarty-2.6.12/plugins/function.thumb.php on line 395

Any help?

See example here:

http://www.impact-styling.com/newcart/product.php?productid=176&cat=59&page=1
__________________
Version: 4.1.3

One of the largest UK Suppliers of Car Modification Accessories
http://www.impact-styling.com
Reply With Quote
  #23  
Old 11-11-2006, 10:14 AM
 
mrkenzie mrkenzie is offline
 

Senior Member
  
Join Date: May 2006
Posts: 182
 

Default Re: create thumbs from large image

Make sure the images/cache folder has write permission to it. That is where all of the generated images will be kept.
__________________
Mike Kenzie
X Cart Gold Ver. 4.1.3
X-RMA
X-AOM
X-Product Comparison
Reply With Quote
  #24  
Old 11-11-2006, 10:22 AM
 
Impact_1 Impact_1 is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 88
 

Default Re: create thumbs from large image

Thank you for replying.

I created a "cache" folder and now it works

Thanks a lot for that, but now the thumbnails are far too small, what could be causing this?

Example: http://www.impact-styling.com/newcart/product.php?productid=176&cat=59&page=1
__________________
Version: 4.1.3

One of the largest UK Suppliers of Car Modification Accessories
http://www.impact-styling.com
Reply With Quote
  #25  
Old 11-11-2006, 12:26 PM
 
mrkenzie mrkenzie is offline
 

Senior Member
  
Join Date: May 2006
Posts: 182
 

Default Re: create thumbs from large image

Look for this line of code:

Code:
{include file="product_thumbnail.tpl" productid=$recommends[num].productid image_x=$recommends[num].image_x image_y=$recommends[num].image_y product=$recommends[num].product tmbn_url=$recommends[num].tmbn_url id="product_thumbnail" tmbn_path_p=$recommends[num].p_image_path tmbn_link="false" tmbn_width="100"}

which is probably in the product.tpl file and the last part - tmbn_width="100" just change the 100 to whatever you want the width to be.
__________________
Mike Kenzie
X Cart Gold Ver. 4.1.3
X-RMA
X-AOM
X-Product Comparison
Reply With Quote
  #26  
Old 11-12-2006, 10:52 AM
 
Impact_1 Impact_1 is offline
 

Advanced Member
  
Join Date: Jan 2005
Posts: 88
 

Default Re: create thumbs from large image

Yea I had a play around with that code later on, but what I want to do is have it 2 x the thumbnail width. I know the code for half size is x/2, what is the code for double size. I want this because many of my images will be out of proportion if I give them all the same sizes, but if I can double the thumbnail size, that would be perfect.
__________________
Version: 4.1.3

One of the largest UK Suppliers of Car Modification Accessories
http://www.impact-styling.com
Reply With Quote
  #27  
Old 11-13-2006, 04:12 AM
 
laffe laffe is offline
 

Advanced Member
  
Join Date: Apr 2006
Posts: 46
 

Default Re: create thumbs from large image

Does this work for version 4.0.18?

Leif-Harald
__________________
sybo.no. your norwegian poker supplier

X-cart version 4.0.18
Reply With Quote
  #28  
Old 11-13-2006, 04:52 AM
 
mrkenzie mrkenzie is offline
 

Senior Member
  
Join Date: May 2006
Posts: 182
 

Default Re: create thumbs from large image

Not that I am aware of. I did this on 4.1.x and I think there are a lot of differences.
__________________
Mike Kenzie
X Cart Gold Ver. 4.1.3
X-RMA
X-AOM
X-Product Comparison
Reply With Quote
  #29  
Old 11-28-2006, 12:10 PM
 
SMDStudios SMDStudios is offline
 

eXpert
  
Join Date: Dec 2003
Location: Orlando, FL
Posts: 207
 

Default Re: create thumbs from large image

I've updated my file with the below code and the No img available icon is still coming up on my category list.

Quote:
Originally Posted by mrkenzie
This:
Code:
$fields[] = "$sql_tbl[images_P].image_path as ";

should be:
Code:
$fields[] = "$sql_tbl[images_P].image_path as p_image_path";
__________________
X-Cart Gold various versions
Tahoe Web Design

WebsiteCM.com - We recommend WebsiteCM
Reply With Quote
  #30  
Old 11-28-2006, 01:03 PM
 
mrkenzie mrkenzie is offline
 

Senior Member
  
Join Date: May 2006
Posts: 182
 

Default Re: create thumbs from large image

If you are using 4.0.x, it probably won't work. This was developed on 4.1.x.

If you are using 4.1.x, then make sure you have an image for the product (not thumbnail and not detailed).
__________________
Mike Kenzie
X Cart Gold Ver. 4.1.3
X-RMA
X-AOM
X-Product Comparison
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 05:49 AM.

   

 
X-Cart forums © 2001-2020