You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i click tracker button the the Updateorder shows
{"status": "success", "updates": [{"text": "The order has been placed"}], "itemsJson": "{"pr1":[1,"PEPSI 2 "]}"}
{% extends 'Supply_Chain/basic.html' %}
{% block title%} My Awesome Cart Tracker{% endblock %}
{% block body %}
Enter your Order Id and Email address to track your order
{% csrf_token %}
Order Id
Email
Track Order
Your Order Status
Enter your order Id and Email and click Track Order to find details about your order!
Your Order Details
{% endblock %}
{% block js %}
<script>
$('#trackerForm').submit(function(event) {
$('#items').empty();
var formData = {
'orderId': $('input[name=orderId]').val(),
'email': $('input[name=email]').val(),
'csrfmiddlewaretoken': $('input[name=csrfmiddlewaretoken]').val()
};
$.ajax({
type: 'POST',
url: '/PepsiProduct/tracker/',
data: formData,
encode: true
})
.done(function(data) {
$('#citems').empty();
console.log(data)
data = JSON.parse(data);
if (data['status'] == 'success') {
updates = data['updates'];
for (i = 0; i < updates.length; i++) {
let text = updates[i]['text'];
let time = updates[i]['time'];
mystr = `
${text}
${time}
`
$('#items').append(mystr);
}
// Fill in the order details
cart = JSON.parse(data['itemsJson']);
console.log(cart);
for (item in cart) {
let name = cart[item][1];
let qty = cart[item][0];
mystr = `
When i click tracker button the the Updateorder shows
{"status": "success", "updates": [{"text": "The order has been placed"}], "itemsJson": "{"pr1":[1,"PEPSI 2 "]}"}
in another page
my email: [email protected]
*** tracker html code**
{% extends 'Supply_Chain/basic.html' %}
{% block title%} My Awesome Cart Tracker{% endblock %}
{% block body %}
Enter your Order Id and Email address to track your order
{% csrf_token %}Your Order Status
Enter your order Id and Email and click Track Order to find details about your order!
Your Order Details
The text was updated successfully, but these errors were encountered: