- Posts: 46
- Thank you received: 3
Custom field missin in invoice
9 years 5 months ago - 9 years 5 months ago #268342
by montemama
Custom field missin in invoice was created by montemama
-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.4
Dear support team,
I have upgraded Hikashop to new version and there is one custom field missing in invoice now (I have a customization of invoice view - please, see attached). Custom field is called "fa"and contains custom invoice number
There were multiple issues with various custom fields after upgrade (they disappeared from frontend and backend), but I managed to solved everything except this one
There are other custom fields in invoice displaying correctly. I can find no differences in the options/settings for this custom field.
I can see the custom field value in order details and order listings, but it dissapeared from invoice.
Display > Custom fields > I have tried set to Yes everywhere, no difference.
Display custom item fields under System>Config>Display set to Yes.
I have tried to click on Check database - no difference.
Please advise. What else should I chceck?
Thanks!
-- Joomla version -- : 3.6.4
Dear support team,
I have upgraded Hikashop to new version and there is one custom field missing in invoice now (I have a customization of invoice view - please, see attached). Custom field is called "fa"and contains custom invoice number
There were multiple issues with various custom fields after upgrade (they disappeared from frontend and backend), but I managed to solved everything except this one
There are other custom fields in invoice displaying correctly. I can find no differences in the options/settings for this custom field.
I can see the custom field value in order details and order listings, but it dissapeared from invoice.
Display > Custom fields > I have tried set to Yes everywhere, no difference.
Display custom item fields under System>Config>Display set to Yes.
I have tried to click on Check database - no difference.
Please advise. What else should I chceck?
Thanks!
Last edit: 9 years 5 months ago by montemama.
The following user(s) said Thank You: OA
Please Log in or Create an account to join the conversation.
9 years 5 months ago #268383
by nicolas
Replied by nicolas on topic Custom field missin in invoice
Hi,
Well, the issue is that you're missing the whole code to display custom order fields on the invoice:
You apparently removed it form the view file at one point.
Well, the issue is that you're missing the whole code to display custom order fields on the invoice:
Code:
$fieldsClass = hikashop_get('class.field');
$fields = $fieldsClass->getFields('display:invoice=1',$this->order,'order');
if(!empty($fields)){ ?>
<tr>
<td>
<fieldset class="hikashop_order_custom_fields_fieldset">
<legend><?php echo JText::_('ADDITIONAL_INFORMATION'); ?></legend>
<table class="hikashop_order_custom_fields_table adminlist" cellpadding="1" width="100%">
<?php foreach($fields as $fieldName => $oneExtraField) {
?>
<tr class="hikashop_order_custom_field_<?php echo $fieldName;?>_line">
<td class="key">
<?php echo $this->fieldsClass->getFieldName($oneExtraField);?>
</td>
<td>
<?php echo $this->fieldsClass->show($oneExtraField,@$this->order->$fieldName); ?>
</td>
</tr>
<?php
}?>
</table>
</fieldset>
</td>
</tr>
<?php
}
Please Log in or Create an account to join the conversation.
9 years 5 months ago #268422
by montemama
Replied by montemama on topic Custom field missin in invoice
Hi Nicolas,
I would appreciate some hint - where should I insert this piece of code? Which part of php?
I tried several possibilities, but without result - I get just a white page when I try to create invoice.
Thanks in advance for your help!
I would appreciate some hint - where should I insert this piece of code? Which part of php?
I tried several possibilities, but without result - I get just a white page when I try to create invoice.
Thanks in advance for your help!
The following user(s) said Thank You: OA
Please Log in or Create an account to join the conversation.
9 years 5 months ago - 9 years 5 months ago #268428
by OA
Replied by OA on topic Custom field missin in invoice
Hello,
I had the same problem I fixed this with te given code. maybe its a bug?
Well I placed the code in in the main if statement of : if($this->invoice_type=='full'){ ...... } after the first check: if(!empty($fields)){ ?>.... <?php> }
I added a screenshot for better view. It helped in my case.
I had the same problem I fixed this with te given code. maybe its a bug?
Well I placed the code in in the main if statement of : if($this->invoice_type=='full'){ ...... } after the first check: if(!empty($fields)){ ?>.... <?php> }
I added a screenshot for better view. It helped in my case.
Last edit: 9 years 5 months ago by OA.
The following user(s) said Thank You: montemama
Please Log in or Create an account to join the conversation.
9 years 5 months ago #268432
by montemama
Replied by montemama on topic Custom field missin in invoice
Thank you for your effort Nicolas and OA, but I am completely lost 
My code is customized and I really do not know where to insert it. I tried again, but no result.
My php code is attached to first post (txt). I would be sooo happy and thankfull if you could send me my corrected php.
My code is customized and I really do not know where to insert it. I tried again, but no result.
My php code is attached to first post (txt). I would be sooo happy and thankfull if you could send me my corrected php.
Please Log in or Create an account to join the conversation.
9 years 5 months ago #268423
by nicolas
Replied by nicolas on topic Custom field missin in invoice
Hi,
You can put it before or after that code:
JPluginHelper::importPlugin('hikashop');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onAfterOrderProductsListingDisplay', array(&$this->order, 'order_back_invoice'));
Please understand that this is customization work. Please contact the developer who made the changes to the view if you can't do it yourself.
You can put it before or after that code:
JPluginHelper::importPlugin('hikashop');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onAfterOrderProductsListingDisplay', array(&$this->order, 'order_back_invoice'));
Please understand that this is customization work. Please contact the developer who made the changes to the view if you can't do it yourself.
Please Log in or Create an account to join the conversation.
9 years 5 months ago #268471
by montemama
Replied by montemama on topic Custom field missin in invoice
YES! I did it! I am so happy that I fixed it! 
Thank you for your help, Nicolas and OA!
Thank you for your help, Nicolas and OA!
Please Log in or Create an account to join the conversation.
9 years 3 months ago #273758
by JIK
Replied by JIK on topic Custom field missin in invoice
Using Hikashop 3.0.1 / Joomla 3.7.3
I have several custom fields that are in the "item" table. In their setup, under the heading "DISPLAY", I have set the parameters on each to "Invoice=YES". Following a HS upgrade, these fields are not showing on the invoice.
I did have a customization in the invoice.php file (to include the customer's email address), however I removed it. My invoice.php now is per the attachment. I thought that removing customization reverted the code back to the core hikashop code. Is that not the case?
I tried to insert the code mentioned above into invoice.php but it made no difference.
What exactly should the invoice.php code have such that the item custom fields show on the invoice?
Thanks.
I have several custom fields that are in the "item" table. In their setup, under the heading "DISPLAY", I have set the parameters on each to "Invoice=YES". Following a HS upgrade, these fields are not showing on the invoice.
I did have a customization in the invoice.php file (to include the customer's email address), however I removed it. My invoice.php now is per the attachment. I thought that removing customization reverted the code back to the core hikashop code. Is that not the case?
I tried to insert the code mentioned above into invoice.php but it made no difference.
What exactly should the invoice.php code have such that the item custom fields show on the invoice?
Thanks.
Please Log in or Create an account to join the conversation.
9 years 3 months ago #273760
by nicolas
Replied by nicolas on topic Custom field missin in invoice
Hi,
There were some bugs with custom item fields in HikaShop 3.0.1.
Updating to HikaShop 3.1.1 with the invoice.php view file of the 3.1.1 would fix that.
The line:
$itemFields = $this->fieldsClass->getFields($item_type,$product,'item');
in your invoice.php should actually be:
$itemFields = $this->fieldsClass->getFields($type,$product,'item');
like it is on our end with the 3.1.1 but another change might be required (there were several patches added for custom item fields).
There were some bugs with custom item fields in HikaShop 3.0.1.
Updating to HikaShop 3.1.1 with the invoice.php view file of the 3.1.1 would fix that.
The line:
$itemFields = $this->fieldsClass->getFields($item_type,$product,'item');
in your invoice.php should actually be:
$itemFields = $this->fieldsClass->getFields($type,$product,'item');
like it is on our end with the 3.1.1 but another change might be required (there were several patches added for custom item fields).
The following user(s) said Thank You: JIK
Please Log in or Create an account to join the conversation.
9 years 3 months ago - 9 years 3 months ago #274182
by Uniweb
Replied by Uniweb on topic Custom field missin in invoice
Hi
when i go to invoice on orders my Custom field missin in invoice.
I am ringing - HikaShop 3.1.1 - Joomla 3.7.2...
Where do i find the invoice .php file so i can insert the above code so when i show invoice the custom fields are there...
Thanks for you help
when i go to invoice on orders my Custom field missin in invoice.
I am ringing - HikaShop 3.1.1 - Joomla 3.7.2...
Where do i find the invoice .php file so i can insert the above code so when i show invoice the custom fields are there...
Thanks for you help
Last edit: 9 years 3 months ago by Uniweb.
Please Log in or Create an account to join the conversation.
9 years 3 months ago #274188
by nicolas
Replied by nicolas on topic Custom field missin in invoice
Hi,
You can edit all the view files of HikaShop in the menu Display>Views.
So go there and add that change to your custom view file if it has been customized.
Otherwise, change that the display settings of your custom field are configured properly in the menu Display>Custom fields.
You can edit all the view files of HikaShop in the menu Display>Views.
So go there and add that change to your custom view file if it has been customized.
Otherwise, change that the display settings of your custom field are configured properly in the menu Display>Custom fields.
Please Log in or Create an account to join the conversation.
9 years 2 months ago #274486
by Uniweb
Replied by Uniweb on topic Custom field missin in invoice
Hi Nicolas
Thanks for your help that fixed my problem...
Thanks for your help that fixed my problem...
Please Log in or Create an account to join the conversation.
Time to create page: 0.236 seconds