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)
-   -   Easy dynamic thumbnail generation (https://forum.x-cart.com/showthread.php?t=22308)

Cefko 04-20-2007 10:26 AM

Re: Easy dynamic thumbnail generation
 
I got it now

I should use

{thumb file="$tfile" ....

and not

{thumb file="tfile" ...

Damn $$$$$$!!!

ProMuscles 05-08-2007 02:51 AM

Re: Easy dynamic thumbnail generation
 
Cefkl can you post your code

Wambli 05-20-2007 06:57 PM

Re: Easy dynamic thumbnail generation
 
I can't seem to get this to work I get the large image no thum nail this is what it says

[img]images/cache/75f39e7784e8a3ebdcfc27282918244a.jpg[/img]

please help my product.tpl look like this


{* $Id: product_images.tpl,v 1.12 2004/05/28 12:21:05 max Exp $ *}
{if $images ne ""}
{capture name=dialog}
<table width=100%>
<tr>
<td>
<table>
{section name=image loop=$images}
{if $images[image].image_path|replace:'server path to remove':''}
<tr><td>{thumb file=`$images[image].image_path` longside="100" link="false"}</td></tr>


{/if}
{/section}
</table>
</td>
<td>
<img src={$images[0].image_path|replace:'server path to remove':''} name="main_image"/>
</td>
</tr>
</table>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_detailed_images content=$smarty.capture.dialog extra='width="100%"'}
{/if}

What am I doing wronge?

Wambli 05-20-2007 06:58 PM

Re: Easy dynamic thumbnail generation
 
I can't seem to get this to work I get the large image no thum nail this is what it says

[img]images/cache/75f39e7784e8a3ebdcfc27282918244a.jpg[/img]

please help my product.tpl look like this


{* $Id: product_images.tpl,v 1.12 2004/05/28 12:21:05 max Exp $ *}
{if $images ne ""}
{capture name=dialog}
<table width=100%>
<tr>
<td>
<table>
{section name=image loop=$images}
{if $images[image].image_path|replace:'server path to remove':''}
<tr><td>{thumb file=`$images[image].image_path` longside="100" link="false"}</td></tr>


{/if}
{/section}
</table>
</td>
<td>
<img src={$images[0].image_path|replace:'server path to remove':''} name="main_image"/>
</td>
</tr>
</table>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_detailed_images content=$smarty.capture.dialog extra='width="100%"'}
{/if}

Wambli 05-20-2007 07:18 PM

Re: Easy dynamic thumbnail generation
 
so sorry about the double post!! does anyone have this working in 4.1.6 I really like this mod but can't get it to work

JWait 05-21-2007 10:15 AM

Re: Easy dynamic thumbnail generation
 
Wambli

Just a suggestion, but did you replace the parts that say "server path to remove" with the path to your server? It should be something like "home/wambli/public_html/".

Wambli 05-21-2007 04:58 PM

Re: Easy dynamic thumbnail generation
 
Thanks Just wait I changed the path and it still doesn't work does it have something to do with the fact I'm running 4.1.6 I still get this instead of thum nail

[img]images/cache/75f39e7784e8a3ebdcfc27282918244a.jpg[/img]

my code:

{* $Id: product_images.tpl,v 1.12 2004/05/28 12:21:05 max Exp $ *}
{if $images ne ""}
{capture name=dialog}
<table width=100%>
<tr>
<td>
<table>
{section name=image loop=$images}
{if $images[image].image_path|replace:'home/omagruen/public_html/xcart/':''}
<tr><td>{thumb file=`$images[image].image_path` longside="100" link="false"}</td></tr>


{/if}
{/section}
</table>
</td>
<td>
<img src={$images[0].image_path|replace:'home/omagruen/public_html/xcart/':''} name="main_image"/>
</td>
</tr>
</table>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_detailed_images content=$smarty.capture.dialog extra='width="100%"'}
{/if}

I have tired many diffrent paths even hard code still nothing?

JWait 05-22-2007 12:27 PM

Re: Easy dynamic thumbnail generation
 
[img]images/cache/75f39e7784e8a3ebdcfc27282918244a.jpg[/img] ??

It should be "files/cache/75f39e7784e8a3ebdcfc27282918244a.jpg" (the forum screws up the img markers). Did you edit your function.thumb.php to point somewhere else (images)?

Wambli 05-24-2007 06:09 PM

Re: Easy dynamic thumbnail generation
 
Jwait,
nope I didn't change the function.thumb.php ? I weird thing is that is finds the detailed image and displays it,but it will not display the thumbnail?

JWait 05-25-2007 05:47 AM

Re: Easy dynamic thumbnail generation
 
2 Attachment(s)
My bad.. I changed my function.thumb.php :)

In function.thumb.php, mine says..
if (empty($params['cache'])) $_CONFIG['cache'] = 'files/cache/';

What does yours say?

Also, the detailed image is probably where it is supposed to be (where you told X-cart to put it) so that isn't a problem.

I have uploaded my product_images.tpl (actually mod_product_images.tpl) so you can check it against what you have. It is kind of unique but you should be able to compare it to what you have (or simply "call" it by replacing your "include") to check your setup. It goes in skin1/modules/Detailed_Product_Images. I've also included blank_dialog.tpl which is pretty self-explained. It goes in /skin1. They are both for version 4.1.6.

I'm wondering, do you have the thumbnails on your server? The function.thumb.php will create them the first time a customer opens the page. Using either FTP or Cpanel look for the folder name "cache" and see if there are any of the thumbnails in it. The folder needs to have a htaccess with "Allow from all" (without quotes) in it and the folder needs to have writable permissions. Just make several of the folders where you think they may need to be (root, /xcart, /images, etc.) and one of them should fill up with thumbnails in no time. You may need to adjust your function.thumb.php to write the thumbnails where you want them.


All times are GMT -8. The time now is 01:28 AM.

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