Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Hide payment actions if order has no billing address
Anna Siwikc04cb615407d
diff --git a/saleor/order/views.py b/saleor/order/views.pyindex 3eb4abf5cc..0168a018b3 100644--- a/saleor/order/views.py+++ b/saleor/order/views.py@@ -64,7 +64,7 @@ def payment(request, token):form_data = Nonewaiting_payment_form = PaymentDeleteForm(None, order=order, initial={'payment_id': waiting_payment.id})- if order.is_fully_paid():+ if order.is_fully_paid() or not order.billing_address:form_data = Nonepayment_form = Noneif not order.is_pre_authorized():diff --git a/templates/order/payment.html b/templates/order/payment.htmlindex 1b68fa4a70..05af3eb77d 100644--- a/templates/order/payment.html+++ b/templates/order/payment.html@@ -38,7 +38,7 @@<div class="row checkout"><div class="col-lg-10 m-auto">{% if order.user == user or not order.is_fully_paid %}- {% if not order.is_fully_paid %}+ {% if not order.is_fully_paid and order.billing_address %}{% if waiting_payment %}<h1>{% trans "Payment pending" context "Payment details title" %}