Attache PDF invoice not showing additional info
4 years 1 month ago #343919
by grayt7
Attache PDF invoice not showing additional info was created by grayt7
-- HikaShop version -- : 4.6.1
-- Joomla version -- : 3.10
-- PHP version -- : 7.4
Hi,
I have two custom fields on the order table. I have selected them to appear on the invoice but they are not showing. I'm using the attache invoice plugin. I have removed any overrides but still nothing is shown?
Many thanks.
-- Joomla version -- : 3.10
-- PHP version -- : 7.4
Hi,
I have two custom fields on the order table. I have selected them to appear on the invoice but they are not showing. I'm using the attache invoice plugin. I have removed any overrides but still nothing is shown?
Many thanks.
Please Log in or Create an account to join the conversation.
4 years 1 month ago #343925
by nicolas
Replied by nicolas on topic Attache PDF invoice not showing additional info
Hi,
There are two possibilities:
- You have an old version of the PDF invoice plugin which doesn't support that invoice display setting as it was added a few years back (5 ?)
- You have an override file of the invoice file of the plugin. Check if you have the file media/com_hikashop/plugins/invoice.php
This file won't be updated when you update the plugin so you might have it based on an old version of the invoice.php file of the plugin which is why it doesn't take into account the setting of the custom field.
The custom order fields are displayed by the code:
at the end of the plugins/hikashop/attachinvoice/attachinvoice/invoice.php for the PDF invoice plugin.
There are two possibilities:
- You have an old version of the PDF invoice plugin which doesn't support that invoice display setting as it was added a few years back (5 ?)
- You have an override file of the invoice file of the plugin. Check if you have the file media/com_hikashop/plugins/invoice.php
This file won't be updated when you update the plugin so you might have it based on an old version of the invoice.php file of the plugin which is why it doesn't take into account the setting of the custom field.
The custom order fields are displayed by the code:
Code:
<?php if(hikashop_level(2) && !empty($fields['order'])){
ob_start();
foreach($fields['order'] as $fieldName => $oneExtraField) {
if(!@$oneExtraField->field_frontcomp || empty($order->$fieldName)) continue;
?>
<tr class="hikashop_order_custom_field_<?php echo $fieldName;?>_line">
<td class="key">
<?php echo $fieldsClass->getFieldName($oneExtraField);?>
</td>
<td>
<?php echo $fieldsClass->show($oneExtraField,$order->$fieldName,'user_email'); ?>
</td>
</tr>
<?php
}
$additionalInfo = ob_get_clean();
if(!empty($additionalInfo)){ ?>
<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 echo $additionalInfo; ?>
</table>
</fieldset>
<br/>
<?php
}
} ?>
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 606
- Thank you received: 13
4 years 1 month ago #343937
by mohairbears
Replied by mohairbears on topic Attache PDF invoice not showing additional info
Hi I have the same issue, just updated to the new version? on Joomla 4 all lastest updates in Hikashop and Joomla
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 606
- Thank you received: 13
4 years 1 month ago #343938
by mohairbears
Replied by mohairbears on topic Attache PDF invoice not showing additional info
sorted this, in J3 in Custom Fields, there is a setting, display invoice, this is set to no, in J4 it has to be yes.
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.184 seconds