Additional information and datepicker missing on invoice

  • Posts: 1
  • Thank you received: 0
3 years 4 months ago #326188

-- HikaShop version -- : 4.4.0. business
-- Joomla version -- : 3.9.22
-- PHP version -- : 7.4.12
-- Browser(s) name and version -- : Firefox 82.0.3
-- Error-message(debug-mod must be tuned on) -- : Filled in "Additional information" and "datepicker" in order, not show on generated invoice or mail.

Hi,

When ordering in the shop there is the option additional information and datepicker to fill in at the end of the order.
After that there should be a invoice with this information on it, that does not happen.
Products, prices,adresses,paymethod, transportmethod everything okay and present on the invoice, except 2 important info fields. What do i miss here?
It looks like the program is cutting order information of the bottom of the invoice document.

Thank you in advance,
Dennis

Attachments:

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
3 years 4 months ago #326190

Hi,

I would recommend first to check the settings page of your custom field via the menu Display>Custom fields. In it, you'll find several display settings including one for the display on the invoice. So you need to make sure that this setting is enabled or the field won't appear on the invoice.
Also, If you're using an old version (from 5 years ago or more) of the PDF invoice plugin, it's possible that it doesn't contain the additional code we added to it to support these display settings.
In the file plugins/hikashop/attachinvoice/attachinvoice/invoice.php, you have 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
			}
		} ?>
which handle the display of the custom order fields. So please check that you have this code (near the end of the file).

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

Time to create page: 0.058 seconds
Powered by Kunena Forum