Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
ecommerce
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
ecommerce
Commits
c84ea56f
Commit
c84ea56f
authored
Apr 28, 2015
by
Renzo Lucioni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Be consistent about not requiring shipping
parent
374db800
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ecommerce/extensions/api/data.py
+2
-2
ecommerce/extensions/payment/views.py
+2
-2
No files found.
ecommerce/extensions/api/data.py
View file @
c84ea56f
...
...
@@ -8,7 +8,7 @@ Basket = get_model('basket', 'Basket')
Product
=
get_model
(
'catalogue'
,
'Product'
)
Selector
=
get_class
(
'partner.strategy'
,
'Selector'
)
Free
=
get_class
(
'shipping.methods'
,
'Free
'
)
NoShippingRequired
=
get_class
(
'shipping.methods'
,
'NoShippingRequired
'
)
OrderNumberGenerator
=
get_class
(
'order.utils'
,
'OrderNumberGenerator'
)
OrderTotalCalculator
=
get_class
(
'checkout.calculators'
,
'OrderTotalCalculator'
)
...
...
@@ -56,7 +56,7 @@ def get_order_metadata(basket):
and a Price object representing the order total.
"""
number
=
OrderNumberGenerator
()
.
order_number
(
basket
)
shipping_method
=
Free
()
shipping_method
=
NoShippingRequired
()
shipping_charge
=
shipping_method
.
calculate
(
basket
)
total
=
OrderTotalCalculator
()
.
calculate
(
basket
,
shipping_charge
)
...
...
ecommerce/extensions/payment/views.py
View file @
c84ea56f
...
...
@@ -9,7 +9,6 @@ from django.views.generic import View
from
oscar.apps.order.exceptions
import
UnableToPlaceOrder
from
oscar.apps.partner
import
strategy
from
oscar.apps.payment.exceptions
import
PaymentError
from
oscar.apps.shipping
import
methods
as
shipping_methods
from
oscar.core.loading
import
get_class
,
get_model
from
ecommerce.extensions.checkout.mixins
import
EdxOrderPlacementMixin
...
...
@@ -22,6 +21,7 @@ logger = logging.getLogger(__name__)
Basket
=
get_model
(
'basket'
,
'Basket'
)
BillingAddress
=
get_model
(
'order'
,
'BillingAddress'
)
Country
=
get_model
(
'address'
,
'Country'
)
NoShippingRequired
=
get_class
(
'shipping.methods'
,
'NoShippingRequired'
)
OrderTotalCalculator
=
get_class
(
'checkout.calculators'
,
'OrderTotalCalculator'
)
...
...
@@ -99,7 +99,7 @@ class CybersourceNotifyView(EdxOrderPlacementMixin, View):
# Note (CCB): In the future, if we do end up shipping physical products, we will need to properly implement
# shipping methods. See http://django-oscar.readthedocs.org/en/latest/howto/how_to_configure_shipping.html.
shipping_method
=
shipping_methods
.
NoShippingRequired
()
shipping_method
=
NoShippingRequired
()
shipping_charge
=
shipping_method
.
calculate
(
basket
)
# Note (CCB): This calculation assumes the payment processor has not sent a partial authorization, thus we use
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment