HikaShop Purchase Order payment plugin does not send email

  • Posts: 246
  • Thank you received: 9
  • Hikashop Business Hikashop Essential
6 years 2 weeks ago #300255

-- HikaShop version -- : 4.0
-- Joomla version -- : 3.9
-- PHP version -- : 7.1

I'm searching a long time but can't get it to work. I use 2 payment methodes. JDideal (ideal) so people pay directly. And I use HikaShop Purchase Order payment plugin (Incasso) where they have to fill in their info (bankaccountnumber).

But when they choose the HikaShop Purchase Order payment plugin (I set taht to confirmed in the plugin) their is no email send to the customer.

How can I solve tjis, I checked all settings and can't figure it out.


I'll keep on trying!
Attachments:

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
6 years 2 weeks ago #300258

Hi,

Add the code:

if($order->order_status != $this->payment_params->order_status)
			$this->modifyOrder($order->order_id, $this->payment_params->order_status, (bool)@$this->payment_params->status_notif_email, false);
after the line:
parent::onAfterOrderConfirm($order, $methods, $method_id);
in the file plugins/hikashoppayment/purchaseorder/purchaseorder.php and that should fix the problem.

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

  • Posts: 246
  • Thank you received: 9
  • Hikashop Business Hikashop Essential
6 years 2 weeks ago #300293

Hi Nicolas,

Thanks for your support.

What will happen after you'r having an upodated version off Hikashop? Will that change be deleted than? Or will it be added in next version?


I'll keep on trying!

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
6 years 2 weeks ago #300295

Hi,

If you can confirm that it all works fine, it will be included. Otherwise, we'll have to investigate further and include a better patch :)

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

  • Posts: 246
  • Thank you received: 9
  • Hikashop Business Hikashop Essential
6 years 2 weeks ago #300310

nicolas wrote: Hi,

If you can confirm that it all works fine, it will be included. Otherwise, we'll have to investigate further and include a better patch :)


Hi Nicolas,

I tested on testsite and live site. But is does not work. Admin receive the mail (that's good but was also without the change) but client does not get a mail.
public function onAfterOrderConfirm(&$order, &$methods, $method_id) {
		parent::onAfterOrderConfirm($order, $methods, $method_id);
		if($order->order_status != $this->payment_params->order_status)
			$this->modifyOrder($order->order_id, $this->payment_params->order_status, (bool)@$this->payment_params->status_notif_email, false);
		$this->removeCart = true;

		$this->information = $this->payment->payment_params->information;
		if(preg_match('#^[a-z0-9_]*$#i', $this->information)) {
			$this->information = JText::_($this->information);
		}


I'll keep on trying!
Last edit: 6 years 2 weeks ago by gasoline.

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
6 years 2 weeks ago #300312

Hi,

Thanks. I think it requires a second modification. Change the code:

$this->modifyOrder($order, $this->payment_params->order_status, $history, false);
to:
		$status = null;
		if(!$this->payment_params->status_notif_email)
			$status = $this->payment_params->order_status;
		$this->modifyOrder($order, $status, $history, false);
in that same file and it should help.

The following user(s) said Thank You: gasoline

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

  • Posts: 246
  • Thank you received: 9
  • Hikashop Business Hikashop Essential
6 years 1 week ago #300529

Hi Nicolas,

Seems to work now. I'v tested it and now put it on live site also.

Can you conform that this will be implemented in future updates? Otherwise I have to change that file by myself everytime.

Thanks,
Marc


I'll keep on trying!
Last edit: 6 years 1 week ago by Jerome. Reason: Please DO NOT full quote a previous message.

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
6 years 1 week ago #300534

Hi,

Yes. These have been added to HikaShop 4.0.1

The following user(s) said Thank You: gasoline

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

Time to create page: 0.071 seconds
Powered by Kunena Forum