Status Emails

  • Posts: 79
  • Thank you received: 2
8 years 7 months ago #234630

-- HikaShop version -- : 2.6.1.
-- Joomla version -- : 3.5.0.
-- PHP version -- : 5.4.38

I have a question about the status emails.
The problem i am having is that we are selling in europe with a lot of different payment types. We have a 3rd party that we are also dealing with. Normally when the payment is complete the status of the order will go to "Confirmed".
At that time an email will be send to the customer with an invoice attached.
Now for the 3rd party i have several emailaddresses which they also need to receive the invoice.
So i created another orderstatus called processing.
What i am trying to do is when i change the status to processing, that an email will be send to the 3rd parties including the invoice pdf as attachement but not to the customer.

So 2 problems. Attach invoice pdf to another status and send email to 3rd part on processing status without sending it to the customer.

Some of the things i found where from 3-4 years ago, so not for sure if this is still valid.

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

  • Posts: 79
  • Thank you received: 2
8 years 7 months ago #234645

I sovled the problem for sending the email to 3rd party on processing status by adding the below code to the bottom of the HTML part of the email.

<?php
if($data->order_status=='processing') {
$data->customer->user_email = 'email1,email2';
$data->customer->name = 'Some Name';
}
?>

Only thing now is that i need to attach the invoice also to this email (order status = Processing)

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

  • Posts: 79
  • Thank you received: 2
8 years 7 months ago #234735

I found this piece of code in the attachinvoice.php file.

//We only add the invoice to confirmed orders... and for the status notification e-mail only!
$config =& hikashop_config();
$confirmed = $this->params->get('status_override');
if(!empty($confirmed)){
$confirmed = explode(',',$confirmed);
}else{
$confirmed = array($config->get('order_confirmed_status','confirmed'));
}

How can i change this to make it that it will both attach the invoice to the confirmed status and the processing status?

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 7 months ago #234746

Hi,

In the settings of the PDF invoice plugin, you have a setting to enter the name of the order statuses (separated by a comma) for which the PDF should be included in the emails. So write the statuses you want there and that should do it.

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 7 months ago #234760

Thanks nicolas,
Thats and awesome feature. I didnt realize it was there.
Its working great thanks.

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

Time to create page: 0.048 seconds
Powered by Kunena Forum