[Skip to main content](#vessel-content)

#   Code for displaying Brand Name in product list

##

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

13 years 7 months ago [\#97758](#97758) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  *[Code for displaying Brand Name in product list](/forum/4-how-to/80023-code-for-displaying-brand-name-in-product-list#97758 "Some PHP coder need to help in a simple feature:  I want to add Product Brand name in my product listing. I tried some tweak in file list&#95;img&#95;desc.php but I finally accepted that my PHP knowledge is too poor to keep trying forever...  I cloned  piece of code and tried several 'mutations' but the best I got is the brand code itself, but not it's name.  Please bring some light to the project    params-&gt;get('link&#95;to&#95;product&#95;page',1)){ ?&gt;   row-&gt;product&#95;name; ?&gt; params-&gt;get('link&#95;to&#95;product&#95;page',1)){ ?&gt;      I want to achieve this")* was created by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")*

Some PHP coder need to help in a simple feature:

I want to add Product Brand name in my product listing. I tried some tweak in file list_img_desc.php but I finally accepted that my PHP knowledge is too poor to keep trying forever...

I cloned &lt;!-- PRODUCT NAME --&gt; piece of code and tried several 'mutations' but the best I got is the brand code itself, but not it's name.

Please bring some light to the project

&lt;!-- PRODUCT BRAND --&gt;
&lt;span class="hikashop_product_name"&gt;
&lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt;
&lt;a href="&lt;?php echo $link;?&gt;"&gt;
&lt;?php } ?&gt;
&lt;?php
echo $this-&gt;row-&gt;product_name;
?&gt;
&lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt;
&lt;/a&gt;
&lt;?php } ?&gt;
&lt;/span&gt;
&lt;!-- EO PRODUCT BRAND --&gt;

I want to achieve this

[ ![adding&#95;brand.jpg](/forum/attachment/9494) ](/forum/attachment/9494 "adding&#95;brand.jpg")

- [ ![adding&#95;brand.jpg](/forum/attachment/9494) ](/forum/attachment/9494 "adding&#95;brand.jpg") [ ](/forum/attachment/9494?download=1 "adding&#95;brand.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgwMDIzLWNvZGUtZm9yLWRpc3BsYXlpbmctYnJhbmQtbmFtZS1pbi1wcm9kdWN0LWxpc3Q/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 7 months ago [\#97841](#97841) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Code for displaying Brand Name in product list](/forum/4-how-to/80023-code-for-displaying-brand-name-in-product-list#97841 "Some PHP coder need to help in a simple feature:  I want to add Product Brand name in my product listing. I tried some tweak in file list&#95;img&#95;desc.php but I finally accepted that my PHP knowledge is too poor to keep trying forever...  I cloned  piece of code and tried several 'mutations' but the best I got is the brand code itself, but not it's name.  Please bring some light to the project    params-&gt;get('link&#95;to&#95;product&#95;page',1)){ ?&gt;   row-&gt;product&#95;name; ?&gt; params-&gt;get('link&#95;to&#95;product&#95;page',1)){ ?&gt;      I want to achieve this")*

Hi,

To have the brand name you can use: Code:

$db = JFactory::getDBO(); $db-&gt;setQuery('SELECT category_name FROM '.hikashop_table('category').' WHERE category_id='.(int)$this-&gt;row-&gt;product_manufacturer_id); $brandName = $db-&gt;loadResult(); echo $brandName;

The following user(s) said Thank You: [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgwMDIzLWNvZGUtZm9yLWRpc3BsYXlpbmctYnJhbmQtbmFtZS1pbi1wcm9kdWN0LWxpc3Q/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.045 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
