Shopify's abandoned checkout email feature does not work when in use with the Shopify storefront API. This is a workaround to generate abandoned checkout emails using the Shopify admin API. It works standalone and with django-shopify-sync
pip install django-shopify-abandoned-checkout
Set the following settings
Override the html and txt email templates in
email/abandoned_checkout.txt. The context includes a Shopify Checkout object. See https://help.shopify.com/en/api/reference/orders/abandoned-checkouts
There are default templates to get started but they are not intended to be used as is.
This module includes a management command and celery task both named send_shopify_abandoned_checkouts. You may also call it directly or even extend the handler class.
from shopify_abandoned_checkout.utils import AbandonedCheckoutHandler handler = AbandonedCheckoutHandler() handler.process_abandoned_carts()
Sadly there is no demo shopify store to use for tests with a real backend. To test, enter your store credentials in sandbox/settings.py and then run