Mfr. Image if No Product Image in Listing Results
:!: First, this mod may need tweaking for the latest version (4.1.x) of X-Cart. It has been tested with latest (4.0.x) version however.
Within a product listing page, such as a Category page, or search results, etc. Attempt to use the products manufacturer's logo if no product thumbnail is found. 1) Edit include/search.php and locate: Code:
$products[$k]["tmbn_url"] = func_get_thumbnail_url($v["productid"]); 2) Below the above found line add: Code:
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 3) Edit skin1/product_thumbnail and replace its contents with: Code:
{* $Id: product_thumbnail.tpl,v 1.14 2004/06/24 09:53:29 max Exp $ *} 4) Next edit skin1/main/customer/products.tpl (or products_t.tpl) and locate: Code:
{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url} 5) Replace the found code with: Code:
{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url mfrthumb=$products[product].mfrthumb} |
Thank you for the mod. I tested it in 4.1.1 and it did not work.
It seems to me that 4.1.1 does not have the mlogo.php file. |
Re: Mfr. Image if No Product Image in Listing Results
Here's the coding so it will work in v4.1.x branch (and its a lot easier, no need to edit any PHP files). I can confirm it works in v4.1.6 (Latest version).
1) Edit skin1/product_thumbnail.tpl and replace its contents with: Code:
Code:
manufacturer=$products[product].manufacturers |
Re: Mfr. Image if No Product Image in Listing Results
Can this mod be edited to lookfor "productID.jpg" in a particular folder if the image doesnt exist instead of Man-Logo
|
All times are GMT -8. The time now is 05:36 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.