From 9b06fa6596def3505af076d6f8807a251c4162e4 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sat, 19 Oct 2024 21:35:20 +0100 Subject: Add multiple items to the cart and Stripe process - Very rough but it works - Multiple items can be added to cart - Can be bought with stripe - Shopping cart is deleted after successful transaction --- alphabetlearning/templates/payments/cart_detail.html | 3 +-- alphabetlearning/templates/payments/cart_sidepanel.html | 5 ++++- alphabetlearning/templates/resources/resource_card_featured.html | 5 ++++- alphabetlearning/templates/resources/resource_card_standard.html | 5 ++++- 4 files changed, 13 insertions(+), 5 deletions(-) (limited to 'alphabetlearning/templates') diff --git a/alphabetlearning/templates/payments/cart_detail.html b/alphabetlearning/templates/payments/cart_detail.html index 8c6c01b..46117d1 100644 --- a/alphabetlearning/templates/payments/cart_detail.html +++ b/alphabetlearning/templates/payments/cart_detail.html @@ -21,9 +21,8 @@
- {% include "payments/cart_sidepanel.html" with cart=cart %} + {% include "payments/cart_sidepanel.html" with cart=cart total=total %}
- {% else %}

Your cart is empty.

diff --git a/alphabetlearning/templates/payments/cart_sidepanel.html b/alphabetlearning/templates/payments/cart_sidepanel.html index 7742c9a..b788d24 100644 --- a/alphabetlearning/templates/payments/cart_sidepanel.html +++ b/alphabetlearning/templates/payments/cart_sidepanel.html @@ -23,6 +23,9 @@
- +
+ {% csrf_token %} + +
diff --git a/alphabetlearning/templates/resources/resource_card_featured.html b/alphabetlearning/templates/resources/resource_card_featured.html index 8a92729..c83ac0f 100644 --- a/alphabetlearning/templates/resources/resource_card_featured.html +++ b/alphabetlearning/templates/resources/resource_card_featured.html @@ -32,7 +32,10 @@ {% endif %}

1 credit

- +
+ {% csrf_token %} + +
diff --git a/alphabetlearning/templates/resources/resource_card_standard.html b/alphabetlearning/templates/resources/resource_card_standard.html index f8a557b..9850117 100644 --- a/alphabetlearning/templates/resources/resource_card_standard.html +++ b/alphabetlearning/templates/resources/resource_card_standard.html @@ -37,7 +37,10 @@

1 credit

- +
+ {% csrf_token %} + +
-- cgit v1.2.3