Several issues with Confirmation email & Invoice

  • Posts: 79
  • Thank you received: 2
8 years 11 months ago #224232

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.6
-- PHP version -- : 5.4.38

Hi,
I ran into a couple of issues with the confirmation email and the invoice pdf.

1. I am trying to show the Subtotal without taxes in the confirmation email. I got it to work with the coupon and shipping code, but am lost on how to do it with the subtotal.

2. Trackingnumber. I created a custom field called "trackingnummer" in the order table. I want to list that in the confirmation email. I found the following code.

$fieldsClass = hikashop::get('class.field');
$fields = $fieldsClass->getFields('frontcomp',$data,'order','');
foreach($fields as $fieldName => $oneExtraField) {
	echo "\r\n".$fieldsClass->trans($oneExtraField->field_realname).' : '.$fieldsClass->show($oneExtraField,$data->$fieldName);
}

This code doesnt work for me. But also i would like to be able to seperately select where each field will be displayed in the email. I think this code would list ever custom field i would make after eachother.

3. For both the confirmation email and the invoice i would like to show the product code (SKU). How can i do this?

Thanks

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
8 years 11 months ago #224292

Hi,

1. You can find the subtotal into

$data->cart->order_subtotal

2. Because your custom field is a text custom field, you just need to display the content of the field ; you do not need to convert the value into a "title".
echo $data->cart->trackingnummer
Otherwise, I suppose that your order custom field is not available in the frontend but only in the backend ; which would explain why the field is not loaded (the first parameter "frontcomp" indicate the front end component).

3. There is a setting in HikaShop to show or not the product code.
The email read that setting to display (or not) the product code.
'ORDER_PRODUCT_CODE' => (bool)$config->get('show_code', false),

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 79
  • Thank you received: 2
8 years 11 months ago #224299

Thanks Jerome,
1 and 2 are working correctly now.
3. I have the product code turned on in the settings.
This all works fine, but the only problem i still have is the product code is not showing up in the pdf invoice thats attached to the email.
How can i get it to show the product code in the attached pdf invoice?

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

  • Posts: 82908
  • Thank you received: 13378
  • MODERATOR
8 years 11 months ago #224311

Hi,

Regarding the PDF invoice and the product_code, I invite you to read this thread:
www.hikashop.com/support/forum/integrati...-in-pdf-invoice.html

The following user(s) said Thank You: rkuiper

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

  • Posts: 79
  • Thank you received: 2
8 years 11 months ago #224358

Thank works great. Thank you.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum