Comments (3)
Reading the code I have seen this warning in the definition of basket_charge_incl_tax in Django-Oscar Project:
[oscar/apps/shipping/base.py line 76]
def basket_charge_incl_tax(self):
warnings.warn((
"Use the charge_incl_tax property not basket_charge_incl_tax. "
"Basket.basket_charge_incl_tax will be removed "
"in v0.7"),
DeprecationWarning)
return self.charge_incl_tax
# For backwards compatibility, keep an alias called "ShippingMethod"
ShippingMethod = Base
So I have found the method charge_incl_tax as a property of the class OrderAndItemCharges that extend the abstract class ShippingMethod [oscar/apps/shipping/models.py line 76]: I think the latest could overwrite the ShippingMethod seen above....
class ShippingMethod(models.Model):
.....
class OrderAndItemCharges(ShippingMethod):
...
@property
def charge_incl_tax(self):
"""
Return basket total including tax
"""
if self.free_shipping_threshold is not None and \
self._basket.total_incl_tax >= self.free_shipping_threshold:
return D('0.00')
charge = self.price_per_order
for line in self._basket.lines.all():
charge += line.quantity * self.price_per_item
return charge
So i think you have to call charge_incl_tax and let we know if it is ok (remember this is a property and not a function)
Excuse me but now I'm working on an other project
P.s. i see that basket_charge_incl_tax is called three times in the whole Django-Oscar-Paypal project
from django-oscar-paypal.
Thanks. See 9e9ce2a
from django-oscar-paypal.
Fixed in 16a13c5 on master, which will be part of 0.8 release.
from django-oscar-paypal.
Related Issues (20)
- Current release version (0.9.7) does not match repo version (0.10) HOT 3
- Shipping Charges Not Added to Paypal redirect
- int() argument must be a string, a bytes-like object or a number, not 'SimpleLazyObject' HOT 1
- Exception Value: Country matching query does not exist. HOT 1
- ImportError: cannot import name 'Application' HOT 2
- Any plan to upgrade to nvp to new api? HOT 7
- LookupError: No installed app with label 'communication'. HOT 3
- where to change the encoding option from Latin-1 to UTF-8 HOT 1
- Revamping the Express Documentation from the Oscar Upgrade HOT 3
- Why use this over django-paypal? HOT 2
- Edit getting started section to reflect the need to edit domain name in sites
- Reverse for 'paypal-payflow-detail' not found. 'paypal-payflow-detail' is not a valid view function or pattern name.
- Support Django 3.0 HOT 3
- Incorrect String value HOT 3
- Error 10605 - Receiving country does not support the transaction currency. On well configured shop.
- Support and documentation for Oscar 3.0 HOT 5
- No support for REST API HOT 1
- Log errors?
- Paypal Payment not integrated with Django Oscar HOT 2
- Support Django 4 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-oscar-paypal.