Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Basket Offers are disappeared after Paypal payment (in preview step and in the Dashboard orders) #59

Closed
madEng84 opened this issue Dec 16, 2013 · 5 comments

Comments

@madEng84
Copy link

I'm using
Django-Oscar VERSION = 0.6 pre-alpha
Django-Oscar-Paypal branch #34 fo compatibility with Django-Oscar

The problem is that, after i have done a payment with Paypal, i lose offers on my frozen basket?
Anyone has resolved this issue? If it has been resolved in in the default branch could anyone tell me how to monkey patch in this Django-Oscar-Paypal version?
@codeinthehole can you help me?
I attach an image in which you can see at the top the cost with the discount and in the bottom the form with the price without discount.
In the dashboad, then, i see the order of that basket without the offers, too.
paypal_bug

Here the difference in dashboard:orders and dashboard:paypal views
paypal_bug2
paypal_bug3

@madEng84
Copy link
Author

madEng84 commented Jan 7, 2014

Hi @codeinthehole,
No suggestion on how to resolve this bug? I don't want to delete offers from my implementation...
Thank you and Regards

@madEng84
Copy link
Author

madEng84 commented Jan 7, 2014

This statement in preview.html is what I'm searching for?

{% comment %}
Regrettably, we need to duplicate the order_contents block from Oscar's core checkout/checkout/html template.
This is because we want to render the frozen basket details here not the current open basket. As of Oscar 0.5.1,
the basket middlware injects the current open basket into the template context which stops us from being able to
automatically render the frozen basket using the default template. This will be fixed in 0.6, after which we can
remove this block
{% endcomment %}

I think I have to implement a new version of the basket middleware for frozen basket on my own... Am I right?
I'm flipping out doing introspection in the code

@madEng84
Copy link
Author

madEng84 commented Jan 7, 2014

I resolved it, finally

@codeinthehole i have inserted the following method for the class SuccessResponseView

def apply_offers_to_basket(self, request, basket):
    if not basket.is_empty:
        Applicator().apply(request, basket)

And then i called it both in the get and in the post method...

Hope it helps anyone :>

@codeinthehole
Copy link
Contributor

Thanks for this - I'll make sure your changes gets merged and new release cut. I just need to finish Oscar 0.6 first.

@codeinthehole
Copy link
Contributor

Fixed in 7cd6c7e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants