Hello everyone.

I'm trying to implement eshop using django ecommerce. Everything seems to 
go nice and smooth after reading documentation and going through code in 
repo :)
But one thing is big stopper for using Oscar on my current project - it's 
required email field for User model. Is there any way to make it optional?
I'm not using Oscar's views for catalogue. Instead only API with some Vue 
and Nuxt on frontend, but this particular case is something I can't solve.

Use case:
User comes to site, finds product he likes. Instead of adding it to basket 
he clicks "Buy in 1-click". Popup appears asking his phone number. That's 
the only thing required to make purchase.

I see two solutions here:
1. 
Create separate model for such purchases which won't go through the full 
funnel and won't be stored as actual purchase. Add view for it in Dashboard 
so admins could work with such unquiries.

Pros: it's separate process I have full control of, not messing with actual 
Oscar models.
Cons: Some magic should be written to transfer such order from inquiry to 
actual Order model with corresponding Basket and line items models when 
customer will be contacted and confirms his order. In this case I still 
need to provide user email.

2.
Add one item to basket, do checkout with only phone number. Generate email 
randomly on backend with specific domain name. Add checks for this domain 
name in all business logic so no emails sent.

Pros: keeping everything inside Oscar from the beginning. All data is in 
dashboard from the very beginning and is part of all sales.
Cons: email address constructing. Smells bad :)

As you can see even with first approach some magic with email should be 
done because there is no way to create User in oscar without email.

Can you please suggest the best approach here or maybe there is 
not-so-obvious but good approach to skip email for User model?

-- 
https://github.com/django-oscar/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
--- 
You received this message because you are subscribed to the Google Groups 
"django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-oscar+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-oscar.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/django-oscar/a66d94d7-dac6-445e-ad9e-99265ce84440%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to