瀏覽代碼

code added

sachinganesh 2 年之前
父節點
當前提交
bf783a338b

+ 2
- 1
dist/Js/auth/apiservice.js 查看文件

@@ -1,6 +1,7 @@
1 1
 //let SERVERNAME = 'https://anwi.bizgaze.app';
2 2
 //let SERVERNAME = 'http://beta.bizgaze.com';
3
- let SERVERNAME = 'http://localhost:3088';
3
+ let SERVERNAME = 'https://qa.anwisystems.com';
4
+ //let SERVERNAME = 'http://localhost:3088';
4 5
 
5 6
 //template
6 7
 const STAT = '8041f78ba55b4847bc4aacaeae9d24ef';

+ 13
- 2
dist/Js/main.js 查看文件

@@ -4,6 +4,11 @@
4 4
     /*--
5 5
     Menu Stick
6 6
     -----------------------------------*/
7
+
8
+    let width = $(window).width();
9
+
10
+   
11
+
7 12
     var header = $('.sticky-bar');
8 13
     var win = $(window);
9 14
     let ele_page = $("body").hasClass("product_pg");
@@ -22,12 +27,12 @@
22 27
         let img_src = `./dist/assets/imgs/anwi-logo-2.png`;
23 28
         $(".logo-menu-wrap").find("a img").attr("src",img_src);
24 29
         $(".main-menu").find("nav ul li a").addClass("text-white");
25
-        debugger;
30
+     
26 31
         $("body.product_pg").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#fff");
27 32
         $('.header-bottom-flex').find('svg path').attr('fill','#fff')
28 33
     } else {
29 34
         header.addClass('stick');
30
-     debugger;
35
+  
31 36
             $(".header-bottom").addClass("sticky-bar stick");
32 37
             let src = `./dist/assets/imgs/anwi-logo-1.png`;
33 38
             $(".logo-menu-wrap").find("a img").attr("src",src);
@@ -1446,6 +1451,12 @@
1446 1451
             }
1447 1452
         ]
1448 1453
     });
1454
+
1455
+    setTimeout(()=>{
1456
+        if(width<=600){
1457
+            $('.same-style').find('svg path').attr('fill','#000')
1458
+        }
1459
+    },300)
1449 1460
     
1450 1461
 })(jQuery);
1451 1462
 

+ 31
- 31
dist/Js/myaccount/orderdetails.js 查看文件

@@ -1,13 +1,13 @@
1 1
 async function bindOrderDetails() {
2
-  let user_number =$('.User_phoneum').text();
3
-// validatesession()
4
-debugger
5
-let cookieRes = COOKIE_HELPER_ACTIONS.getCookie();
6
- let { userId} = cookieRes;
7
- //let userId = '106631380000048';
8
- debugger;
9
-let port = SERVERNAME;
10
-// let port = "http://localhost:3088";
2
+  let user_number = $('.User_phoneum').text();
3
+  // validatesession()
4
+  debugger
5
+  let cookieRes = COOKIE_HELPER_ACTIONS.getCookie();
6
+  let { userId } = cookieRes;
7
+  //let userId = '106631380000048';
8
+  debugger;
9
+  let port = SERVERNAME;
10
+  // let port = "http://localhost:3088";
11 11
   let url = `${port}/apis/v4/Bizgaze/integrations/products/salesorderdetailsbyorgid/organizationid/${userId}`;
12 12
   // /apis/v4/bizgaze/integrations/products/salesorderdetailsbyorgid/phonenumber/
13 13
   // https://anwi.bizgaze.app/apis/v4/Bizgaze/integrations/products/salesorderdetailsbyorgid/organizationid/{organizationid}
@@ -17,11 +17,11 @@ let port = SERVERNAME;
17 17
     headers: {
18 18
       'Authorization': `stat ${STAT} `,
19 19
       'Content-Type': 'application/json'
20
-  }
20
+    }
21 21
   };
22 22
   debugger
23 23
   let res = await axios(config);
