Skip to content

Commit

Permalink
Convert order email to html to test download link
Browse files Browse the repository at this point in the history
  • Loading branch information
alissatroiano committed Jul 27, 2021
1 parent 5a17a18 commit 9fd7bad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@

{{ item.product.image.url }}

<a href="{{ item.product.image }}" download="{{ item.product.image }}"
class="btn btn-primary btn-sm mt-2">Download</a>

{% endfor %}
2 changes: 1 addition & 1 deletion checkout/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def checkout_success(request, order_number):
Handle successful checkouts
"""
order = get_object_or_404(Order, order_number=order_number)
template = render_to_string('checkout/confirmation_emails/order_email.txt', {'order': order})
template = render_to_string('checkout/confirmation_emails/order_email.html', {'order': order})

email = EmailMessage(
'Your order has been received',
Expand Down

0 comments on commit 9fd7bad

Please sign in to comment.