Attache PDF invoice not showing additional info

  • Posts: 356
  • Thank you received: 7
  • Hikashop Business
1 year 7 months ago #343919

-- 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.

Please Log in or Create an account to join the conversation.

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
1 year 7 months ago #343925

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:

<?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
			}
		} ?>
at the end of the plugins/hikashop/attachinvoice/attachinvoice/invoice.php for the PDF invoice plugin.

Please Log in or Create an account to join the conversation.

  • Posts: 513
  • Thank you received: 8
  • Hikashop Business
1 year 7 months ago #343937

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.

  • Posts: 513
  • Thank you received: 8
  • Hikashop Business
1 year 7 months ago #343938

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.078 seconds
Powered by Kunena Forum