- Posts: 80
- Thank you received: 1
Order custom fields to be printed on an Invoice
14 years 7 months ago #40292
by seoweb
Order custom fields to be printed on an Invoice was created by seoweb
Hello,
May I have a sample of code which would allow me to have Order Custom Fields to be printed on an Invoice available at the backend within the Order details view.
Thank you
May I have a sample of code which would allow me to have Order Custom Fields to be printed on an Invoice available at the backend within the Order details view.
Thank you
Please Log in or Create an account to join the conversation.
14 years 7 months ago #40492
by nicolas
Replied by nicolas on topic Re: Order custom fields to be printed on an Invoice
You can do something like that (in the file invoice of the view order via the menu Display->Views):
Code:
$fieldsClass = hikashop_get('class.field');
$fields = $fieldsClass->getFields('backend',$this->order,'order');
if(!empty($fields)){
foreach($fields as $fieldName => $oneExtraField) {
?>
<tr>
<td class="key">
<?php echo $this->fieldsClass->getFieldName($oneExtraField);?>
</td>
<td>
<?php echo $this->fieldsClass->show($oneExtraField,@$this->order->$fieldName); ?>
</td>
</tr>
<?php
}?>
<?php
}
The following user(s) said Thank You: seoweb
Please Log in or Create an account to join the conversation.
14 years 7 months ago #40590
by seoweb
Replied by seoweb on topic Re: Order custom fields to be printed on an Invoice
Nikolas,
With a little modification to meet the requirements of the layout your code has been successfully implemented.
I think this could also be included in a standard version of HikaShop.
Thanx a lot!
With a little modification to meet the requirements of the layout your code has been successfully implemented.
I think this could also be included in a standard version of HikaShop.
Thanx a lot!
Please Log in or Create an account to join the conversation.
14 years 7 months ago #40767
by nicolas
Replied by nicolas on topic Re: Order custom fields to be printed on an Invoice
Why not yes.
Please Log in or Create an account to join the conversation.
Time to create page: 0.154 seconds