24
-  if(res.data.result == '[]' || res.data.result === null){
24
+  if (res.data.result == '[]' || res.data.result === null) {
25 25
     $(".user_order_details").append(`<div><h6 class="text-center">No orders Found</h6></div>`);
26 26
     return;
27 27
   }
@@ -31,19 +31,19 @@ let port = SERVERNAME;
31 31
   console.log(new_arrr);
32 32
   $(".user_order_details").html(``)
33 33
   console.log('hello')
34
-  let user_order_details =``;
34
+  let user_order_details = ``;
35 35
   let order_itemTotal = '';
36
-  let order_netTotal = '' ;
37
-  let order_quantity = '' ;
38
-  let order_taxAmount = '' ;
39
-  for(let i=0;i<new_arrr.length;i++){
40
-    let current=new_arrr[i]
41
-   let updatedCurent_total= current.nettotal.toLocaleString()
42
-   order_itemTotal = current.itemtotal;
43
-   order_netTotal = current.nettotal; 
44
-   order_quantity =current.Quantity;
45
-   order_taxAmount =current.taxamount;
46
-  user_order_details+= `<a href="" class="order_details_main_container">
36
+  let order_netTotal = '';
37
+  let order_quantity = '';
38
+  let order_taxAmount = '';
39
+  for (let i = 0; i < new_arrr.length; i++) {
40
+    let current = new_arrr[i]
41
+    let updatedCurent_total = current.nettotal.toLocaleString()
42
+    order_itemTotal = current.itemtotal;
43
+    order_netTotal = current.nettotal;
44
+    order_quantity = current.Quantity;
45
+    order_taxAmount = current.taxamount;
46
+    user_order_details += `<a href="" class="order_details_main_container">
47 47
   <div class="border-3 mb-3 card">
48 48
     <div class="text-dark card-body px-0 pt-0">
49 49
       <div class="d-none">
@@ -102,17 +102,17 @@ let port = SERVERNAME;
102 102
     </div>
103 103
   </div>
104 104
 </a>`;
105
-}
105
+  }
106 106
   $(".user_order_details").append(user_order_details);
107
-  $('.order_details_main_container').click(function(){
108
-    let current_serial_no= $(this).find('.serial_no').text();
107
+  $('.order_details_main_container').click(function () {
108
+    let current_serial_no = $(this).find('.serial_no').text();
109 109
     //  window.localStorage.setItem('orderDate',current_order_date);
110
-     window.localStorage.setItem('orderSerialno',current_serial_no);
111
-     window.localStorage.setItem('Userphonenumber',user_number);
112
-     $(this).attr('href','./orderdetails.html')
113
- })
110
+    //  window.localStorage.setItem('orderSerialno',current_serial_no);
111
+    //  window.localStorage.setItem('Userphonenumber',user_number);
112
+    $(this).attr('href', `./orderdetails.html#${current_serial_no}`)
113
+  })
114 114
 }
