![]() |
Display manufacturer logo in product.tpl
Hello ...
Is it possible to display the manufacturers logo within the product details page (product.tpl) for the selected product. Thanks & Regards Shafiq :sK |
|
Thanks ...
I got around it .. but required a little tweaking for it to work in version 4.1.0: Added the following code within product.php: Quote:
And then added the following within product.tpl Quote:
Regards Shafiq :sK |
Re: Display manufacturer logo in product.tpl
can this be done easily in 4.1.10 ?
Is there a nice free module or some additional core function available? |
Re: Display manufacturer logo in product.tpl
Quote:
|
Re: Display manufacturer logo in product.tpl
Do you think it's not working for me because of the typo ?
$thisManufactorer <- $thisManufacturer ?? how are we supposed to use code with variable variables? |
Re: Display manufacturer logo in product.tpl
Quote:
There is the same variable name in SQL query. But table name is case sensitive. So right php code is PHP Code:
tpl code to show manufacturer logo Code:
{if $m_image_path ne ""} |
Re: Display manufacturer logo in product.tpl
couldn't someone add a function to the core of X-Cart like:
get_manufacturers_image(); these functions are pretty standard in most free systems - eg wordpress, which is so easy to customise compared to X-Cart why are these convenient functions noticably absent from x-cart? also the manufacturers module is not really worthy of the term module is it? shouldn't there be a few more options like: • show manufacturers logo on product pages √ • show next / previous product navigation by same manufacturer √ • show related manufacturers √ (if part of same parent company) • show plain word link below logo √ etc... Where are these options? - why aren't they standard? |
Re: Display manufacturer logo in product.tpl
I don't know much php but this looks like relevant code?
$manufacturer['image_path'] = func_get_image_url($manufacturerid, "M", $manufacturer['image_path']); So can anyone tell me how to get the url to the manufacturer for a given product? I've got the logo displaying - but i want it to be an active link (why wouldn't I????) I just need to get the $manufacturerid variable to work (this example below is for a plain text link - not the logo version / but easily transferable) HTML Code:
<a href="manufacturers.php?manufacturerid={$manufacturerid}">{$manufacturer}</a><br /> what am i doing wrong here? Thanks |
Re: Display manufacturer logo in product.tpl
The code below shows manufacturer logo as active link. If there is no logo, it shows manufacturer name.
Modified PHP: PHP Code:
Code:
<a href="manufacturers.php?manufacturerid={$manufacturer.manufacturerid}"> |
Re: Display manufacturer logo in product.tpl
{$manufacturer.manufacturerid}
I'm getting the first letter of the manufacturer instead of the ID http://myshop.com/manufacturers.php?manufacturerid=C (wrong) instead of: http://myshop.com/manufacturers.php?manufacturerid=2 (correct) any other ideas how to get the current manufacturers id? these smarty functions are just not intuitive - even "Advanced Member"s get the basics wrong... can we re-write them in plain php like wordpress does? |
Re: Display manufacturer logo in product.tpl
version,
check if you've modified php code according to my previous post. Having first letter instead of manufacturerid takes place with code from post #7. Modified code is in post #10. |
Re: Display manufacturer logo in product.tpl
thanks - works perfectly
|
Re: Display manufacturer logo in product.tpl
well almost perfect....
where can i specify the order? at the moment it is by id i would like it to be alphabetical also what options do we have when the page get's full? a few list display options in the module settings would be good: - pagination - anchor link list (by first letter) - scroller/carousel |
Re: Display manufacturer logo in product.tpl
where in product.php should this code line be located
|
Re: Display manufacturer logo in product.tpl
i can confirm this code works in 4.3.2
but i used {$product.manufacturer} to display name if no image is there |
All times are GMT -8. The time now is 05:17 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.