X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   create thumbs from large image (https://forum.x-cart.com/showthread.php?t=24233)

mrkenzie 11-10-2006 12:15 PM

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.

Impact_1 11-11-2006 09:30 AM

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

mrkenzie 11-11-2006 10:14 AM

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.

Impact_1 11-11-2006 10:22 AM

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

mrkenzie 11-11-2006 12:26 PM

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.

Impact_1 11-12-2006 10:52 AM

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.

laffe 11-13-2006 04:12 AM

Re: create thumbs from large image
 
Does this work for version 4.0.18?

Leif-Harald

mrkenzie 11-13-2006 04:52 AM

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.

SMDStudios 11-28-2006 12:10 PM

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";


mrkenzie 11-28-2006 01:03 PM

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).


All times are GMT -8. The time now is 11:45 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.