aboutsummaryrefslogtreecommitdiffstats
path: root/alphabetlearning/templates/resources/resource_card_standard.html
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-10-19 21:35:20 +0100
committerMatthew Lemon <y@yulqen.org>2024-10-19 21:35:20 +0100
commit9b06fa6596def3505af076d6f8807a251c4162e4 (patch)
tree55f15a16aa4ef00f9050eaefac413933d203c3e3 /alphabetlearning/templates/resources/resource_card_standard.html
parent1e1a2f6ac2cadfbc57cc855a67498af097391caf (diff)
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
Diffstat (limited to 'alphabetlearning/templates/resources/resource_card_standard.html')
-rw-r--r--alphabetlearning/templates/resources/resource_card_standard.html5
1 files changed, 4 insertions, 1 deletions
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 @@
</div>
<div class="d-flex flex-row justify-content-between align-items-end mt-2">
<p class="card-text m-1"><small class="text-muted">1 credit</small></p>
- <button type="button" class="btn btn-success fs-6 px-2 py-0">Add to basket</button>
+ <form action="{% url 'payments:add_to_basket' resource.id %}" method="POST">
+ {% csrf_token %}
+ <button type="submit" class="btn btn-success fs-6 px-2 py-0">Add to basket</button>
+ </form>
</div>
</div>
</div>