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

Need help configuring "Best Sellers" module to call thumbnail images via filesystem!

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-23-2006, 05:41 PM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Need help configuring "Best Sellers" module to call thumbnail images via filesystem!

Hi guys,

Can someone please point me to the right direction on how to modify the "bestsellers.tpl" template so it would call the product thumbnail images using the filesystem instead of database via "image.php" file.

Thanks
-Tuan



Current codes from "bestsellers.tpl" template file.
Code:
{* $Id: bestsellers.tpl,v 1.8 2005/11/21 12:42:00 max Exp $ *} {if $bestsellers} {capture name=bestsellers} <table cellpadding="0" cellspacing="3"> {foreach from=$bestsellers item=bestseller} <tr> {if $config.Bestsellers.bestsellers_thumbnails eq "Y"} <td width="30"> <a href="product.php?productid={$bestseller.productid}&cat={$cat}&bestseller"> <A href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}"> {include file="product_thumbnail.tpl" productid=$bestseller.productid image_x=50 product=$bestseller.product} </a> </td> {/if} <td> <font class="ProductPriceBestSellers"> <b><a href="product.php?productid={$bestseller.productid}&amp;cat={$cat}&amp;bestseller">{$bestseller.product}</a></b><br /> {$lng.lbl_our_price}: {include file="currency.tpl" value=$bestseller.price}<br /> </font> </td> </tr> {/foreach} </table> {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_bestsellers menu_content=$smarty.capture.bestsellers } {/if}





The same can be said for the "Recommended Products" modules as well. It call all the images via the database using "image.php" file. It needs to be revised too.


Code:
{if $recommends} {capture name=recommends} {section name=num loop=$recommends} { if %num.first% } <table border=0 width=100%>{/if} { if %num.index% is div by 3}<tr>{/if} <td width="33%" align="center" valign="top"> <a href=product.php?productid={$recommends[num].productid}&cat={$cat}&page={$navigation_page}>{include file="product_thumbnail.tpl" productid=$recommends[num].productid image_x=80 product=$recommends[num].product tmbn_url=$recommends[num].tmbn_url} <br /> <SPAN class="ItemsList">{$recommends[num].product}</SPAN> </td> { if %num.last% }</tr> </table>{/if} {/section} {/capture} {include file="dialog.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends extra="width=100%"} {/if}
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote
  #2  
Old 09-23-2006, 05:47 PM
  mcitde's Avatar 
mcitde mcitde is offline
 

Advanced Member
  
Join Date: Apr 2006
Posts: 61
 

Default Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!

You may got the same problem i had. Take a look here: http://forum.x-cart.com/showthread.php?t=25135
__________________
v 4.1.8 and v 4.1.9
WIN XP: Apache 2.2.4, PHP 5.2.3, MySQL 5.0.45
UNIX: Apache 1.3, PHP 4.4.4, MySQL 5.0.22
Reply With Quote
  #3  
Old 09-23-2006, 06:02 PM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!

Hi Mcitde,

I think the problem is different though. All of my images are currently store in the filesystem already. They are showing up just fine and I can see them. However, the codes in the "Best Sellers" and "Recommended Products" are calling these images via the database using the "image.php" file instead of directly via the filesystem.

For example these two links below are pointing to the same exact image. However, the first link is called "image.php" file. And the second link is directly using the file system.

Via "image.php" file = http://www.mvpautoparts.com/image.php?type=T&id=17036
Directly via filesystem = http://www.mvpautoparts.com/images/T/DGPV001W35Small.jpg

There is a huge difference in term of speed. It is much quicker via the filesystem. This gets magnified when it is trying to call several images, one after another consecutively.

-Tuan

Quote:
Originally Posted by mcitde
You may got the same problem i had. Take a look here: http://forum.x-cart.com/showthread.php?t=25135
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote
  #4  
Old 09-23-2006, 06:22 PM
  mcitde's Avatar 
mcitde mcitde is offline
 

Advanced Member
  
Join Date: Apr 2006
Posts: 61
 

Default Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!

Quote:
Originally Posted by TL408
If you choose to store images at filesystem there are no images in your databease anymore. Only links to them. All the image.php does is call this link. -->> image.php?type=T&id=17036 (call link to the image with id 17036 from table xcart_images_T) So actually it should not take any longer to open the images.
__________________
v 4.1.8 and v 4.1.9
WIN XP: Apache 2.2.4, PHP 5.2.3, MySQL 5.0.45
UNIX: Apache 1.3, PHP 4.4.4, MySQL 5.0.22
Reply With Quote
  #5  
Old 09-23-2006, 06:39 PM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!

Quote:
Originally Posted by mcitde
If you choose to store images at filesystem there are no images in your databease anymore. Only links to them. All the image.php does is call this link. -->> image.php?type=T&id=17036 (call link to the image with id 17036 from table xcart_images_T) So actually it should not take any longer to open the images.

The images are not store in the database. But I am absolutely certain that using "image.php" file to retrieve these thumbnails will take SIGNIFICANTLY longer than going directly via the filesystem path.

1) Try this. Go to my front page of my webstore. http://www.mvpautoparts.com/home.php
As you can see on the left side where the "Best Sellers" module is, it takes about 4 seconds to completely call up the 10 thumbnail images. You can even see it loading up one image after another. (viewing the image property link will show that they are being reference via the "image.php" file)

2) And now, go to this link. http://www.mvpautoparts.com/home.php?cat=389
Notice how fast it loadup all the product thumbnail images? There are a total of almost 50 images. And it bring them all up almost instantaneously....5 times as many images as the "Best Sellers", but it only take a fractional amount of time. (viewing the image property link here will show that they are being reference directly via the filesytem path)

-Tuan
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote
  #6  
Old 09-23-2006, 09:10 PM
  mcitde's Avatar 
mcitde mcitde is offline
 

Advanced Member
  
Join Date: Apr 2006
Posts: 61
 

Default Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!

Yes you are right. I never noticed on my page. м check what the problem could be, But by the way. It may would by nice to have some text like welcome to my store or somthing like this at the first page.
__________________
v 4.1.8 and v 4.1.9
WIN XP: Apache 2.2.4, PHP 5.2.3, MySQL 5.0.45
UNIX: Apache 1.3, PHP 4.4.4, MySQL 5.0.22
Reply With Quote
  #7  
Old 09-23-2006, 09:16 PM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!

Quote:
Originally Posted by mcitde
But by the way. It may would by nice to have some text like welcome to my store or somthing like this at the first page.
Agreed. My site is not production yet. Still being worked on. The verbage through out the site will be added/revised once I get all the functionalities straighten out.

Let me know if you are able to find anything regarding to the "image.php" call.

Thanks
-Tuan
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote
  #8  
Old 09-24-2006, 05:46 AM
 
syddos syddos is offline
 

eXpert
  
Join Date: Sep 2002
Location: London, England, UK
Posts: 259
 

Default Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!

Quote:
Can someone please point me to the right direction on how to modify the "bestsellers.tpl" template so it would call the product thumbnail images using the filesystem instead of database via "image.php" file.

Thanks
-Tuan

Re-check your settings in admin >> images location, also check if Enable digital signature (MD5) verification is on or off.
__________________
Syddos

Nothing is impossible, We just don't know how to do it ........Yet!

Xcart 4.1.X PRO (Testing Platform: winXP Pro)
Perl 5.8.7 (win32)
WINAMP 1.6.3 (win32 server package. Includes the following)
- phpMyAdmin v2.8.03
- MySql 5.0.21
- Apache 2.0.55 (win32)
- php 5.1.4
- SQLitemanager 1.2.0
Reply With Quote
  #9  
Old 09-24-2006, 06:14 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!

This may solve your problem if using v4.0.x
http://forum.x-cart.com/showthread.php?t=25090
Not yet sure if it works with the 4.1 branch
__________________
xcartmods.co.uk
Reply With Quote
  #10  
Old 09-24-2006, 09:21 AM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!

Quote:
Originally Posted by syddos
Re-check your settings in admin >> images location, also check if Enable digital signature (MD5) verification is on or off.
This setting is currently off for all of them ( Product thumbnails, Product images, Category icons, Detailed images, Variant images, and Manufacturer logos)

Quote:
Originally Posted by PhilJ
This may solve your problem if using v4.0.x
http://forum.x-cart.com/showthread.php?t=25090
Not yet sure if it works with the 4.1 branch
Looks pretty promising. I'll check it out. Thanks for the link, Phil.

-Tuan
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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:59 PM.

   

 
X-Cart forums © 2001-2020