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

#   Adding custom field to order listing

##

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

Less More

- Posts: 33
- Thank you received: 0
-
-

8 years 8 months ago [\#289204](#289204) by [dylis](/forum/user/4744-dylis "View dylis's Profile")  *[Adding custom field to order listing](/forum/35-orders-management/894036-adding-custom-field-to-order-listing#289204 "-- HikaShop version -- : 3.3.0 business -- Joomla version -- : 3.8.5 -- PHP version -- : 7.1.14 -- Browser(s) name and version -- : Firefox 58.0.2 (64 bits)  Hi,  I have created a custom field where the customer can specify his own reference for each order during check out, this work well,  however I'm looking for a way to add this reference as a column into the customer order listing, next to order number column, I know I should edit the order/listing.php file but I dont find how to recover and display the specified custom field,  in same way, I would like to have the &quot;print invoice&quot; button directly displayed in the order listing in a new column next to order number column,  thanks for help  (btw any news on Hikashop next release ? I'll need it for the new option of locking the billing adress)")* was created by *[dylis](/forum/user/4744-dylis "View dylis's Profile")*

-- HikaShop version -- : 3.3.0 business
-- Joomla version -- : 3.8.5
-- PHP version -- : 7.1.14
-- Browser(s) name and version -- : Firefox 58.0.2 (64 bits)

Hi,

I have created a custom field where the customer can specify his own reference for each order during check out,
this work well,

however I'm looking for a way to add this reference as a column into the customer order listing, next to order number column,
I know I should edit the order/listing.php file but I dont find how to recover and display the specified custom field,

in same way, I would like to have the "print invoice" button directly displayed in the order listing in a new column next to order number column,

thanks for help

(btw any news on Hikashop next release ? I'll need it for the new option of locking the billing adress)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5NDAzNi1hZGRpbmctY3VzdG9tLWZpZWxkLXRvLW9yZGVyLWxpc3Rpbmc/dG1wbD1tYXJrZG93bg==) 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")
- [ Away](/forum/user/63-nicolas)

Less More

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

8 years 8 months ago [\#289214](#289214) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Adding custom field to order listing](/forum/35-orders-management/894036-adding-custom-field-to-order-listing#289214 "-- HikaShop version -- : 3.3.0 business -- Joomla version -- : 3.8.5 -- PHP version -- : 7.1.14 -- Browser(s) name and version -- : Firefox 58.0.2 (64 bits)  Hi,  I have created a custom field where the customer can specify his own reference for each order during check out, this work well,  however I'm looking for a way to add this reference as a column into the customer order listing, next to order number column, I know I should edit the order/listing.php file but I dont find how to recover and display the specified custom field,  in same way, I would like to have the &quot;print invoice&quot; button directly displayed in the order listing in a new column next to order number column,  thanks for help  (btw any news on Hikashop next release ? I'll need it for the new option of locking the billing adress)")*

Hi,

Getting the value in the custom field is really easy.
You can use such code:
&lt;?php echo $row-&gt;XXX; ?&gt;
where XXX is the column name of your custom field.

For the link of the print invoice button, you can use such code: Code:

global $Itemid; $url_itemid = ''; if(!empty($Itemid)) { $url_itemid = '&amp;Itemid=' . $Itemid; } $url = 'order&amp;task=invoice&amp;order_id='.$row-&gt;order_id.$url_itemid; $token = hikaInput::get()-&gt;getVar('order_token'); if(!empty($token)) $url .= '&amp;order_token='.urlencode($token); echo hikashop_completeLink($url, true);

(next release is scheduled for mid march)

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

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

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

Less More

- Posts: 33
- Thank you received: 0
-
-

8 years 8 months ago -  8 years 8 months ago [\#289242](#289242) by [dylis](/forum/user/4744-dylis "View dylis's Profile")  Replied by *[dylis](/forum/user/4744-dylis "View dylis's Profile")* on topic *[Adding custom field to order listing](/forum/35-orders-management/894036-adding-custom-field-to-order-listing#289242 "-- HikaShop version -- : 3.3.0 business -- Joomla version -- : 3.8.5 -- PHP version -- : 7.1.14 -- Browser(s) name and version -- : Firefox 58.0.2 (64 bits)  Hi,  I have created a custom field where the customer can specify his own reference for each order during check out, this work well,  however I'm looking for a way to add this reference as a column into the customer order listing, next to order number column, I know I should edit the order/listing.php file but I dont find how to recover and display the specified custom field,  in same way, I would like to have the &quot;print invoice&quot; button directly displayed in the order listing in a new column next to order number column,  thanks for help  (btw any news on Hikashop next release ? I'll need it for the new option of locking the billing adress)")*

Thanks,

easy indeed for custom field, I was expecting something much more complicated,

havent included the invoice yet in orders listing , but I have installed the PDF invoice plugin and Im getting the following error when trying to generate confirmation email : Code:

The html tag [br] is not known by Html2Pdf not exists

as well, when the PDF invoice plugin is set to overide front-end or back-end, the invoice button doesnt work,

any idea where the problem is ?

Last edit: 8 years 8 months ago by [dylis](/forum/user/4744-dylis "View dylis's Profile").

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

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

Less More

- Posts: 33
- Thank you received: 0
-
-

8 years 8 months ago -  8 years 8 months ago [\#289248](#289248) by [dylis](/forum/user/4744-dylis "View dylis's Profile")  Replied by *[dylis](/forum/user/4744-dylis "View dylis's Profile")* on topic *[Adding custom field to order listing](/forum/35-orders-management/894036-adding-custom-field-to-order-listing#289248 "-- HikaShop version -- : 3.3.0 business -- Joomla version -- : 3.8.5 -- PHP version -- : 7.1.14 -- Browser(s) name and version -- : Firefox 58.0.2 (64 bits)  Hi,  I have created a custom field where the customer can specify his own reference for each order during check out, this work well,  however I'm looking for a way to add this reference as a column into the customer order listing, next to order number column, I know I should edit the order/listing.php file but I dont find how to recover and display the specified custom field,  in same way, I would like to have the &quot;print invoice&quot; button directly displayed in the order listing in a new column next to order number column,  thanks for help  (btw any news on Hikashop next release ? I'll need it for the new option of locking the billing adress)")*

I must precise,

the plugin does work when the customer paies by credit card,

it does not work when the customer paies by bank transfer, or anything that requiere admin action to confirm the order,

when admin try to confirm order then the error code given happens, and no mail is sent to customer

This message contains confidential information

Last edit: 8 years 8 months ago by [dylis](/forum/user/4744-dylis "View dylis's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5NDAzNi1hZGRpbmctY3VzdG9tLWZpZWxkLXRvLW9yZGVyLWxpc3Rpbmc/dG1wbD1tYXJrZG93bg==) 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")
- [ Away](/forum/user/63-nicolas)

Less More

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

8 years 8 months ago [\#289250](#289250) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Adding custom field to order listing](/forum/35-orders-management/894036-adding-custom-field-to-order-listing#289250 "-- HikaShop version -- : 3.3.0 business -- Joomla version -- : 3.8.5 -- PHP version -- : 7.1.14 -- Browser(s) name and version -- : Firefox 58.0.2 (64 bits)  Hi,  I have created a custom field where the customer can specify his own reference for each order during check out, this work well,  however I'm looking for a way to add this reference as a column into the customer order listing, next to order number column, I know I should edit the order/listing.php file but I dont find how to recover and display the specified custom field,  in same way, I would like to have the &quot;print invoice&quot; button directly displayed in the order listing in a new column next to order number column,  thanks for help  (btw any news on Hikashop next release ? I'll need it for the new option of locking the billing adress)")*

Hi,

In the information text area of your payment methods, you had written &lt;/br&gt; instead of &lt;br/&gt;
Because of that, the HTML2PDF library that the PDF invoice plugin uses couldn't properly analyze the HTML and it generated that error.
I've fixed the tag for you and it's working find now.

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

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

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

Less More

- Posts: 33
- Thank you received: 0
-
-

8 years 8 months ago [\#289251](#289251) by [dylis](/forum/user/4744-dylis "View dylis's Profile")  Replied by *[dylis](/forum/user/4744-dylis "View dylis's Profile")* on topic *[Adding custom field to order listing](/forum/35-orders-management/894036-adding-custom-field-to-order-listing#289251 "-- HikaShop version -- : 3.3.0 business -- Joomla version -- : 3.8.5 -- PHP version -- : 7.1.14 -- Browser(s) name and version -- : Firefox 58.0.2 (64 bits)  Hi,  I have created a custom field where the customer can specify his own reference for each order during check out, this work well,  however I'm looking for a way to add this reference as a column into the customer order listing, next to order number column, I know I should edit the order/listing.php file but I dont find how to recover and display the specified custom field,  in same way, I would like to have the &quot;print invoice&quot; button directly displayed in the order listing in a new column next to order number column,  thanks for help  (btw any news on Hikashop next release ? I'll need it for the new option of locking the billing adress)")*

oh, lol

thank you

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

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