Deactivate sending of certain mails in Shopware 5 - php

For a shop we need to deactivate most of Shopware's default mails, such as order confirmation, bill, etc. The only ones we need to keep are the ones about user management (profile created, forget password).
I found this answer that shows how to disable all mails.
But nothing else, searched SO, Shopware forum (German and English), a lot of people having the same need but no solution posted anywhere.

You can deactivate the order confirmation email in backend using the "send order mail" field under the checkout settings like described in the documentation.
Most of the other emails are triggered manually on e.g. order status change or cron jobs.

Related

Delay WooCommerce order processing mail

I have a question regards delaying a WooCommerce Out of the box email notifications. We use WooCommerce Shipment tracking and also Dokan plugins. And therefore we also have suborders: A suborder has also a tracking code. We provide that information in the parent order processing mail.
When a new order comes in, the shipment tracking is empty. I guess this is because the mail is sent too fast. I think this because of the reason, that when I send the processing mail from the admin backend manually, then I have all info. So the code is fully working. I only have the problem with the automatically sent mail from WooCommerce when a new order comes in.
I found this but there is no time delay: Send an Email notification to the admin for pending order status in WooCommerce
Also, I found this plugin code on Github from Damien Carbery.
But I don't know if I can just copy the code and make changes to it?
This is the part that I should change maybe:
'woocommerce_order_status_pending_to_processing' => array( 'WC_Email_New_Order', $this->default_defer_time ),

Drupal MailChimp Ecommerce Recover Abandoned Cart

I am trying to integrate MailChimp to my Drupal 7 site. But I am facing some problems right now.
What I can do:
I can subscribe new users to my MailChimp list.
I can send order data to MailChimp when a customer completes their purchase.
I can send Welcome Message campaign email.
I can send First Purchase campaign email.
I can send follow up mails for these campaign mails (for example; send mail after 1 hour if a subscriber receives First Purhcase email).
What I can not do:
I can not send Abandoned Cart campaign emails.
I can not show product info on ecommerce mails.
I can not see Cart data when I make a POST request to usX.api.mailchimp.com/3.0/ecommerce/stores/{store_id}/carts
I would like to give more info if needed.
edit: fixed grammar
edit: I can see Cart data when I make a POST request to usX.api.mailchimp.com/3.0/ecommerce/stores/{store_id}/carts. To achieve that, I have just deleted cart data in my Drupal 7 commerce website. So it kind of worked like a soft restart.
I have found the issue and fixed it.
For future readers;
The issue was that, MailChimp eCommerce module is not sending the checkout_url(path to the cart) out of the box. Although it is not required to sent checkout_url while POSTing, it is mandatory if you want to use Abandoned Cart email. In order to fix that problem, there are two patches that needs to applied.
Patch #1
Patch #2
original link for the solution
Hope this helps someone :)

The same newsletter mail randomly sent to the registered customers

My website built in bespoke n-retail coding based on PHP. Currently, I am having an issue whereby the same newsletter message randomly sent to my registered customers.
Where in the file manager I need to check to find the issue. It must be a bug somewhere.
There are 2 possibility
1. Newsletter is send from admin side
2. Cron job
You need to check both files so u get then bug, also provide more information so we can help you.

WooCommerce Hook before "New Order"-Mail is sent

During my WooCommerce order, the user selects an image that gets uploaded to the server. Now I need to edit this image (resize, trim etc. with ImageMagick) BEFORE the "new Order" emails are sent, because I attach this image to these emails.
I tried the payment_complete hook, but this one is too late, the mails are already sent. I also thought about doing it in the mail templates, but it only needs to be done once, so it has to especially be before the mails are sent out.
Of course it should happen on the server after the "thank you" page, the user shouldn't have to wait for this processing.
Edit: The hook should deliver the order id because I need to access the order items.
Where can I insert/hook my code to achieve this?
Thank you!
Well the new order emails are triggered to run on the woocommerce_order_status_pending_to_processing_notification and woocommerce_order_status_pending_to_on-hold_notification hooks, with default (10) priority.
Therefore, you should be able to run your code on the same hooks with a lower priority (say, 5).
Failing that, you could skip the notification and just focus on the order status change, so the following hooks:
woocommerce_order_status_pending_to_processing and woocommerce_order_status_pending_to_on-hold

Disable customer in Magento

I want to include to the administrator the option to disable login accounts, no data would be erased from the account, but if would be disabled for users not using it more, once cleared, the user would not notice any newsletters or anything else, just one last mail notifying the deactivating your account.
This is an interesting one. I've looked into this previously, and there is an is_active flag on the customer database record, but it is not accessed or written anywhere by the core Magento code. In order to achieve this requirement, you'll need to override the Mage_Customer_AccountController to check the value of this field inside loginPostAction() and then to make that field visible within the adminhtml Customer blocks.
I'm a little nervous about implementing that code as it bothers me that Varien would include the field but not utilise it at all. I'd be interested in others' thoughts about this.
HTH,
JD
Or, you could use this free extension from Magento Connect.
magentocommerce (deadlink) Customer Activation Extension
edit: Github project

Categories