| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
quick hack to eliminate thumbnail image jaggies (libgd req) | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#31
|
|||||||
|
|||||||
![]() I thought I had it, but I was wrong.
![]() The product_modify.php works like a champ. The thumb_path field of xcart_thumbnails is being populated when I add a new product. The problem is the test to display the "mini" always fails. in product_thumbnail.tpl Code:
$thumb is always equal to "" even though the database is populated. Did I do somthing wrong in products.tpl?
__________________
Version 4.2.3 |
|||||||
#32
|
|||||||||
|
|||||||||
![]() More than likely this is because the new added function isn't being called where it needs to be. If your wanting in on the category or products listing page, make sure in include/func.php the function func_search_products(); looks like:
Code:
![]() There are other parts of X-Cart you may have to search on to find func_get_thumbnail_url and add a new line directly under them with the same values, except, call the new function with the trailing "_" (underscore) and make sure the result array is named "thumb" instead of "tmbn_url". Some of the other places this call happens is in include/search.php, and even in the upselling and related modules. I also have convient way to debug templates on my blog, that may help you locate if the variable "thumb" is being populated correctly. hope this helps. ![]() |
|||||||||
#33
|
|||||||
|
|||||||
![]() Boomer, You da man!
I was missing the call to func_get_thumbnail_url_ in search.php. Thanks for sharing and helping me implement your mod. ![]()
__________________
Version 4.2.3 |
|||||||
#34
|
|||||||||
|
|||||||||
![]() Quote:
Not a problem, I appreciate you going through and making sure the posted code was in working condition. I was just posting it from previous code and wasn't sure if I was missing anything. Take a peek at websiteoptimization.com and you can see the difference of download times with smaller thumbnails implemented vs resizing large product thumbnails in html. Defiantly should be standard in X-Cart if you ask me. ![]() |
|||||||||
#35
|
|||||||
|
|||||||
![]() Ok I have this so close to working but I still have one small problem. It is now creating the thumbnail in the directory and it is referencing it in the db. However I am still getting the resized full res image on the thumbnail page, but I am now getting the resized mini image on the product details page. I have gone back and checked and double checked the code changes and I just cant seem to find my mistake and how these got switched. any ideas?
Thanks! Cameron
__________________
Xcart Version: 4.1.6 |
|||||||
#36
|
|||||||||
|
|||||||||
![]() Make sure your skin1/customer/main/product.tpl is using the default out of box {include} for the product_thumbnail.tpl file.
You'll need to add the custom one to the products.tpl and products_t.tpl if your using multi-columns. You'll also need to adjust the {include} in some of the modules as well, like up selling, etc. |
|||||||||
#37
|
|||||||
|
|||||||
![]() Ok I have got it to function properly, however I have one more question. It appears as though the thumbnails that it is creating are very low quality, very jagged and generally poor. Is there a way to increase the quality a bit?
__________________
Xcart Version: 4.1.6 |
|||||||
#38
|
|||||||
|
|||||||
![]() What you need to apply is an unsharp mask, like the Unsharp mask algorithm by Torstein Hц╦nsi. This is what vBulletin uses and the code basically looks like:
Code:
Boomer- ever used this? - Mike
__________________
4.1.9 |
|||||||
#39
|
|||||||||
|
|||||||||
![]() in product_modify.php
try swapping the comment out on this code: Code:
As I've noticed some GD libraries will use the later of the two when anti-aliasing a rescaled image. |
|||||||||
#40
|
|||||||
|
|||||||
![]() Boomer that change did not make a difference in the quality. I am not sure how to go about implementing the code from mffowler. I do know that my hair is getting thinner!!!
![]() Thanks again for all your help! Cameron
__________________
Xcart Version: 4.1.6 |
|||||||
|
|||
X-Cart forums © 2001-2020
|