- Posts: 332
- Thank you received: 6
[SOLVED] Add discount code on order listing
- LukeDouglas
-
Topic Author
- Offline
Less
More
8 years 5 months ago - 8 years 5 months ago #293317
by LukeDouglas
[SOLVED] Add discount code on order listing was created by LukeDouglas
-- 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?
-- 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.
Please Log in or Create an account to join the conversation.
8 years 5 months ago #293318
by nicolas
Replied by nicolas on topic Add discount code on order listing
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:
<?php echo $row->order_discount_code; ?>
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.
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:
<?php echo $row->order_discount_code; ?>
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 or Create an account to join the conversation.
- LukeDouglas
-
Topic Author
- Offline
Less
More
- Posts: 332
- Thank you received: 6
8 years 5 months ago #293376
by LukeDouglas
Replied by LukeDouglas on topic [SOLVED] Add discount code on order listing
Nicolas,
Thanks. Worked like a charm!
Thanks. Worked like a charm!
Please Log in or Create an account to join the conversation.
Time to create page: 0.059 seconds