Queued Emails - Ideas and Chat

Open to all! Ask other shopowners for help.
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Queued Emails - Ideas and Chat

Post by burt »

I haven't looked at the Keys system for years, but IIRC that is for customers to do things without having to login - ie, they get sent a Key which allows them to do stuff. I can't see a reason why that could not be integrated into the Queued Emails system - obviousy would take some hardcore coding, so it might not be worth the cost.

The Queued Emails system takes care of Recover Carts;
Cart Reminder
Schedules email for X Interval after the Customer added product to cart but did not checkout
But any carts created PRIOR to installation of Queued Emails would be ignored by the system until that Customer logs in. Whereas the Main Recover Carts addon takes care of older carts. Again, there is no reason why Queued Emails could not look at older carts and place emails into the Queue (another matter of cost vs is it worth it).
Email the shop owner when stock count goes below xxx - so they can reorder?
The system is all about emails to the Customer.
Email customers when new product is added / or by time say once a month / quarter?
The only customers who could (! ethically !) receive this would be those who subscribe to "global notifications", which is, I think, very few in most shops. Try running:

select count(*) as counted from customers_info where global_product_notifications = 1

and see what that number is...that'll tell you if it's worth the cost/effort etc of coding it up.
I am not here to build for you.
I am here to build with you. Let's help each other.


Join The Code Co-op to get access to your library in the Code Co-op Forum
BatteryTrader
Contributor
Posts: 153
Joined: Thu Apr 11, 2024 7:18 am
Phoenix Version: 1.1.0.3
Has thanked: 3 times
Been thanked: 17 times

Re: Queued Emails - Ideas and Chat

Post by BatteryTrader »

Been playing with the queues

The no-checkout, which puts a item in the queue for a person who did not complete does not seem to be able to handle a customer who then checkouts out as a guest as its still in the queue.

Now I hate guest checkout for so many reasons, but the clients seem to like it.

PHP8.3
1.1.0.3
PWA_pheonix_5
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Queued Emails - Ideas and Chat

Post by burt »

If the guest checkout does not have customer_id, which I assume it doesn't as it's "guest" based...there's no way to line up scheduled emails against customer_id. You have two options;

1. change the outgoing emails system to work by email address.
or
2. change the guest system to use somehow set customer_id if the "guest" email matches an existing customers email.

Note that I have never used the "guest checkout", so it might be worth exploring on that addons support thread.
I am not here to build for you.
I am here to build with you. Let's help each other.
BatteryTrader
Contributor
Posts: 153
Joined: Thu Apr 11, 2024 7:18 am
Phoenix Version: 1.1.0.3
Has thanked: 3 times
Been thanked: 17 times

Re: Queued Emails - Ideas and Chat

Post by BatteryTrader »

Th Order_thanks queued email, which as standard is set at 4 hours, I expected to be removed from the queue if the order had been dispatched in the meantime.

Now I expect that the function

Code: Select all

   public static function remove() {
      // should a request be deleted?
      // feedback needed
      return null;
    }


is the one that controls that
and would need to be adapted to something like

Code: Select all

    public static function remove() {
      if ('orderstatus = dispatch, or dispatch-r or dispatch-k (something I am trying out to split the customer / order types) {
        $GLOBALS['db']->query("DELETE FROM outgoing WHERE customer_id = '" . (int)$_SESSION['customer_id'] . "' AND slug = 'no_checkout'");
      }
    }
Was hoping to bget a better clue from some of the other modules, but unable to yet.

Would appreciate help with rewriting the line to make it usable.

Regards

David
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Queued Emails - Ideas and Chat

Post by burt »

Why not just setit to 5 minutes. Or one hour, or whatever.
Or even just delete the module?

If either of those doesn't suit you might create a hook which looks at order status, or it could be a tickbox "delete order_thanks" as part of the order update... If order status = X (in your case "dispatch"?) delete the order_thanks.

Side Note;
I don't see any reason why an order_thanks email (if worded in the correct way) could not go out after a dispatch email. The "thanks" doesn't have to be the first email someone gets, right? It could be used to re-inforce customer satisfaction, as you've "gone out of your way" to craft a special email for them even at 3am. Etc etc.
I am not here to build for you.
I am here to build with you. Let's help each other.
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Queued Emails - Ideas and Chat

Post by burt »

In Core Code from v1.1.0.5 onwards, Queued Emails is now working in multiple languages (internationalisation aka i18n), so if your shop runs multiple languages, you'll need to;

1. update your templates by translating them to relevant languages
- admin > outgoing > templates

If you have any extra Scheduler modules other than the three that are in Core Code, you will need to update them for i18n, this is quite simple and at the least requires one line of code to be added as per this;
- https://github.com/CE-PhoenixCart/Phoen ... ck.php#L22
I am not here to build for you.
I am here to build with you. Let's help each other.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply