Separate mails for shop owner and customer - no bcc

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: Separate mails for shop owner and customer - no bcc

Post by aimeos » 16 Apr 2020, 07:14

The processBatch() method is called when you execute the order delivery job controller in the scheduler task, so you have to decorate that value in order to send the e-mail after the payment was successful.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

Re: Separate mails for shop owner and customer - no bcc

Post by boettner » 29 Apr 2020, 13:05

and another follow-up on this one:
aimeos wrote: 22 Mar 2020, 10:53 For using templates, you can have a look at the XML deliver service provider as reference:
https://github.com/aimeos/aimeos-core/b ... ry/Xml.php
As far as I see this is available since 2019.07, right? Then we will do the long awaited update first.

Best
Robert.

daniel
Posts: 28
Joined: 27 Jul 2020, 13:22

Re: Separate mails for shop owner and customer - no bcc

Post by daniel » 05 Aug 2020, 11:28

Hi,
i also want to write a decorator that sends an Email to the Shop owner if a order was made (sending email if scheduler task for order/payment is executed), but i don't know where i have to place it and how it should set it up. Maybe you can help me showing your decorator. thanks.

boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

Re: Separate mails for shop owner and customer - no bcc

Post by boettner » 05 Aug 2020, 11:34

Hi,

I´m currently doing the 18 > 20 update and didn´t implement my own separate email yet. But this would be the location for the decorator class:
[your_aimeos_ext]/Resources/Private/Extensions/[your_aimeos_ext]/lib/custom/src/MShop/Service/Provider/Decorator/YourDecorator.php

Does that help?

daniel
Posts: 28
Joined: 27 Jul 2020, 13:22

Re: Separate mails for shop owner and customer - no bcc

Post by daniel » 05 Aug 2020, 12:49

hi,
thanks. And do i have to add for this decorator a plugin first or just add it to my Service (e.g. "PostPay")?

boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

Re: Separate mails for shop owner and customer - no bcc

Post by boettner » 05 Aug 2020, 12:50

No, there´s no separate Plugin necessary.

daniel
Posts: 28
Joined: 27 Jul 2020, 13:22

Re: Separate mails for shop owner and customer - no bcc

Post by daniel » 05 Aug 2020, 12:53

if i add my decorator like [your_aimeos_ext]/Resources/Private/Extensions/[your_aimeos_ext]/lib/custom/src/MShop/Service/Provider/Decorator/YourDecorator.php it is not available in the Services Providers Select (+). But if i add it to [your_aimeos_ext]/Resources/Private/Extensions/aimeos/ai-client-html/lib/custom/src/MShop/Service/Provider/Decorator/YourDecorator.php it is available in the selection of Providers

daniel
Posts: 28
Joined: 27 Jul 2020, 13:22

Re: Separate mails for shop owner and customer - no bcc

Post by daniel » 05 Aug 2020, 12:54

and when i use the second path and add the decorator in the checkout on the Website is shown: "Class "\Aimeos\MShop\Service\Provider\Decorator\Email" not available"
(YoutDecorator.php is named Email.php)

boettner
Advanced
Posts: 136
Joined: 09 Feb 2015, 17:49

Re: Separate mails for shop owner and customer - no bcc

Post by boettner » 05 Aug 2020, 13:04

I didn´t set this up for my own yet but maybe the Decorator pattern can only be used on existing Providers. So you need to set it up in .../MShop/Service/Provider/Delivery

Still placing it in [your_aimeos_ext]/Resources/Private/Extensions/[your_aimeos_ext] should be possible though.

Full path: [your_aimeos_ext]/Resources/Private/Extensions/[your_aimeos_ext]/lib/custom/src/MShop/Service/Provider/Delivery/Email.php

And it has to be a Provider class:

Code: Select all

<?php

/**
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
 * @copyright Metaways Infosystems GmbH, 2011
 * @copyright Aimeos (aimeos.org), 2015-2018
 * @package MShop
 * @subpackage Service
 */


namespace Aimeos\MShop\Service\Provider\Delivery;


/**
 * Manual delivery provider implementation.
 *
 * @package MShop
 * @subpackage Service
 */
class Email
	extends \Aimeos\MShop\Service\Provider\Delivery\Base
	implements \Aimeos\MShop\Service\Provider\Delivery\Iface
{
}

daniel
Posts: 28
Joined: 27 Jul 2020, 13:22

Re: Separate mails for shop owner and customer - no bcc

Post by daniel » 05 Aug 2020, 13:52

Hi, thanks for your help!

I still got the error "Class "\Aimeos\MShop\Service\Provider\Decorator\Email" not available"

Maybe there is a problem in my extension. I set the extDirs for my extension to "EXT:myext_name/Resources/Private/Extensions/myext_name_shop/" because i use this ext for other overwrites too.

In this folder i have "ai-html-client" with my template overwrites (which works perfect) and now a folder/file "myextname/lib/custom/src/MShop/Service/Provider/Delivery/Email.php"

Post Reply