Closed janbaykara closed 2 years ago
We'll need to figure out how to link a user to their shopify customer ID, if we want to pull in their purchase history.
Another option is to use webhooks / events and programmatically add books to the user account, independent of Shopify's customer history.
Ah, I guess what we can do is get_or_create
the Shopify customer via their email address, use that to get purchase history.
In #10, we're using dj-stripe and syncing Stripe products to Django for convenience. A limitation of stripe is that descriptions can only be 200~ characters long, but most LBC descriptions are longer than that.
As Anna and I discussed, it seems like it'd be nice for books to have some customisable content related to them. For example, we could relate resources directly to books, and in the future we might add other book-related features.
So proposing here to create a wagtail BookPage
model that mirrors products that have some kind of metadata identifying them as a book, with a dj-stripe Product item related to it.
Seems that currently, book purchases on the website are sometimes actually failing to process, so it will be good to compare the metrics on this one via an analytics funnel.
Implementation notes