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

#   Add customer's Company Name to Orders view

##

- **[thirdhatch](/forum/user/1140-thirdhatch "View thirdhatch's Profile")**
- [![thirdhatch's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1140-thirdhatch "View thirdhatch's Profile") Topic Author
- [ Offline](/forum/user/1140-thirdhatch)

Less More

- Posts: 17
- Thank you received: 0
-
-

10 years 6 months ago [\#240364](#240364) by [thirdhatch](/forum/user/1140-thirdhatch "View thirdhatch's Profile")  *[Add customer's Company Name to Orders view](/forum/35-orders-management/884568-add-customers-company-name-to-orders-view#240364 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5.34  I would like to add the Customer's company name to the Orders view, either by:  &#42; Adding it above the customer name in the customer column  &#42; Or adding the company name as a separate column  Whichever is easier. I tried adding the company name above the customer name (see 1st screenshot)by going to order &gt; listing.php around line 140:  Using the custom field parameter address&#95;company (see 2nd screenshot) but I don't think I had the correct syntax. Also I don't know if this would make the column sortable by the company name.  If that's too complicated to do, how can I override the layout for order/listing.php to simply include a separate column for the company name? Is there a similar example I can refer to (I've searched but haven't found one yet) and is address&#95;company the correct parameter to call?  Thank you for your assistance!")* was created by *[thirdhatch](/forum/user/1140-thirdhatch "View thirdhatch's Profile")*

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.5.34

I would like to add the Customer's company name to the Orders view, either by:

- Adding it above the customer name in the customer column
- Or adding the company name as a separate column

Whichever is easier. I tried adding the company name above the customer name (see 1st screenshot)by going to order &gt; listing.php around line 140: Code:

&lt;td class="hikashop_order_customer_value"&gt; ECHO COMPANY NAME HERE &lt;?php echo $row-&gt;hikashop_name; if(!empty($row-&gt;username)){ echo ' ( '.$row-&gt;username.' )'; } echo '&lt;br/&gt;'; if(!empty($row-&gt;user_id)){ $url = hikashop_completeLink('user&amp;task=edit&amp;cid[]='.$row-&gt;user_id); $config =&amp; hikashop_config(); if(hikashop_isAllowed($config-&gt;get('acl_user_manage','all'))) echo $row-&gt;user_email.'&lt;a href="'.$url.$target.'"&gt;&lt;img src="'.HIKASHOP_IMAGES.'edit.png" alt="edit"/&gt;&lt;/a&gt;'; }elseif(!empty($row-&gt;user_email)){ echo $row-&gt;user_email; } ?&gt; &lt;/td&gt;

Using the custom field parameter **address\_company** (see 2nd screenshot) but I don't think I had the correct syntax. Also I don't know if this would make the column sortable by the company name.

If that's too complicated to do, how can I override the layout for **order/listing.php** to simply include a separate column for the company name? Is there a similar example I can refer to (I've searched but haven't found one yet) and is address_company the correct parameter to call?

Thank you for your assistance!

- [ ![hika1&#95;2016-05-17.jpg](/forum/attachment/31482) ](/forum/attachment/31482 "...2016-05-17.jpg") [ ](/forum/attachment/31482?download=1 "...2016-05-17.jpg")
- [ ![hika2&#95;2016-05-17.jpg](/forum/attachment/31483) ](/forum/attachment/31483 "...2016-05-17.jpg") [ ](/forum/attachment/31483?download=1 "...2016-05-17.jpg")

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

10 years 6 months ago [\#240367](#240367) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add customer's Company Name to Orders view](/forum/35-orders-management/884568-add-customers-company-name-to-orders-view#240367 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5.34  I would like to add the Customer's company name to the Orders view, either by:  &#42; Adding it above the customer name in the customer column  &#42; Or adding the company name as a separate column  Whichever is easier. I tried adding the company name above the customer name (see 1st screenshot)by going to order &gt; listing.php around line 140:  Using the custom field parameter address&#95;company (see 2nd screenshot) but I don't think I had the correct syntax. Also I don't know if this would make the column sortable by the company name.  If that's too complicated to do, how can I override the layout for order/listing.php to simply include a separate column for the company name? Is there a similar example I can refer to (I've searched but haven't found one yet) and is address&#95;company the correct parameter to call?  Thank you for your assistance!")*

Hi,

It should be quite easy to add. Try with that code:
&lt;?php echo $row-&gt;address_company; ?&gt;

The following user(s) said Thank You: [thirdhatch](/forum/user/1140-thirdhatch "View thirdhatch's Profile")

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

- **[thirdhatch](/forum/user/1140-thirdhatch "View thirdhatch's Profile")**
- [![thirdhatch's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1140-thirdhatch "View thirdhatch's Profile") Topic Author
- [ Offline](/forum/user/1140-thirdhatch)

Less More

- Posts: 17
- Thank you received: 0
-
-

10 years 6 months ago [\#240499](#240499) by [thirdhatch](/forum/user/1140-thirdhatch "View thirdhatch's Profile")  Replied by *[thirdhatch](/forum/user/1140-thirdhatch "View thirdhatch's Profile")* on topic *[Add customer's Company Name to Orders view](/forum/35-orders-management/884568-add-customers-company-name-to-orders-view#240499 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5.34  I would like to add the Customer's company name to the Orders view, either by:  &#42; Adding it above the customer name in the customer column  &#42; Or adding the company name as a separate column  Whichever is easier. I tried adding the company name above the customer name (see 1st screenshot)by going to order &gt; listing.php around line 140:  Using the custom field parameter address&#95;company (see 2nd screenshot) but I don't think I had the correct syntax. Also I don't know if this would make the column sortable by the company name.  If that's too complicated to do, how can I override the layout for order/listing.php to simply include a separate column for the company name? Is there a similar example I can refer to (I've searched but haven't found one yet) and is address&#95;company the correct parameter to call?  Thank you for your assistance!")*

Thank you for the quick response Nicolas!

> It should be quite easy to add. Try with that code:
> &lt;?php echo $row-&gt;address\_company; ?&gt;

This is what I originally added. this but the company name does not display. ![:(](/media/kunena/emoticons/22.png ":(")

I tried both
Code:

&lt;td class="hikashop_order_customer_value"&gt; &lt;?php echo $row-&gt;address_company; ?&gt; &lt;?php echo $row-&gt;hikashop_name; if(!empty($row-&gt;username)){ echo ' ( '.$row-&gt;username.' )'; } echo '&lt;br/&gt;'; if(!empty($row-&gt;user_id)){ $url = hikashop_completeLink('user&amp;task=edit&amp;cid[]='.$row-&gt;user_id); $config =&amp; hikashop_config(); if(hikashop_isAllowed($config-&gt;get('acl_user_manage','all'))) echo $row-&gt;user_email.'&lt;a href="'.$url.$target.'"&gt;&lt;img src="'.HIKASHOP_IMAGES.'edit.png" alt="edit"/&gt;&lt;/a&gt;'; }elseif(!empty($row-&gt;user_email)){ echo $row-&gt;user_email; } ?&gt; &lt;/td&gt;

and Code:

&lt;td class="hikashop_order_customer_value"&gt; &lt;?php echo $row-&gt;address_company; echo $row-&gt;hikashop_name; if(!empty($row-&gt;username)){ echo ' ( '.$row-&gt;username.' )'; } echo '&lt;br/&gt;'; if(!empty($row-&gt;user_id)){ $url = hikashop_completeLink('user&amp;task=edit&amp;cid[]='.$row-&gt;user_id); $config =&amp; hikashop_config(); if(hikashop_isAllowed($config-&gt;get('acl_user_manage','all'))) echo $row-&gt;user_email.'&lt;a href="'.$url.$target.'"&gt;&lt;img src="'.HIKASHOP_IMAGES.'edit.png" alt="edit"/&gt;&lt;/a&gt;'; }elseif(!empty($row-&gt;user_email)){ echo $row-&gt;user_email; } ?&gt; &lt;/td&gt;

Any thoughts on why the **address\_company** is not being displayed?

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

10 years 6 months ago [\#240512](#240512) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add customer's Company Name to Orders view](/forum/35-orders-management/884568-add-customers-company-name-to-orders-view#240512 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5.34  I would like to add the Customer's company name to the Orders view, either by:  &#42; Adding it above the customer name in the customer column  &#42; Or adding the company name as a separate column  Whichever is easier. I tried adding the company name above the customer name (see 1st screenshot)by going to order &gt; listing.php around line 140:  Using the custom field parameter address&#95;company (see 2nd screenshot) but I don't think I had the correct syntax. Also I don't know if this would make the column sortable by the company name.  If that's too complicated to do, how can I override the layout for order/listing.php to simply include a separate column for the company name? Is there a similar example I can refer to (I've searched but haven't found one yet) and is address&#95;company the correct parameter to call?  Thank you for your assistance!")*

Hi,

Then it might be because you have an old version of HikaShop.
I think that we've added the loading of the billing address data in $row only in recent versions of HikaShop.
So updating should make it work, at least it works on my end and I don't see any other reason why it wouldn't.

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

- **[thirdhatch](/forum/user/1140-thirdhatch "View thirdhatch's Profile")**
- [![thirdhatch's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1140-thirdhatch "View thirdhatch's Profile") Topic Author
- [ Offline](/forum/user/1140-thirdhatch)

Less More

- Posts: 17
- Thank you received: 0
-
-

10 years 6 months ago -  10 years 6 months ago [\#240996](#240996) by [thirdhatch](/forum/user/1140-thirdhatch "View thirdhatch's Profile")  Replied by *[thirdhatch](/forum/user/1140-thirdhatch "View thirdhatch's Profile")* on topic *[Add customer's Company Name to Orders view](/forum/35-orders-management/884568-add-customers-company-name-to-orders-view#240996 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5.34  I would like to add the Customer's company name to the Orders view, either by:  &#42; Adding it above the customer name in the customer column  &#42; Or adding the company name as a separate column  Whichever is easier. I tried adding the company name above the customer name (see 1st screenshot)by going to order &gt; listing.php around line 140:  Using the custom field parameter address&#95;company (see 2nd screenshot) but I don't think I had the correct syntax. Also I don't know if this would make the column sortable by the company name.  If that's too complicated to do, how can I override the layout for order/listing.php to simply include a separate column for the company name? Is there a similar example I can refer to (I've searched but haven't found one yet) and is address&#95;company the correct parameter to call?  Thank you for your assistance!")*

> I think that we've added the loading of the billing address data in $row only in recent versions of HikaShop.

Can you please confirm with certainty that these changes were added to Hikashop Business between v2.4.0 and v2.6.3? I don't want to purchase a new version of Hikashop if this is not the case. Thanks!

Last edit: 10 years 6 months ago by [thirdhatch](/forum/user/1140-thirdhatch "View thirdhatch's Profile").

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

10 years 6 months ago [\#241009](#241009) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add customer's Company Name to Orders view](/forum/35-orders-management/884568-add-customers-company-name-to-orders-view#241009 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.5.34  I would like to add the Customer's company name to the Orders view, either by:  &#42; Adding it above the customer name in the customer column  &#42; Or adding the company name as a separate column  Whichever is easier. I tried adding the company name above the customer name (see 1st screenshot)by going to order &gt; listing.php around line 140:  Using the custom field parameter address&#95;company (see 2nd screenshot) but I don't think I had the correct syntax. Also I don't know if this would make the column sortable by the company name.  If that's too complicated to do, how can I override the layout for order/listing.php to simply include a separate column for the company name? Is there a similar example I can refer to (I've searched but haven't found one yet) and is address&#95;company the correct parameter to call?  Thank you for your assistance!")*

Hi,

I confirm that this was added later and that the code I gave earlier is working with recent versions of HikaShop (I(ve just tested it myself).

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg4NDU2OC1hZGQtY3VzdG9tZXJzLWNvbXBhbnktbmFtZS10by1vcmRlcnMtdmlldz90bXBsPW1hcmtkb3du) 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.061 seconds

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