Notes
Notes - notes.io |
{% block content %}
{% load static %}
{% block main-content %}
<style>
</style>
<div class="container my-5">
<div class="row">
<h1 class="text-center mb-5">Shopping Cart</h1>
<div class="col-sm-8">
<div class="card">
<div class="card-body">
<h3>Cart</h3>
{%for cart in carts%}
<hr>
<div class="row">
<div class="col-sm-3 text-center align-self-center"><img src="{{cart.product.image_two.url}}" alt="" srcset="" class="img-fluid img-thumbnail shadow-sm" height="150" width="150"> </div>
<div class="col-sm-9">
<div>
<h5>{{cart.product.name}}</h5>
<p class="mb-2 text-muted small">Description: that is a product of our classyshop website you can purchase our product we provide good delivry service !</p>
<div class="my-3">
<label for="quantity">Quantity:</label>
<a class="minus-cart btn" pid="{{cart.product.id}}"><i class="btn btn-danger"></i></a>
<span id="quantity">{{cart.quantity}}</span>
<a class="plus-cart btn" pid="{{cart.product.id}}"><i class="btn btn-success"></i></a>
</div>
<div class="d-flex justify-content-between">
<a href="#" class="btn btn-sm btn-secondary mr-3 remove-cart" pid="{{cart.product.id}}">Remove item </a>
<p class="mb-0"><span><strong>RS.{{cart.product.discounted_price}}</strong></span></p>
</div>
</div>
</div>
</div>
{% endfor %}
<div class="row my-5">
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="card">
<div class="card-body">
<h3>The Total Amount of</h3>
<ul class="list-group">
<li class="list-group-item d-flex justify-content-between align-items-center border-0 px-0 pb-0">Amount<span>Rs.<span id="amount">{{amount}}</span></span></li>
<li class="list-group-item d-flex justify-content-between align-items-center px-0">Shipping<span>Rs. 70.00</span></li>
<li class="list-group-item d-flex justify-content-between align-items-center border-0 px-0 mb-3">
<div>
<strong>Total</strong> <small>(including VAT)</small>
</div>
<span><strong>Rs. <strong id="totalamount">{{totalamount}}</strong></strong></span>
</li>
</ul>
<div class="d-grid"><a href="{% url 'profile'%}" class="btn btn-primary">Place Order</a></div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
</div>
</div>
</div>
{% endblock main-content %}
{% endblock content %}
$(document).ready(function(){
$('.plus-cart').click(function () {
var id = $(this).attr("pid").toString();
var eml = $(this).closest('.row').find('#quantity');
$.ajax({
type: "GET",
url: "/pluscart",
data: {
prod_id: id
},
success: function (data) {
eml.innerText = data.quantity
window.location.reload(true);
document.getElementById("amount").innerText = data.amount
document.getElementById("totalamount").innerText = data.totalamount
}
})
})
});
$('.minus-cart').click(function (){
var id =$(this).attr("pid").toString();
var eml = $(this).closest('.row').find('#quantity');
$.ajax({
type:"GET",
url:"/minuscart",
data: {
prod_id:id
},
success: function(data){
eml.innerText=data.quantity
window.location.reload(true);
document.getElementById('amount').innerText = data.amount
document.getElementById('totalamount').innerText = data.totalamount
}
})
})
$('.remove-cart').click(function (){
var id =$(this).attr("pid").toString();
var eml = this
$.ajax({
type:"GET",
url:"/removecart",
data:{
prod_id:id
},
success:function(data){
document.getElementById("amount").innerText=data.amount
document.getElementById("totalamount").innerText=data.totalamount
eml.parentNode.parentNode.parentNode.parentNode.remove()
}
})
})
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team
