​I guess my real problem is how to combine multiple views from different
apps.

I would start with adding a new URL to the app.py of the checkout app and
assigning a customized view - OneClickCheckOut to it.
For the view, some ideas I have in mind right now are 1. the view class
imports Oscar classes relevant to the checkout process and create instances
to simulate the add to cart to payment process. However, this solution
seems fairly hard-coded and reinvented the wheels. Option 2, the view class
inherits from classes involved in the checkout flow, but it will be a
subclass of more than five classes and definitely looks ugly and cause
issues later.

I think a better way to handle this is to define a checkout flow. In my
case, add to cart, shipping and checkout preview can be simply skipped. The
flow can simplified to click purchase - payment - redirect.

Any advice will be welcomed.

On Mon, May 14, 2018 at 6:27 PM, Kamil <harry6...@gmail.com> wrote:

> That sounds fairly easy. Start with adding a new view, which can just
> re-use the relevant code from the regular checkout workflow, minus things
> you don't need (no shipping address, no shipment, etc). Since the regular
> checkout process already skips unnecessary steps, perhaps all you need is
> to redirect to the payment summary page after adding the item to the basket.
> K.
>
> --
> https://github.com/tangentlabs/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/62f9cf56-d023-45c4-a5f3-ce3e56b67f7a%40googlegroups.com
> <https://groups.google.com/d/msgid/django-oscar/62f9cf56-d023-45c4-a5f3-ce3e56b67f7a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Yi

-- 
https://github.com/tangentlabs/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/CALA4aQk15r%2BvYV_4ce0c2X3p5wUrr1%3DdxEcKqdb7k4dJqoWizQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to