115
-function toasterOpts(){
115
+function toasterOpts() {
116 116
   toastr.options = {
117 117
     "closeButton": true,
118 118
     "debug": false,

+ 10
- 4
dist/Js/navbar.js 查看文件

@@ -1,7 +1,7 @@
1 1
 navINIT();
2 2
 
3 3
 function navINIT() {
4
-    if(!window.location.href.includes('orderconfirmation')){
4
+    if(!window.location.href.includes('orderconfirmation')&&!window.location.href.includes('/w/')){
5 5
         loadCart();
6 6
     }
7 7
    
@@ -92,7 +92,7 @@ function navINIT() {
92 92
                 </div>
93 93
             </div>
94 94
             <div class="header-small-device header-small-ptb sticky-bar py-md-2 py-2 bg-white">
95
-                <div class="container-fluid">
95
+                <div class="container-fluid px-4">
96 96
                     <div class="row align-items-center">
97 97
                         <div class="col-6 header-action-wrap">
98 98
                             <div class="d-flex">
@@ -113,10 +113,10 @@ function navINIT() {
113 113
                         <div class="col-6">
114 114
                             <div class="header-action-wrap header-action-flex header-action-mrg-1">
115 115
                                 <div class="same-style">
116
-                                <a href="./myaccount.html" class="my_avatar"><i class="fa-solid fa-user"></i></a>
116
+                                <a href="./myaccount.html" class="my_avatar"> <svg style="width:22px;" viewBox="0 0 96 96" xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true" class="icon" data-di-res-id="e576e1a9-2f4a9ed6" data-di-rand="1682677695656"><path fill="#fff" d="M48 50c17.346 0 32 14.221 32 31.054V89c0 2.757-2.243 5-5 5H21c-2.757 0-5-2.243-5-5v-7.946C16 64.221 30.654 50 48 50zm0 8c-12.785 0-24 10.773-24 23.054V86h48v-4.946C72 68.773 60.785 58 48 58zm-.002-56c12.133 0 22.003 9.87 22.003 22.001C70 36.131 60.13 46 47.998 46c-12.13 0-21.997-9.869-21.997-21.999C26 11.87 35.867 2 47.998 2zm0 8c-7.718 0-13.997 6.281-13.997 14.001C34 31.72 40.28 38 47.998 38 55.718 38 62 31.72 62 24.001 62 16.281 55.719 10 47.998 10z"></path></svg></a>
117 117
                                 </div>
118 118
                                 <div class="same-style header-cart">
119
-                                <a class="cart-active1 position-relative" href="./shopping-cart.html"><i class="fa-solid fa-cart-shopping"></i>
119
+                                <a class="cart-active1 position-relative" href="./shopping-cart.html"> <svg  style="width:22px;" viewBox="0 0 96 96" xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true" class="icon" data-di-res-id="e576e1a9-90f52cd9" data-di-rand="1682677695656"><path  fill="#fff"  d="M72.848 70.25c6.075 0 11 4.925 11 11s-4.925 11-11 11-11-4.925-11-11 4.925-11 11-11zm-35 0c6.075 0 11 4.925 11 11s-4.925 11-11 11-11-4.925-11-11c0-6.074 4.926-11 11-11zm35 7a4 4 0 10.002 8.001 4 4 0 00-.002-8.001zm-35 0a4 4 0 100 8 4 4 0 000-8zM13.892 3.75c2.287 0 4.376 1.55 5.058 3.72l.064.22 2.97 11.187h68.128a4.727 4.727 0 014.661 5.786l-.048.2-9.559 36.291c-.583 2.216-2.618 3.842-4.894 3.944l-.228.005H30.06c-2.287 0-4.377-1.55-5.06-3.72l-.063-.219-13.124-49.413-10.7.006-.004-8 12.782-.007zm72.03 23.127H24.108l8.027 30.226H77.96l7.962-30.226z"></path></svg>
120 120
                                 <span class="position-absolute cartnumcount d-none"  style="top:-27%;right:-80%">0</span>
121 121
                                 </a>
122 122
                                 </div>
@@ -296,4 +296,10 @@ function navINIT() {
296 296
             }
297 297
         });
298 298
     }
299
+
300
+    setTimeout(()=>{
301
+        if(width<=600){
302
+            $('.same-style').find('svg path').attr('fill','#000')
303
+        }
304
+    },300)
299 305
 }

+ 43
- 51
dist/Js/orderDetails/order_summary.js 查看文件

@@ -1,57 +1,49 @@
1 1
 async function order_summary(){
2
-let current_orderSerialDate =window.localStorage.getItem('orderSerialno');
3
-// let user_number =window.localStorage.getItem('Userphonenumber');
4
-let cookieRes = COOKIE_HELPER_ACTIONS.getCookie();
5
-let { userId} = cookieRes;
6
-//  let userId = '106631380000048';
7
-let port = SERVERNAME;
8
-// let port = "http://localhost:3088";
9
-  // let url = `${port}/apis/v4/bizgaze/integrations/products/salesorderdetailsbyphonenumber/phonenumber/${user_number}`;
10
-  let url = `${port}/apis/v4/Bizgaze/integrations/products/salesorderdetailsbyorgid/organizationid/${userId}`;
11
-  const config = {
12
-    url,
13
-    method: "get",
14
-    headers: {
15
-      'Authorization': `stat ${STAT} `,
16
-      'Content-Type': 'application/json'
17
-  }
18
-  };
19
-  let res = await axios(config);
20
-  const orderDetailsres = JSON.parse(res.data.result);
21
-  console.log(orderDetailsres);
22
-  let new_arrr = orderDetailsres;
23
-  console.log(new_arrr)
24
-  let orderNumber = localStorage.getItem("orderSerialno");
25
-let filteredOrders = new_arrr.filter(function(order) {
26
-  return order.OrderNo === orderNumber;
27
-});
28 2
 
29
-$.each(filteredOrders, function(index, order) {
30
-    console.log(order.OrderNo)
31
-    let Delivery_status =order.stageshortcode
32
-let deliverdCard=`<div class="card rounded-0 border-0 bg-white mb-3 "><div class=card-body><div class="align-items-center row"><div class=col-md-6><div class=d-flex><img class=img-fluid src=""></div><div class="d-flex align-items-center"><div class="text-secondary">Delivery Status : </div><div class=" delivery_status text-blue fw-600" data-status="${order.stageshortcode}"></div></div></div><div class="col-md-6 text-end"><button class=" bg-gradient-anwi-outline btn-sm  btn ">Claim warranty</button> <button class=" bg-gradient-anwi-outline btn-sm btn ">Support</button></div></div><div><small class=" text-secondary me-2">Delivered To : </small><small class="fw-600 user_name">${order.OrganizationName}</div><div class="row pb-4 pb-md-0 align-items-center"><div class="col-md-4 text-center"><img class="img-fluid order_img w-75"src=https://appassets.bizgaze.app/${order.imageurl}></div><div class="col-md-8 position-relative"><small class=" mb-0 order_itemname">${order.itemname}  (${order.Quantity} items)<small class=" align-items-center d-flex fw-600 mb-3"><svg class="bi bi-currency-rupee"fill=currentColor height=16 viewBox="0 0 16 16"width=16 xmlns=http://www.w3.org/2000/svg><path d="M4 3.06h2.726c1.22 0 2.12.575 2.325 1.724H4v1.051h5.051C8.855 7.001 8 7.558 6.788 7.558H4v1.317L8.437 14h2.11L6.095 8.884h.855c2.316-.018 3.465-1.476 3.688-3.049H12V4.784h-1.345c-.08-.778-.357-1.335-.793-1.732H12V2H4v1.06Z"></path></svg><small class="order_price fs-6">${order.itemtotal}</small><p class=" mb-0 close_exchange position-absolute d-none text-secondary">Return/Exchange window closed on Friday,24 March <a class=text-primary href=#>Why?</a></div></div></div></div>`;
33
-$('.deliverd-card').append(deliverdCard)
34
-if(Delivery_status == 'CMD'){
35
-    $('.delivery_status').html('Deliverd')
36
-}
37
-if(Delivery_status == 'APL'){
38
-    $('.delivery_status').html('Approval')
39
-}
40
-});
41
-console.log(filteredOrders)
42
-let summary =`<div class=card-body><div><p class="mb-0 fw-500">Order : <span>${orderNumber}</span><small class=" "> ( ${filteredOrders.length} items )</samll><p class="mb-0 ">Order placed on ${filteredOrders[0].OrderDate}</p></div>`;
3
+  let cookieRes = COOKIE_HELPER_ACTIONS.getCookie();
4
+  let { userId} = cookieRes;
5
+    // let res = await API_SERVICES_ACTIONS.getAPIService(`apis/v4/Bizgaze/integrations/products/salesorderdetailsbyorgid/organizationid/${userId}`,true);
6
+    // https://templateserver.bizgaze.com/apis/v4/bizgaze/integrations/products/getordersbyid/organizationid/{organizationid}/orderno/{orderno}
7
+    let orderno = window.location.hash.split('#')[1];
8
+    let res = await API_SERVICES_ACTIONS.getAPIService(`apis/v4/bizgaze/integrations/products/getordersbyid/organizationid/${userId}/orderno/${orderno}`);
9
+    if(res.isError){
10
+      return;
11
+    }
12
+    const orderDetailsres = JSON.parse(res.response.result);
13
+
14
+    let new_arrr = orderDetailsres;
15
+    console.log(new_arrr)
16
+    let orderNumber =window.location.hash.split('#')[1];
17
+  let filteredOrders = new_arrr.filter(function(order) {
18
+    return order.OrderNo === orderNumber;
19
+  });
43 20
 
44
- $('.order_tax').html(filteredOrders[0].taxamount)
45
- $('.Order_total').html(filteredOrders[0].nettotal)
46
- $('.order_price').html(filteredOrders[0].itemtotal)
47
- $('.order-summary').html(summary);
48
-$('.back_to_orders').click(function(){
49
-    let Local_keys_update =['Userphonenumber','orderSerialno']
50
-    debugger
51
-    for (key of Local_keys_update) {
52
-    window.localStorage.removeItem(key);
21
+  for(let i=0;i<filteredOrders.length;i++){
22
+    let order = filteredOrders[i];
23
+    let Delivery_status =order.stageshortcode
24
+    let deliverdCard=appendItemHTML(order);
25
+    $('.deliverd-card').append(deliverdCard)
26
+    if(Delivery_status == 'CMD'){
27
+        $('.delivery_status').html('Deliverd')
53 28
     }
54
-    $(this).attr('href','./myaccount.html')
55
-})
29
+    if(Delivery_status == 'APL'){
30
+        $('.delivery_status').html('Approval')
31
+    }
32
+  }
33
+
34
+  let summary =`<div class=card-body><div><p class="mb-0 fw-500">Order : <span>${orderNumber}</span><small class=" "> ( ${filteredOrders.length} items )</samll><p class="mb-0 ">Order placed on ${filteredOrders[0].OrderDate}</p></div>`;
35
+
36
+  $('.Order_details_section  .order_tax').html(filteredOrders[0].taxamount)
37
+  $('.Order_details_section .Order_total').html(filteredOrders[0].nettotal)
38
+  $('.Order_details_section  .order_price').html(filteredOrders[0].assessableamount)
39
+  $('.Order_details_section  .order-summary').html(summary);
40
+
41
+  $('.back_to_orders').click(function(){
42
+      $(this).attr('href','./myaccount.html')
43
+  });
44
+
45
+  function appendItemHTML(order){
46
+    return `<div class="card rounded-0 border-0 bg-white mb-3 "><div class=card-body><div class="align-items-center row"><div class=col-md-6><div class=d-flex><img class=img-fluid src=""></div><div class="d-flex align-items-center"><div class="text-secondary">Delivery Status : </div><div class=" delivery_status text-blue fw-600" data-status="${order.stageshortcode}"></div></div></div><div class="col-md-6 text-end"><button class=" bg-gradient-anwi-outline btn-sm  btn ">Claim warranty</button> <button class=" bg-gradient-anwi-outline btn-sm btn ">Support</button></div></div><div><small class=" text-secondary me-2">Delivered To : </small><small class="fw-600 user_name">${order.OrganizationName}</div><div class="row pb-4 pb-md-0 align-items-center"><div class="col-md-4 text-center"><img class="img-fluid order_img w-75"src=https://appassets.bizgaze.app/${order.imageurl}></div><div class="col-md-8 position-relative"><small class=" mb-0 order_itemname">${order.itemname}  (${order.Quantity} items)<small class=" align-items-center d-flex fw-600 mb-3"><svg class="bi bi-currency-rupee"fill=currentColor height=16 viewBox="0 0 16 16"width=16 xmlns=http://www.w3.org/2000/svg><path d="M4 3.06h2.726c1.22 0 2.12.575 2.325 1.724H4v1.051h5.051C8.855 7.001 8 7.558 6.788 7.558H4v1.317L8.437 14h2.11L6.095 8.884h.855c2.316-.018 3.465-1.476 3.688-3.049H12V4.784h-1.345c-.08-.778-.357-1.335-.793-1.732H12V2H4v1.06Z"></path></svg><small class="order_price fs-6">${order.itemtotal}</small><p class=" mb-0 close_exchange position-absolute d-none text-secondary">Return/Exchange window closed on Friday,24 March <a class=text-primary href=#>Why?</a></div></div></div></div>`;
47
+  }
56 48
 }
57 49
 order_summary()

+ 10
- 11
dist/Js/productdetails/productdetails.js 查看文件

@@ -25,7 +25,7 @@ function startDetails(){
25 25
     }
26 26
 
27 27
     let currentClick = null;
28
-    debugger;
28
+   
29 29
     if(productId){
30 30
         loadingActions.addLoader();
31 31
         updateProductId(productId);
@@ -45,7 +45,7 @@ function startDetails(){
45 45
 
46 46
     let specification_wrap_action = {
47 47
         remove(){
48
-            debugger;
48
+    
49 49
             $('.specification-wrap').addClass('d-none');
50 50
         },
51 51
 
@@ -125,8 +125,7 @@ function startDetails(){
125 125
             }
126 126
             
127 127
         }
128
-        debugger;
129
-        
128
+  
130 129
         $('.specContainerleft').html(leftHtml)
131 130
         $('.specContainerRight').html(rightHtml)
132 131
 
@@ -162,7 +161,7 @@ function startDetails(){
162 161
       
163 162
         $('.optiontaganwi').each(function (i,el){
164 163
           $(el).click(function (e){
165
-            
164
+            $('#quantity').val(1)
166 165
             $(e.target).parent().find('.borderselector').removeClass('borderselector');
167 166
             $(e.target).addClass('borderselector')
168 167
            searchComb();
@@ -183,7 +182,7 @@ function startDetails(){
183 182
         
184 183
         let defaultImg = obj.itemimageurl ? imgServerNameBuild(obj.itemimageurl): `./dist/assets/imgs/nophoto.png`;
185 184
 console.log(obj.itemimageurl,'obj.itemimageurlobj.itemimageurlobj.itemimageurl');
186
-debugger;
185
+
187 186
         $('.productDetailsMain  > img').attr('src',defaultImg);
188 187
 
189 188
         updateItemId(obj.itemid);
@@ -244,7 +243,7 @@ debugger;
244 243
                         // $('.des_productdes').html(itemtagscombinationRes[i].itemdescription);
245 244
                         updateDetailsByObj(itemtagscombinationRes[i]);
246 245
                     }else{
247
-                        debugger;
246
+                      
248 247
                         let name = itemtagscombinationRes[i].itemname.split('-')[0];
249 248
                         $('#addtocart').addClass('disabled');
250 249
                         let itemsName = name;
@@ -329,7 +328,7 @@ debugger;
329 328
 
330 329
     async function getProductDetails(id){
331 330
         
332
-   debugger
331
+ 
333 332
 
334 333
         // let res = await getStatAPIService(`${SERVERNAME}/apis/v4/bizgaze/integrations/products/productattributelist/productid/${id}`);
335 334
   
@@ -412,7 +411,7 @@ debugger;
412 411
             let val = $(el).html();
413 412
             valuesSelected.push(val.trim());
414 413
         });
415
-        debugger;
414
+    
416 415
         let searchParams = window.location.search.split("&");
417 416
         let skuId = window.location.hash.split('#')[1].split('=')[1];
418 417
         // skuId = skuId.split('=')[1]
@@ -437,7 +436,7 @@ debugger;
437 436
                 }
438 437
     
439 438
                 if(isTrue){
440
-                    debugger;
439
+                    
441 440
                     console.log(itemtagscombinationRes[i],'itemtagscombinationRes[i]');
442 441
 
443 442
 
@@ -447,7 +446,7 @@ debugger;
447 446
                     // $('.productname').html(itemtagscombinationRes[i].itemname);
448 447
                     // $('#skudetailitem').val(itemtagscombinationRes[i].sku)
449 448
                     // $('.price').html(itemtagscombinationRes[i].pricelist)
450
-                    // debugger;
449
+               
451 450
                     // appendSpecs(itemtagscombinationRes[i].itemid);
452 451
                     // $('.des_productdes').html(itemtagscombinationRes[i].itemdescription);
453 452
 

+ 6
- 2
dist/Js/products/products.js 查看文件

@@ -83,9 +83,12 @@ debugger;
83 83
         
84 84
         return `<div class="col-lg-4 col-md-6 mb-4 col-md-6 ram_card cursor-pointer">
85 85
         <div class="card border bg-gray-3 rounded-3 p-1 h-100">
86
-        <img src="${img}" alt="${itemname}" class="w-100 h-100"></a>
86
+        
87
+        <a href="/productdetails.html?productId=${RAM_ID}#itemid=${itemid}" class=""><img src="${img}" alt="${itemname}" class="w-100 h-100"></a>
87 88
             <div class="card-body">
88
-                <h5 class="card-title satoshi_font mb-0">${itemname}</h5>
89
+            <a href="/productdetails.html?productId=${RAM_ID}#itemid=${itemid}" class="">
90
+                <h5 class="card-title satoshi_font mb-0 px-2 text-center font-weight-600">${itemname}</h5>
91
+                </a>
89 92
             </div>
90 93
             <ul class="border-0 d-flex h-100 justify-content-between px-md-3 px-4 list-group-flush p-0 text-secondary" style="list-style: none;">
91 94
                 <li class="border-0 py-0">
@@ -99,6 +102,7 @@ debugger;
99 102
                 <a href="/productdetails.html?productId=${RAM_ID}#itemid=${itemid}" class="btn bg-white font-1-2 px-5 w-100">Details
100 103
                 </a>
101 104
             </div>
105
+    
102 106
         </div>
103 107
     </div>`;
104 108
 

+ 37
- 14
dist/Js/shoppingcart/addtocart.js 查看文件

@@ -62,7 +62,7 @@ function updateCartQuantity(id,val){
62 62
 }
63 63
 
64 64
 function removeCartItem(id){
65
-    debugger;
65
+  
66 66
     let data = getCartData();
67 67
     if(!data) return;
68 68
 
@@ -105,7 +105,7 @@ function updateSummaryPriceAdd(){
105 105
 }
106 106
 
107 107
 function initAddToCart(){
108
-debugger;
108
+
109 109
     addEventListeners();
110 110
 
111 111
     function addToCartFun(){
@@ -116,7 +116,7 @@ debugger;
116 116
         if(!data){
117 117
             
118 118
             let cartObj = {};
119
-           debugger;
119
+          
120 120
       
121 121
             cartObj[$('#skudetailitem').val()]  = {
122 122
                 name:$('.productname').html(),
@@ -171,34 +171,57 @@ debugger;
171 171
             }
172 172
             
173 173
         }
174
-debugger;
174
+
175 175
         setLengthCart();
176 176
 
177 177
     }
178 178
     
179 179
     function addEventListeners(){
180
-        $('#addtocart').html('Add to cart')
181
-        $('#addtocart').off().click((e)=>{
182
-            debugger    
180
+        $('#addtocart').html('Add to cart');
181
+        $('#addtocart').removeAttr('gotocart');
182
+        $('#addtocart').off('click').click((e)=>{
183
+     
183 184
             $('.insufficientqty').addClass('d-none');
184 185
             const qty = parseInt($('#addtocart').data('qty'));
185
-            debugger;
186
+      
186 187
             if(parseInt($('#quantity').val())>qty){
187 188
                 $('.insufficientqty').removeClass('d-none');
188 189
                 return;
189 190
             }
190
-            $('#addtocart').off().click(function (el){
191
-                window.location.href = '/shopping-cart.html';
191
+            // $('#addtocart').off().click(function (el){
192
+            //     window.location.href = '/shopping-cart.html';
192 193
 
193
-            });
194
+            // });
194 195
 
195 196
             addToCartFun();
196
-            debugger;
197
+       
197 198
             toasterHelper('success',"Item added to cart","toast-top-right");
198 199
            
199
-           $('#addtocart').html('Go to cart');
200
+        //    $('#addtocart').html('Go to cart');
201
+        //    debugger;
202
+        //    $('#addtocart').attr('gotocart',1);
200 203
         });
201 204
 
205
+        // $('.quantityHTML #quantity').off('change').change(function (e){
206
+        //    let sku =  $('#skudetailitem').val();
207
+        //    let data = getCartData();
208
+        //    const qty = parseInt($('#addtocart').data('qty'));
209
+        //    let isCart =   $('#addtocart').attr('gotocart');
210
+        //    if(!isCart) return;
211
+        //    if(parseInt($('#quantity').val())>qty){
212
+        //     $('.insufficientqty').removeClass('d-none');
213
+        //     return;
214
+        // }
215
+        //    if(!data[sku]){
216
+        //     return;
217
+        //    }
218
+
219
+        //    data[sku].quantity =  $('.quantityHTML #quantity').val();
220
+        //    toasterHelper("success","Your item quantity was been updated","toast-top-right")
221
+        //    setCartData(data);
222
+        //    setLengthCart();
223
+        // })
224
+
202 225
         $('.buynow').off('click').click(async (e)=>{
203 226
             addToCartFun();
204 227
             const res = await COOKIE_HELPER.validateToken();
@@ -212,7 +235,7 @@ debugger;
212 235
             }
213 236
             window.location.href = '/selectdelivery.html';
214 237
 
215
-        });
238
+        }); 
216 239
     }
217 240
 
218 241
     function addtoCart(data){

+ 0
- 1
dist/Js/shoppingcart/shoppingcart.js 查看文件

@@ -1,6 +1,5 @@
1 1
 shoppingCartInit();
2 2
 
3
-debugger;
4 3
 function shoppingCartInit() {
5 4
 
6 5
     shoppingCartAppend();

+ 1
- 0
dist/Js/utils/helpers.js 查看文件

@@ -41,6 +41,7 @@ function getCurrencySymbol(value=0) {
41 41
 function toasterHelper(type,message,align='toast-top-center'){
42 42
     // toasterOpts()
43 43
     debugger;
44
+    toastr.clear()
44 45
     toasterOpts(align);
45 46
 Command: toastr[type](message);
46 47
 

+ 1
- 0
dist/Js/warranty.js 查看文件

@@ -1,4 +1,5 @@
1 1
 function wattantyFunction() {
2
+  setLengthCart();
2 3
   let order_card = `<div class=warranty_product><div class="py-3 warranty_productform"><div class=mb-3><label class=form-label for=Add_serial_number_inp>Enter Your Serial Number</label><input class=form-control id=Add_serial_number_inp  required><label class="form-label text-danger d-none error_serial_num" for=Add_serial_number_inp >Serial Number should not be empty</label></div><div class=mb-3><label class="form-label d-none Add_phonenumber_inp_label" for=Add_phonenumber_inp>Enter Your Phone Number</label> <input type="number" inputmode="tel" class="form-control d-none" pattern="[1-9]{1}[0-9]{9}^[0-9]*$" onKeyPress="if(this.value.length==10) return false;"maxlength="10"  id=Add_phonenumber_inp  required><label class="text-danger d-none form-label error_phonenumber" for=Add_phonenumber_inp>Enter Valid Phone Number</label></div><div class=mb-3><label class="form-label d-none Add_Contact_inp_label" for=Add_contactname_inp>Enter Your Contactname</label> <input class="form-control d-none" id=Add_contactname_inp required></div><div class="serial_submit text-end"><button class="btn btn-dark warranty_serialNumber_check" type="button">Submit</button><button class="btn btn-dark warranty_serialNumber_submit d-none" type="button">Submit</button></div></div></div>`;
3 4
   $(".user_orders").append(order_card);
4 5
   $(".add_serialNum").click(function () {

+ 10
- 4
dist/css/style.css 查看文件

@@ -31778,12 +31778,12 @@ input[type=number]::-webkit-outer-spin-button {
31778 31778
   white-space: nowrap;
31779 31779
   text-align: center;
31780 31780
   line-height: 18px;
31781
-  padding: 0 6px;
31782
-  height: 18px;
31783
-  background: #6a59d3;
31781
+  padding: 0 7px;
31782
+  height: 17px;
31783
+  background: #dc3545;
31784 31784
   position: absolute;
31785 31785
   border-radius: 50%;
31786
-  font-size: 12px;
31786
+  font-size: 10px;
31787 31787
   color: #fff;
31788 31788
   left: 22px;
31789 31789
   top: -8px;
@@ -31816,4 +31816,10 @@ input[type=number]::-webkit-outer-spin-button {
31816 31816
   height: 15px;
31817 31817
   width: 15px;
31818 31818
   margin-top: 4px;
31819
+}
31820
+
31821
+@media (max-width: 768px) {
31822
+  #carouselExampleAutoplaying{
31823
+    padding-top: 3rem;
31824
+  }
31819 31825
 }

+ 1
- 39
orderdetails.html 查看文件

@@ -171,7 +171,7 @@
171 171
                     </div>
172 172
                 </div>
173 173
             </div>
174
-            </div>
174
+            
175 175
         </section>
176 176
     </main>
177 177
     <!-- footer -->
@@ -208,45 +208,7 @@
208 208
 
209 209
 
210 210
     <script>
211
-        $('.owl-carousel.hero_carousel_main').owlCarousel({
212
-            loop: true,
213
-            nav: false,
214
-            dots: true,
215
-            responsive: {
216
-                0: {
217
-                    items: 1
218
-                },
219
-                600: {
220
-                    items: 1
221
-                },
222
-                1000: {
223
-                    items: 1
224
-                }
225
-            }
226
-        });
227 211
 
228
-        // $('.owl-carousel.star-products-img-sec').owlCarousel({
229
-        //     // loop: true,
230
-        //     margin: 10,
231
-        //     rtl: false,
232
-        //     nav: true,
233
-        //     navText: [
234
-        //         "<svg xmlns='http://www.w3.org/2000/svg' width='35' height='35' fill='#B8B8B8' class='bi bi-arrow-left-short' viewBox='0 0 16 16'> <path fill-rule='evenodd' d='M12 8a.5.5 0 0 1-.5.5H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H11.5a.5.5 0 0 1 .5.5z'/></svg>",
235
-        //         "<svg xmlns='http://www.w3.org/2000/svg' width='35' height='35' fill='#B8B8B8' class='bi bi-arrow-right-short' viewBox='0 0 16 16'><path fill-rule='evenodd' d='M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z'/> </svg>"
236
-        //     ],
237
-        //     responsive: {
238
-        //         0: {
239
-        //             items: 1
240
-        //         },
241
-        //         600: {
242
-        //             items: 3
243
-        //         },
244
-        //         1000: {
245
-        //             items: 5
246
-        //         }
247
-        //     }
248
-        // });
249
-        // $('.owl-nav,.owl-dots').wrapAll('<div class="d-flex flex-row-reverse justify-content-between align-items-center"></div>')
250 212
         $(".aw-main-features-toggle").click(function () {
251 213
             $('.feature-bg-image').addClass('d-none');
252 214
             $(".aw-main-features-toggle").addClass('p-4 bg-light')

+ 4
- 3
productdetails.html 查看文件

@@ -302,10 +302,10 @@
302 302
                         </div>
303 303
                         <div class="text-danger pt-2 insufficientqty d-none">Insufficient quantity</div>
304 304
                         <div class=" d-flex  gap-2 mt-2">
305
-                            <button id="addtocart" class="w-100 btn bg-black text-white" style="border-radius: 5px;">
305
+                            <button id="addtocart" class="w-100 bg-gradient-anwi  btn bg-black text-white" style="border-radius: 5px;">
306 306
                                 Add to cart
307 307
                             </button>
308
-                            <button class="w-100 btn buynow bg-black text-white" style="border-radius: 5px;">
308
+                            <button class="w-100 btn bg-gradient-anwi buynow bg-black text-white" style="border-radius: 5px;">
309 309
                                 Buy Now
310 310
                             </button>
311 311
                         </div>
@@ -454,11 +454,12 @@
454 454
     <script src="./libs/cookies.min.js"></script>
455 455
 
456 456
 
457
-    <script src="./dist/js/navbar.js"></script>
457
+
458 458
     <script src="./dist/js/footer.js"></script>
459 459
     <script src="./dist/js/utils/helpers.js"></script>
460 460
     <script src="./dist/js/auth/apiservice.js"></script>
461 461
     <script src="./dist/js/shoppingcart/addtocart.js"></script>
462
+    <script src="./dist/js/navbar.js"></script>
462 463
     <script src="./dist/js/shoppingcart/shoppingcart.js"></script>
463 464
     <script src="./dist/js/productdetails/productdetails.js"></script>
464 465
 

+ 6
- 1
w/index.html 查看文件

@@ -101,8 +101,10 @@
101 101
     <div id="footer-head"></div>
102 102
     <!-- end-footer -->
103 103
     <!-- <script src="./libs/bootstrap/js/bootstrap.bundle.min.js"></script> <script src="./libs/bootstrap/js/bootstrap.bundle.min.js"></script> -->
104
+
105
+
104 106
     <script src="../dist/js/jquery.min.js"></script>
105
-    <script src="../dist/js/navbar.js"></script>
107
+ 
106 108
     <script src="../dist/js/footer.js"></script>
107 109
     <!-- <script src="./dist/Js/components/authloader/authloader.js"></script> -->
108 110
     <!-- <script src="../dist/js/toaster/toastr.js"></script> -->
@@ -127,6 +129,9 @@
127 129
     <script src="../dist/js/plugins/magnific-popup.js"></script>
128 130
     <!-- Main JS -->
129 131
     <!-- <script src="../dist/js/localstorage/loginauthlocal.js"></script> -->
132
+    <script src="./../dist/js/utils/helpers.js"></script>
133
+    <script src="./../dist/js/shoppingcart/addtocart.js"></script>
134
+    <script src="../dist/js/navbar.js"></script>
130 135
     <script src="../dist/js/warranty.js"></script>
131 136
     <!-- <script src="../dist/js/myaccount/Myaccount.js"></script> -->
132 137
     <script src="../dist/js/main.js"></script>

Loading…
取消
儲存