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

#   \[SOLVED\] Add discount code on order listing

##

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

Less More

- Posts: 332
- Thank you received: 6
-
-

8 years 5 months ago -  8 years 5 months ago [\#293317](#293317) by [LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")  *[\[SOLVED\] Add discount code on order listing](/forum/36-reports-statistics/894846-solved-add-discount-code-on-order-listing#293317 "-- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 7.2.5 -- Browser(s) name and version -- : various, all updated - Chrome is primary  I would like to have the discount code added to the order listing page, next to the Partner ID on the right side. However, I am having difficulty in finding the 'view'. I looked at 'listing' but could not find the &quot;order&#95;partner&#95;id&quot; field on the page. Can you tell me what view I need to edit?")* was created by *[LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")*

-- HikaShop version -- : 3.4.0
-- Joomla version -- : 3.8.8
-- PHP version -- : 7.2.5
-- Browser(s) name and version -- : various, all updated - Chrome is primary

I would like to have the discount code added to the order listing page, next to the Partner ID on the right side. However, I am having difficulty in finding the 'view'. I looked at 'listing' but could not find the "order_partner_id" field on the page. Can you tell me what view I need to edit?

Last edit: 8 years 5 months ago by [LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM2LXJlcG9ydHMtc3RhdGlzdGljcy84OTQ4NDYtc29sdmVkLWFkZC1kaXNjb3VudC1jb2RlLW9uLW9yZGVyLWxpc3Rpbmc/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: 86555
- Thank you received: 14304
-
-

8 years 5 months ago [\#293318](#293318) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add discount code on order listing](/forum/36-reports-statistics/894846-solved-add-discount-code-on-order-listing#293318 "-- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 7.2.5 -- Browser(s) name and version -- : various, all updated - Chrome is primary  I would like to have the discount code added to the order listing page, next to the Partner ID on the right side. However, I am having difficulty in finding the 'view'. I looked at 'listing' but could not find the &quot;order&#95;partner&#95;id&quot; field on the page. Can you tell me what view I need to edit?")*

Hi,

It's indeed the file "listing" of the view "order" that you want to edit. Make sure that you're editing it for your backend template and not your front end template as otherwise, it would be the order history of the customer on the frontend you're editing.
You can use such code:
&lt;?php echo $row-&gt;order_discount_code; ?&gt;
Note however that the partner information isn't there. It's added dynamically by the HikaShop affiliate plugin thanks to the triggers of HikaShop.
If you really want to add it to the partner column, you would have to add your code in the function showField of the file plugins/system/hikashopaffiliate/hikashopaffiliate.php
But I would recommend adding it to order/ listing.php view file, in another column. Otherwise, you'll have to reapply your change after each update of HikaShop.

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

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

Less More

- Posts: 332
- Thank you received: 6
-
-

8 years 5 months ago [\#293376](#293376) by [LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")  Replied by *[LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")* on topic *[\[SOLVED\] Add discount code on order listing](/forum/36-reports-statistics/894846-solved-add-discount-code-on-order-listing#293376 "-- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 7.2.5 -- Browser(s) name and version -- : various, all updated - Chrome is primary  I would like to have the discount code added to the order listing page, next to the Partner ID on the right side. However, I am having difficulty in finding the 'view'. I looked at 'listing' but could not find the &quot;order&#95;partner&#95;id&quot; field on the page. Can you tell me what view I need to edit?")*

Nicolas,

Thanks. Worked like a charm!

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

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