- Posts: 33
- Thank you received: 0
Adding custom field to order listing
8 years 6 months ago #289204
by dylis
Adding custom field to order listing was created by dylis
-- 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)
-- 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 or Create an account to join the conversation.
8 years 6 months ago #289214
by nicolas
Replied by nicolas on topic Adding custom field to order listing
Hi,
Getting the value in the custom field is really easy.
You can use such code:
<?php echo $row->XXX; ?>
where XXX is the column name of your custom field.
For the link of the print invoice button, you can use such code:
(next release is scheduled for mid march)
Getting the value in the custom field is really easy.
You can use such code:
<?php echo $row->XXX; ?>
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 = '&Itemid=' . $Itemid;
}
$url = 'order&task=invoice&order_id='.$row->order_id.$url_itemid;
$token = hikaInput::get()->getVar('order_token');
if(!empty($token))
$url .= '&order_token='.urlencode($token);
echo hikashop_completeLink($url, true);
The following user(s) said Thank You: dylis
Please Log in or Create an account to join the conversation.
8 years 6 months ago - 8 years 6 months ago #289242
by dylis
Replied by dylis on topic Adding custom field to order listing
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 :
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 ?
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 6 months ago by dylis.
Please Log in or Create an account to join the conversation.
8 years 6 months ago - 8 years 6 months ago #289248
by dylis
Replied by dylis on topic Adding custom field to order listing
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
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 6 months ago by dylis.
Please Log in or Create an account to join the conversation.
8 years 6 months ago #289250
by nicolas
Replied by nicolas on topic Adding custom field to order listing
Hi,
In the information text area of your payment methods, you had written </br> instead of <br/>
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.
In the information text area of your payment methods, you had written </br> instead of <br/>
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
Please Log in or Create an account to join the conversation.
8 years 6 months ago #289251
by dylis
Replied by dylis on topic Adding custom field to order listing
oh, lol
thank you
thank you
Please Log in or Create an account to join the conversation.
Time to create page: 0.166 seconds