Jump to content

Script to email customers with unpaid invoices


Seiya

Recommended Posts

Happy new year folks,

 

I'm about to write a php script which will use the dailycronjob hook to email customers who have placed an order but not paid and eventually cancel their order and deactivate their account if they dont respond. The basic logic is below and I would really appreciate any advice on whether Im missing anything out. I would need to add a field to the tblcustomers table or create a new table to record whether the customer had been sent the offer email and then

 

If order is older than 8 hours AND status of invoice = "unpaid" AND emailed_offer == false

then

Email customer with special offer and step by step instructions on how to pay

emailed_offer = true

log in system activity log

EndIf

 

If order is older than 48 hours AND status of invoice = "unpaid" AND emailed_offer == true

then

Cancel order

Close customer account

log in system activity log

EndIf

 

Thanks for any help :-P

Edited by Seiya
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated