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

Easy dynamic thumbnail generation

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #61  
Old 10-10-2006, 05:13 AM
  Alltribes's Avatar 
Alltribes Alltribes is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 192
 

Default Re: Easy dynamic thumbnail generation

Hmm, the link doesn't work.

In any case, from looking at the site I think perhaps the mitash/ doesn't need removed. Try this:
Code:
|replace:"home/pur6105/public_html/":""
__________________
Alltribes.com
Native American Jewelry
Pottery, Baskets, Kachinas & More

X-cart Gold Version 4.0.17 Live
PHP 5.2.6
MySQL 4.1.25
(mt)
Reply With Quote
  #62  
Old 10-10-2006, 05:43 AM
  mitash's Avatar 
mitash mitash is offline
 

X-Adept
  
Join Date: Jan 2006
Location: Australia
Posts: 450
 

Default Re: Easy dynamic thumbnail generation

Hi Thanks for your reply...

Here's the link...
http://www.purebaby.net.au/mitash/product.php?productid=16219&cat=262&page=2

Everything is installed under purebaby.net.au/mitash/ so i think we might need mitash there...
What do you think..?

I can give u my username and password if you can have a quick look for me pls...
__________________
eCommerce - Strategy / Design / Development / Marketing / Maintenance

Call within Australia:
Phone: 1300 648 274 | Mobile: 0417 241 950
Call outside Australia:
+61 417 241 950 |

Email:
results@mitash.com | Skype: mitashau | Web: www.mitash.com
Reply With Quote
  #63  
Old 10-10-2006, 07:30 AM
  Alltribes's Avatar 
Alltribes Alltribes is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 192
 

Default Re: Easy dynamic thumbnail generation

Hmm, I think I know the problem. You're using the code for 4.0 on a 4.1 store.

The image urls are different between the two versions. The |replace sections are for the 4.0 version only. Remove them and it should work.
__________________
Alltribes.com
Native American Jewelry
Pottery, Baskets, Kachinas & More

X-cart Gold Version 4.0.17 Live
PHP 5.2.6
MySQL 4.1.25
(mt)
Reply With Quote
  #64  
Old 10-11-2006, 05:57 AM
  mitash's Avatar 
mitash mitash is offline
 

X-Adept
  
Join Date: Jan 2006
Location: Australia
Posts: 450
 

Default Re: Easy dynamic thumbnail generation

Hi I am using 4.1.3 version

I tried what you suggested however still not working...?

Thanks
Ash
__________________
eCommerce - Strategy / Design / Development / Marketing / Maintenance

Call within Australia:
Phone: 1300 648 274 | Mobile: 0417 241 950
Call outside Australia:
+61 417 241 950 |

Email:
results@mitash.com | Skype: mitashau | Web: www.mitash.com
Reply With Quote
  #65  
Old 10-11-2006, 06:50 AM
  Alltribes's Avatar 
Alltribes Alltribes is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 192
 

Default Re: Easy dynamic thumbnail generation

Maybe the forum move messed up more than the <img> tags. Here's my current code for product_images.tpl on my 4.1.3 store:

*fixed

Code:
{if $images ne ""} {capture name=dialog} <script language="JavaScript" type="text/javascript"> {section name=image loop=$images} {if {$images[image].image_path} Image{$images[image].imageid} = new Image(); Image{$images[image].imageid}.src = "{$images[image].image_path}"; {/if} {/section} </script> <table width="100%"> <tr> <td> <table> {section name=image loop=$images} {if {$images[image].image_path neq ""} <tr> <td> <a href="#" onmouseover="document.main_image.src=Image{$images[image].imageid}.src;">{thumb file=`$images[image].image_path` longside="100" link="false" html="alt='`$product.product`' border='0'"}</a> </td> </tr> {/if} {/section} </table> </td> <td> <img src="{$images[0].image_path}" name="main_image" alt="{$product.product}" /> </td> </tr> </table> {/capture} {include file="dialog.tpl" content=$smarty.capture.dialog extra='width="100%"'} {/if}

This uses image preloading unlike the template you're trying to use. Make sure you disable the detailed product images popup.

I'll try and find the time to sort out the code on the first page and make sure it all works still. I've got some other goodies to add to this mod as well (first detailed image as the thumbnail!). I've already updated the 4.1x preloading code with the above code.
__________________
Alltribes.com
Native American Jewelry
Pottery, Baskets, Kachinas & More

X-cart Gold Version 4.0.17 Live
PHP 5.2.6
MySQL 4.1.25
(mt)
Reply With Quote
  #66  
Old 10-11-2006, 02:38 PM
  mitash's Avatar 
mitash mitash is offline
 

X-Adept
  
Join Date: Jan 2006
Location: Australia
Posts: 450
 

Default Re: Easy dynamic thumbnail generation

Thanks heaps for your help and for your patience with this mod....

I have implemented your code...
It is working however, it shows very big thumbnails.....

http://www.purebaby.net.au/mitash/product.php?productid=16219&cat=262&page=2

Not sure what's going on there....

Also, instead of displaying the imgaes and thumb nails in the detailed images section I am hoping to have the positioning of the imgages and thumbnails like this...

http://www.ebonist.nl/samenstellen/product.php?productid=16138&cat=248&page=1

Thank you muchly!

Ash
__________________
eCommerce - Strategy / Design / Development / Marketing / Maintenance

Call within Australia:
Phone: 1300 648 274 | Mobile: 0417 241 950
Call outside Australia:
+61 417 241 950 |

Email:
results@mitash.com | Skype: mitashau | Web: www.mitash.com
Reply With Quote
  #67  
Old 10-12-2006, 07:15 AM
  Alltribes's Avatar 
Alltribes Alltribes is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 192
 

Default Re: Easy dynamic thumbnail generation

Oops, my bad. I moved the thumbnailing code to my product_thumbnail.tpl since I'm using the first detailed image for all my thumbnails. The good news is it IS getting the correct image paths, hehe.

I've edited my previous code (and the 4.1x preloading script on page 1) so the thumbnail code is in the product_images.tpl again.
__________________
Alltribes.com
Native American Jewelry
Pottery, Baskets, Kachinas & More

X-cart Gold Version 4.0.17 Live
PHP 5.2.6
MySQL 4.1.25
(mt)
Reply With Quote
  #68  
Old 10-12-2006, 07:40 AM
  mitash's Avatar 
mitash mitash is offline
 

X-Adept
  
Join Date: Jan 2006
Location: Australia
Posts: 450
 

Default Re: Easy dynamic thumbnail generation

wow...

Thats fantastic...
It's working now... thatnks you so much for your help! =)

Only one thing I would like to display images like this...
at the moment they are coming up in detailed images section/position......

I want to do the swap thing where the first image is.... like this page....

http://www.ebonist.nl/samenstellen/product.php?productid=16138&cat=248&page=1
__________________
eCommerce - Strategy / Design / Development / Marketing / Maintenance

Call within Australia:
Phone: 1300 648 274 | Mobile: 0417 241 950
Call outside Australia:
+61 417 241 950 |

Email:
results@mitash.com | Skype: mitashau | Web: www.mitash.com
Reply With Quote
  #69  
Old 10-12-2006, 08:10 AM
  mitash's Avatar 
mitash mitash is offline
 

X-Adept
  
Join Date: Jan 2006
Location: Australia
Posts: 450
 

Default Re: Easy dynamic thumbnail generation

Here's the working URL

http://www.purebaby.net.au/mitash/product.php?productid=16219&cat=253&page=1

Just want to fix the positioning now....

Thanks
Ash
__________________
eCommerce - Strategy / Design / Development / Marketing / Maintenance

Call within Australia:
Phone: 1300 648 274 | Mobile: 0417 241 950
Call outside Australia:
+61 417 241 950 |

Email:
results@mitash.com | Skype: mitashau | Web: www.mitash.com
Reply With Quote
  #70  
Old 10-12-2006, 10:25 AM
  Alltribes's Avatar 
Alltribes Alltribes is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 192
 

Default Re: Easy dynamic thumbnail generation

Quote:
Originally Posted by mitash
wow...

Thats fantastic...
It's working now... thatnks you so much for your help! =)

Only one thing I would like to display images like this...
at the moment they are coming up in detailed images section/position......

I want to do the swap thing where the first image is.... like this page....

http://www.ebonist.nl/samenstellen/product.php?productid=16138&cat=248&page=1


That should be easy enough to do. Simply replace this (in product.tpl):
Code:
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="P"}

With this:

Code:
{if $active_modules.Detailed_Product_Images ne "" && ($config.Detailed_Product_Images.det_image_popup ne 'Y' || $js_enabled ne 'Y')} <p /> {include file="modules/Detailed_Product_Images/product_images.tpl" } {/if}

Also remove
Code:
{capture name=dialog}
and
Code:
{/capture} {include file="dialog.tpl" content=$smarty.capture.dialog extra='width="100%"'}
from product_images.tpl.
__________________
Alltribes.com
Native American Jewelry
Pottery, Baskets, Kachinas & More

X-cart Gold Version 4.0.17 Live
PHP 5.2.6
MySQL 4.1.25
(mt)
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 07:44 AM.

   

 
X-Cart forums © 2001-2020