Order custom fields hidden in email

  • Posts: 25
  • Thank you received: 0
9 years 2 months ago #243535

-- HikaShop version -- : 3.6
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.5

Hi i need to hide the order custom fields in the email creation template, the problem is that if i delete or comment the line of {VAR:ORDER_SUMMARY} the payment informatuon dissapear too and i need, i just need to hide the cutoms order fields thanks

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

  • Posts: 84233
  • Thank you received: 13675
  • MODERATOR
9 years 2 months ago #243551

Hi,

If you update to the latest version of HikaShop, there are specific options in the custom fields to control where the custom order fields should and should not display, including the emails.
So there is no need to change any code.

If you don't want to update, the you'll have to edit the "preload version" of the email, and remove the part of the code near the bottom related to the custom order fields:

$sep = '';
	if(hikashop_level(2)) {
		$fields = $fieldsClass->getFields('display:field_order_status_notification=1',$data,'order','');
		foreach($fields as $fieldName => $oneExtraField) {
			if(isset($data->$fieldName) && !isset($data->cart->$fieldName))
				$data->cart->$fieldName = $data->$fieldName;
			if(empty($data->cart->$fieldName))
				continue;
			echo $sep . $fieldsClass->trans($oneExtraField->field_realname).' : '.$fieldsClass->show($oneExtraField, $data->cart->$fieldName,'user_email');
			$sep = '<br />';
		}
	}

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

Time to create page: 0.061 seconds
Powered by Kunena Forum