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)

Eddie Hillegers 06-17-2006 01:59 AM

Got the preloader working halfway.
i get the images but after a mouseover it chances to the last image
and than gets locked up, i think it's javascript related because if you
view the pagesource everything is there.

Image0 = new Image();
Image0.src = "/samenstellen/images/cache/d_38.gif";
Image0 = new Image();
Image0.src = "/samenstellen/images/cache/d_39.gif";
Image0 = new Image();
Image0.src = "/samenstellen/images/cache/d_40.gif";
Image0 = new Image();
Image0.src = "/samenstellen/images/cache/d_41.gif";





<img src=/samenstellen/images/cache/d_38.gif name="main_image"/>

it must be in de onmouseover syntax i think.
and there is a differens in paths: new image: samenstellen/images/cache
onmouseover images/cache

funny thing is i dont get a broken image

Cheers Eddie

Alltibes, i wil sent you a pm so you can see what's going on,
my shop is still under a password protected area.

Alltribes 06-17-2006 07:39 AM

You need to set the orderby field for the detailed images. Otherwise the swapping won't work. I've edited the original code and reposted it. It now uses imageid instead of orderby to preload the images.

Eddie Hillegers 06-17-2006 11:47 PM

That does the trick! i,m very glad with this mod.
A perfect way to show your detailed images in large.

thanks very much. Eddie

Eddie Hillegers 06-18-2006 12:46 AM

to get rid of the border around the thumbnails i changed


  ### Rц╪ckgabe-Strings erstellen
  if (empty($params['html'])) $_RETURN['img'] = '[img]'.$_DST['file'].'[/img]';
  else $_RETURN['img'] = '[img]'.$_DST['file'].'[/img]';

in function.thumb.php to this


  ### Rц╪ckgabe-Strings erstellen
  if (empty($params['html'])) $_RETURN['img'] = '[img]'.$_DST['file'].'[/img]';
  else $_RETURN['img'] = '[img]'.$_DST['file'].'[/img]';

maybe a bit rude but it does the trick for me

Cheers Eddie

Alltribes 06-18-2006 01:35 AM

You don't need to change the source, just stick the border=0 in the html parameter.

jdedba 06-19-2006 01:55 PM

re-size images
It is a wonderful mod / addition to x-cart. Thank you very much.

Is it a way using the same function to re-size the image?


Alltribes 06-19-2006 02:43 PM

Sure, just change the paramaters. I have it set so the pictures are 100 pixels on their longest side. Read the link in the first post for all the different parameters you can use. I think all you need to do is change longside="100" to longside="400".

I don't know how you'd integrate it with x-cart directly, but you can use it to display the image in the proper dimensions after it's uploaded.

jdedba 06-19-2006 03:54 PM

Thank you for your replay.

JWait 06-20-2006 06:12 AM

What I am trying to achieve is to have the original image (and detailed images if there are any) displayed on the product page as a thumbnail that will open in a popup window if they are clicked. Presently we are using the telefirma image mod in xcart version 4.0.18 and are very happy with it, but plan to change to 4.1 when it is stable. Will this plugin work for what we are trying to do? If so any help in incororating it would be appreciated.

netgene 06-20-2006 08:12 AM

perfect squares and a question...
in reply to how to make them square... no, dont use photoshop, it will take for ever.

look at http://www.cerdmann.com/thumb/ they have an example, about forcing it to crop on the sides.


second, i have a problem, i am trying to replace the normal product_thumbnail.tpl so that all the pictures will go 'into' the mod, but i get an error here..

{thumb file=$tmbn_url longside="100" link="true"}

Fatal error: Smarty error: thumb: parameter 'file' cannot be empty and must exist in /hsphere/local/home/samor/edecodrive.com/Smarty-2.6.12/Smarty.class.php on line 1095

Can anyone help? i already tryed, double quotes, single quotes, etc... i even tryed entering the name of file, directly... but it still says that error..

All times are GMT -8. The time now is 08:38 AM.

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