1.0.4 subscribe page w dynamically load
This commit is contained in:
@@ -13,6 +13,7 @@ class Admin_SubscribeOrder(Admin_BaseModel):
|
||||
('sum', 'currency'),
|
||||
('status', 'last_operation_status'),
|
||||
('bank_order_id', 'pay_page'),
|
||||
'json_data',
|
||||
)
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -28,7 +28,7 @@ def get_subscribes_w_options():
|
||||
|
||||
def check_n_enable_subscribe_by_order(order):
|
||||
|
||||
subscribes_for_user = SubscribeForUser.objects.filter(user=order.user)
|
||||
subscribes_for_user = []#SubscribeForUser.objects.filter(user=order.user)
|
||||
|
||||
if order and order.enable and order.status == 'charged':
|
||||
kwargs = {
|
||||
@@ -80,7 +80,9 @@ def get_profile_subscribe_page_content_Dict(request):
|
||||
error = f'{order.status}'
|
||||
if 'status' in order.json_data and 'failure_message' in order.json_data['status']:
|
||||
error = f'{error} ({order.json_data["status"]["failure_message"]})'
|
||||
subscribes.get(id=order.subscribe.id).order_error = error
|
||||
for subscribe in subscribes:
|
||||
if subscribe == order.subscribe:
|
||||
subscribe.order_error = error
|
||||
check_orders_required = False
|
||||
else:
|
||||
check_orders_required = True
|
||||
|
||||
@@ -76,8 +76,14 @@
|
||||
<div class="text_another_subscribe padding-n-width-another-subscribes ">
|
||||
{% translate "Период" %}: <span class="orange-text">{{ item.period_name }}</span>
|
||||
</div>
|
||||
<button class="read_more_about_subscribe" onclick="send_subscribe({{ item.id }},'{% if page.url == 'for_movers' or page.url == 'for_customers' %}a{% endif %}','{% url "profile_page" "my_subscribe" %}')">{% translate "Перейти" %}</button>
|
||||
<button class="read_more_about_subscribe" onclick="send_subscribe({{ item.id }},'{% if page.url == 'for_movers' or page.url == 'for_customers' %}a{% endif %}','{% url "profile_page" "my_subscribe" %}')">{% translate "Перейти" %}</button>
|
||||
</div>
|
||||
{% if item.order_error %}
|
||||
<div>
|
||||
<div>Ошибка оплаты</div>
|
||||
<div>{{ item.order_error }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user