![]() |
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 $ *} 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} |
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
|
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:
|
Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!
Quote:
|
Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!
Quote:
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 |
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.
|
Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!
Quote:
Let me know if you are able to find anything regarding to the "image.php" call. Thanks -Tuan |
Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!
Quote:
Re-check your settings in admin >> images location, also check if Enable digital signature (MD5) verification is on or off. |
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 |
Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!
Quote:
Quote:
-Tuan |
Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!
Just to update everyone on this thread, I contacted the X-cart team and Eugene Kaznacheev in the technical support team was able to ressolve the issue. Of course that cost me some support point, but I thought it was well worth it. All of my images from the "Best Sellers" and "Recommended Products" are now being referenced via the direct filesystem path and no longer being pulled via "image.php" file. WOW, they are so much faster. Night and day difference!!!
With that being said, I'm posting the code modification required to make this work down below. Hopefully this will help someone in the future. Cheers -Tuan 1. Edit <xcart_dir>/modules/Bestsellers/bestsellers.php script and replace: Code:
$smarty->assign("bestsellers",$bestsellers); with Code:
foreach ($bestsellers as $i=>$item) { 2. Then edit <xcart_dir>/recommends.php file and replace: Code:
$smarty->assign("recommends",$recommends); with Code:
foreach ($recommends as $i=>$item) { --------------------------------------------------------------------------------------------------------------------- After that, you would need to modify the "xcart_dir\skin1\modules\Bestsellers\bestsellers.t pl" and "xcart_dir\skin1\modules\Recommended_Products\reco mmends.tpl" files as well. And below is how I currently have those two files configure. Cheers -Tuan "xcart_dir\skin1\modules\Bestsellers\bestsellers.t pl" File Code:
{* $Id: bestsellers.tpl,v 1.8 2005/11/21 12:42:00 max Exp $ *} Code:
{if $recommends} |
Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!
In order to keep the markup valid while using this mod...
In the bestsellers.tpl change: <a href="product.php?productid={$bestseller.productid }&cat={$cat}&bestseller"> to <a href="product.php?productid={$bestseller.productid }&cat={$cat}&bestseller"> and in the recommends.tpl change: <a href=product.php?productid={$recommends[num].productid}&cat={$cat}&page={$navigation_page}> to <a href=product.php?productid={$recommends[num].productid}&cat={$cat}&page={$navigation_p age}> |
Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!
Has anyone tested the script on 4.1.7 or 4.1.8? Would it work?
|
Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!
I did add the bestsellers mod to 4.18.
I was having errors thrown from the addition of the following code to the bestsellers.php. ------------------------------------------------------------------------------------------------- foreach ($bestsellers as $i=>$item) { $bestsellers[$i]["tmbn_url"] = func_get_image_url($item[productid],"T"); } $smarty->assign("bestsellers",$bestsellers); --------------------------------------------------------------------------------------------------- Since it didn't make sense to me on why this was added, I just left the original code on that page and modified the .tpls. (Appears to work fine.) http://www.naplesvalley.com/ PS. I didn't try the "recommends" mod. |
Re: Need help configuring "Best Sellers" module to call thumbnail images via filesystem!
Thanks Chris. I believe the code that causes errors is destined to show thumbnails in the bestsellers table in the left panel (nice feature to have), but someone needs to "convert" this code to the 4.1.x standard...
|
All times are GMT -8. The time now is 04:17 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.