`;
+async function order_summary(){
+let current_orderSerialDate =window.localStorage.getItem('orderSerialno');
+let user_number =window.localStorage.getItem('Userphonenumber');
+let port = "https://anwi.bizgaze.app";
+// let port = "http://localhost:3088";
+ let url = `${port}/apis/v4/bizgaze/integrations/products/salesorderdetailsbyphonenumber/phonenumber/${user_number}`;
+ const config = {
+ url,
+ method: "get",
+ headers: {
+ 'Authorization': `stat 05b2f2ca510344968c65e1ebf49a5595 `,
+ 'Content-Type': 'application/json'
+ }
+ };
+ let res = await axios(config);
+ const orderDetailsres = JSON.parse(res.data.result);
+ console.log(orderDetailsres);
+ let new_arrr = orderDetailsres;
+ console.log(new_arrr)
+ let orderNumber = localStorage.getItem("orderSerialno");
+let filteredOrders = new_arrr.filter(function(order) {
+ return order.OrderNo === orderNumber;
+});
-let deliverdCard=`
`
+$.each(filteredOrders, function(index, order) {
+ console.log(order.OrderNo)
+ let Delivery_status =order.stageshortcode
+let deliverdCard=`
`;
$('.deliverd-card').append(deliverdCard)
-$('.order_tax').html(order_tax)
-$('.Order_total').html(order_nettotal)
-$('.order-summary').html(summary);
+if(Delivery_status == 'CMD'){
+ $('.delivery_status').html('Deliverd')
+}
+if(Delivery_status == 'APL'){
+ $('.delivery_status').html('Approval')
+}
+});
+console.log(filteredOrders)
+let summary =`
Order${orderNumber} (${filteredOrders.length} items)Order placed on ${filteredOrders[0].OrderDate}
`;
+
+ $('.order_tax').html(filteredOrders[0].taxamount)
+ $('.Order_total').html(filteredOrders[0].nettotal)
+ $('.order_price').html(filteredOrders[0].itemtotal)
+ $('.order-summary').html(summary);
$('.back_to_orders').click(function(){
+ let Local_keys_update =['Userphonenumber','orderSerialno']
debugger
for (key of Local_keys_update) {
window.localStorage.removeItem(key);
}
$(this).attr('href','./myaccount.html')
-})
\ No newline at end of file
+})
+}
+order_summary()
\ No newline at end of file
diff --git a/dist/Js/warranty.js b/dist/Js/warranty.js
index 384c1ec..446bb85 100644
--- a/dist/Js/warranty.js
+++ b/dist/Js/warranty.js
@@ -1,13 +1,12 @@
function wattantyFunction() {
- debugger;
let order_card = `
`;
-
$(".user_orders").append(order_card);
$(".add_serialNum").click(function () {
$(".warranty_productform").removeClass("d-none");
$(this).addClass("d-none");
});
$(".warranty_serialNumber_submit").click(async function () {
+ debugger
let serial_no_inp = $("#Add_serial_number_inp").val();
let phonenumber_inp = $("#Add_phonenumber_inp").val();
let contactname_inp = $("#Add_contactname_inp").val();
@@ -32,63 +31,37 @@ function wattantyFunction() {
debugger;
console.log(response);
let product_res = response.data.result;
+ debugger;
if (product_res != null) {
let warrenty_res = JSON.parse(product_res);
let new_arr = [warrenty_res];
$.each(new_arr, function (key, value) {
console.log(value);
if (response.data.result == "[]") {
- // Command: toastr["error"]("Serial number not found !")
- // toasterOpts();
- // $('#Add_serial_number_inp').addClass('border-danger');
- // $('.error_serial_num').removeClass('d-none')
$(".user_Warranty_details").html(
`
`
);
- setTimeout(function(){
- $('.bg-dangerLite').hide()
- }, 1000)
- // $('.warranty_productform').addClass('d-none');
- // $('.add_serialNum').removeClass('d-none');
+ setTimeout(function () {
+ $(".bg-dangerLite").hide();
+ }, 1000);
return;
} else {
- const warrantyEnabled = value[0].warrantyenabled;
- $('.warranty_status_main_container').addClass('d-none')
- if (warrantyEnabled == false) {
- let phonenumber_updated = Number(phonenumber_inp);
- $(".user_Warranty_details").removeClass("d-none");
- // let strDate = new Date(value[0].purchasedate).toISOString().slice(0, 10);
- let Warrentypayload = {
- sku: value[0].sku,
- serialno: serial_no_inp,
- phonenumber: phonenumber_updated,
- contactname: contactname_inp,
- warrantyfromdate: value[0].purchasedate,
- };
- warrentyService(Warrentypayload);
- } else {
- $('.backtoform').removeClass('d-none')
- // let warrantySerialnumber =$('.serial_no_warrantynumber').text()
- let warrenty_date = value[0].warrantytodate;
- // let userwarrenty_product = `
Warranty For : ${value[0].itemname}
Serail NO : ${value[0].serialno}
Warrenty Expiry Date : ${value[0].warrantytodate}
Warranty Start Date : ${value[0].warrantyfromdate}
Warranty Status : ${value[0].warrantyenabled}
`;
- let userwarrenty_product = `
Congratulations, Thanks for registering with anwi systems .You have successfully availed your warranty.
Here is your warranty Details Serail No
${value[0].serialno}
Warranty will be applicable till
${value[0].warrantytodate}
Order details Itemname
${value[0].itemname}
Warranty details Warranty Start
${value[0].warrantyfromdate}
Warranty status
{value[0].warrantyenabled}
Follow Below steps to request your warranty claim.
Go to My account Tap on request claim Enter information and send claim request `;
- let is_warranty_enable = value[0].warrantyenabled;
- debugger;
- $(".user_Warranty_details").html(userwarrenty_product);
- if (is_warranty_enable == true) {
- $(".is_warranty_enable").text("Activated");
- } else {
- $(".is_warranty_enable").text("Not Activated");
- }
- if (warrenty_date == "") {
- $(".warrenty_date").addClass("d-none");
- } else {
- $(".warrenty_date").removeClass("d-none");
- }
- $("#Add_serial_number_inp").addClass("border-success");
- $(".error_serial_num").addClass("d-none");
- $(".add_serialNum").removeClass("d-none");
- }
+ const warrantyEnabled = value[0].warrantyenabled;
+ $(".warranty_status_main_container").addClass("d-none");
+ if (warrantyEnabled == false) {
+ let phonenumber_updated = Number(phonenumber_inp);
+ $(".user_Warranty_details").removeClass("d-none");
+ let Warrentypayload = {
+ sku: value[0].sku,
+ serialno: serial_no_inp,
+ phonenumber: phonenumber_updated,
+ contactname: contactname_inp,
+ warrantyfromdate: value[0].purchasedate,
+ };
+ warrentyService(Warrentypayload);
+ } else {
+ alert('warranty enabled')
+ }
}
});
}
@@ -102,7 +75,7 @@ function wattantyFunction() {
}
}
});
- $('.warranty_serialNumber_check').click(async function(){
+ $(".warranty_serialNumber_check").click(async function () {
let serial_no_inp = $("#Add_serial_number_inp").val();
if (serial_no_inp != "") {
$(".error_serial_num").addClass("d-none");
@@ -124,29 +97,61 @@ function wattantyFunction() {
debugger;
console.log(response);
let product_res = response.data.result;
+ debugger;
+ let warrenty_res = JSON.parse(product_res);
if (product_res != null) {
- if (response.data.result == "[]") {
- $('.bg-dangerLite').removeClass('d-none')
- $(".user_Warranty_details").html(
- `
`
- );
-
- // );
- setTimeout(function(){
- $('.bg-dangerLite').hide()
- }, 1000)
- return;
+ if (response.data.result == "[]") {
+ $(".bg-dangerLite").removeClass("d-none");
+ $(".user_Warranty_details").html(
+ `
`
+ );
+ // );
+ setTimeout(function () {
+ $(".bg-dangerLite").hide();
+ }, 1000);
+ return;
+ }
+ else {
+ if (warrenty_res[0].warrantyenabled == true) {
+
+ $(".backtoform").removeClass("d-none");
+ let new_arr = [warrenty_res];
+ $.each(new_arr, function (key, value) {
+ console.log(value);
+ let warrenty_date = value[0].warrantytodate;
+ let userwarrenty_product = `
Congratulations, Thanks for registering with anwi systems .You have successfully availed your warranty.
Here is your warranty Details Serail No
${value[0].serialno}
Warranty will be applicable till
${value[0].warrantytodate}
Order details Itemname
${value[0].itemname}
Warranty details Warranty Start
${value[0].warrantyfromdate}
Warranty status
{value[0].warrantyenabled}
Follow Below steps to request your warranty claim.
Go to My account Tap on request claim Enter information and send claim request `;
+ let is_warranty_enable = value[0].warrantyenabled;
+ debugger;
+ $(".user_Warranty_details").html(userwarrenty_product);
+ $(".warranty_status_main_container").addClass("d-none");
+ if (is_warranty_enable == true) {
+ $(".is_warranty_enable").text("Activated");
+ } else {
+ $(".is_warranty_enable").text("Not Activated");
+ }
+ if (warrenty_date == "") {
+ $(".warrenty_date").addClass("d-none");
+ } else {
+ $(".warrenty_date").removeClass("d-none");
+ }
+ $("#Add_serial_number_inp").addClass("border-success");
+ $(".error_serial_num").addClass("d-none");
+ $(".add_serialNum").removeClass("d-none");
+ return
+ });
}
- else{
- $('.bg-dangerLite').addClass('d-none')
- $(".Add_phonenumber_inp_label").removeClass('d-none')
- $("#Add_phonenumber_inp").removeClass('d-none')
- $(".Add_Contact_inp_label").removeClass('d-none')
- $("#Add_contactname_inp").removeClass('d-none')
- $(".warranty_serialNumber_submit").removeClass('d-none')
- $(this).addClass('d-none')
- $(".Serial_numb_notfound").addClass('d-none')
- }
+ else {
+ $(".bg-dangerLite").addClass("d-none");
+ $(".Add_phonenumber_inp_label").removeClass("d-none");
+ $("#Add_phonenumber_inp").removeClass("d-none");
+ $(".Add_Contact_inp_label").removeClass("d-none");
+ $("#Add_contactname_inp").removeClass("d-none");
+ $(".warranty_serialNumber_submit").removeClass("d-none");
+ $(this).addClass("d-none");
+ $(".Serial_numb_notfound").addClass("d-none");
+ }
+
+ }
}
} else {
if (serial_no_inp == "") {
@@ -154,54 +159,28 @@ function wattantyFunction() {
$(".error_serial_num").removeClass("d-none");
}
}
- })
+ });
async function warrentyService(Warrentypayload) {
- // let d = new Date();
- // // let strDate = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
- // let strDate = new Date().toISOString().slice(0, 10)
- // console.log(strDate)
- debugger;
const res = await postAPIServiceWarranty(
`apis/v4/bizgaze/transact/items/savewarrantyasync`,
Warrentypayload
);
- debugger;
console.log(res);
if (res.data.status == 2) {
- // $('.warranty_productform').addClass('d-none');
- // $('.add_serialNum').removeClass('d-none');
- // Command: toastr["warning"](res.data.message)
- // toasterOpts();
- $('.warranty_status_main_container').removeClass('d-none')
- $('.bg-dangerLite').removeClass('d-none');
+ $(".warranty_status_main_container").removeClass("d-none");
+ $(".bg-dangerLite").removeClass("d-none");
$(".user_Warranty_details").html(
- `
No Serial number found / Product not Delivered
`
+ `
No Serial number found / Product not Delivered
`
);
- setTimeout(function(){
- $('.bg-dangerLite').hide()
- }, 1000)
+ setTimeout(function () {
+ $(".bg-dangerLite").hide();
+ }, 1000);
} else if (res.data.status == "0") {
- $(".user_Warranty_details").html(`
`);
+ $(".user_Warranty_details").html(
+ `
`
+ );
}
}
- // function toasterOpts() {
- // toastr.options = {
- // "closeButton": true,
- // "debug": false,
- // "newestOnTop": true,
- // "progressBar": true,
- // "positionClass": "toast-top-center",
- // "preventDuplicates": true,
- // "showDuration": "300",
- // "hideDuration": "1000",
- // "timeOut": "3000",
- // "extendedTimeOut": "1000",
- // "showEasing": "swing",
- // "hideEasing": "linear",
- // "showMethod": "fadeIn",
- // "hideMethod": "fadeOut"
- // }
- // }
}
wattantyFunction();
diff --git a/dist/css/main.css b/dist/css/main.css
index f3236e3..b223fd0 100644
--- a/dist/css/main.css
+++ b/dist/css/main.css
@@ -1091,7 +1091,7 @@ html,body{
/* ORDER DETAILS */
.bg-return{
- background-color: #f7f0e1 !important;
+ background-color: #d0f5ff !important;
}
.close_exchange{
bottom:10px;
@@ -1106,7 +1106,7 @@ html,body{
font-size: 1rem !important;
}
.order-summary{
- background-color:#f3e2be !important;
+ background-color:#c8ebff !important;
}
.fs-7{
font-size: 0.7rem;
@@ -1603,4 +1603,12 @@ background: linear-gradient(75deg, rgb(56 89 118) 51%, rgb(107 18 111) 89%)
.fs-60 {
font-size: 60px !important;
padding: 40px 0px !important;
+}
+.Order_details_section{
+ position: sticky;
+ top: 120px;
+}
+.primary_btn{
+ background: #0A1039 !important;
+ color: #fff !important;
}
\ No newline at end of file
diff --git a/myaccount.html b/myaccount.html
index b2933ca..f64c725 100644
--- a/myaccount.html
+++ b/myaccount.html
@@ -229,7 +229,7 @@
Order Details
-
diff --git a/orderdetails.html b/orderdetails.html
index bda8c71..fca6e46 100644
--- a/orderdetails.html
+++ b/orderdetails.html
@@ -35,41 +35,42 @@
-
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
Order Payment Details
-
+
-
Order Amount
+
Order Amount
-
-
- 32,000
+
+
+
+ 32,000
-
Convenience Fee
+
Shipping Fee
Free
@@ -93,19 +102,23 @@
Order Total
-
+
@@ -139,7 +154,8 @@
Ashok Kumar
-
3-128,Srinivasa Nagar,Deepthi sri colony,Miyapur,
+
3-128,Srinivasa Nagar,Deepthi sri
+ colony,Miyapur,
HYDERABAD - TELENGANA
India - 500101
Phone : 9876543234
@@ -149,8 +165,8 @@
-
-
+
+
@@ -159,9 +175,9 @@
-
+
-
+