sachinganesh před 2 roky
rodič
revize
249616bfb6

+ 4
- 0
dist/Js/auth/apiservice.js Zobrazit soubor

@@ -149,6 +149,10 @@ class API_SERVICE_CLASS{
149 149
             if(response.data.code != '0'){
150 150
                 return failureResFun(response.data)
151 151
             }
152
+
153
+            if(response.data.errors?.length){
154
+                return failureResFun(response.data)
155
+            }
152 156
             return successResFun(response.data)
153 157
             
154 158
            } catch (error) {

+ 145
- 99
dist/Js/navbar.js Zobrazit soubor

@@ -1,5 +1,50 @@
1
-let nav_html = `
2
-<header class="header-area section-padding-1 transparent-bar">
1
+navINIT();
2
+
3
+function navINIT() {
4
+    loadCart();
5
+    function loadHelper(src = './dist/js/utils/helpers.js'){
6
+        if ($(`script[src="${src}"]`).length > 0) {
7
+          return new Promise((resolve) => resolve);
8
+        }
9
+        return new Promise(function (resolve, reject) {
10
+            var s;
11
+            s = document.createElement('script');
12
+            s.src = src;
13
+            s.onload = resolve;
14
+            s.onerror = reject;
15
+            document.head.appendChild(s);
16
+        });
17
+    }
18
+    async function loadCart(){
19
+
20
+        let files = ['./dist/js/shoppingcart/addtocart.js'];
21
+        await loadHelper();
22
+        for(let i=0;i<files.length;i++){
23
+            if ($(`script[src="${files[i]}"]`).length > 0) {
24
+                continue;
25
+            }
26
+            try {
27
+        
28
+                await loadHelper(files[i])
29
+                console.log("done");
30
+
31
+            } catch (error) {
32
+                console.log(error);
33
+                return;
34
+            }
35
+        }
36
+
37
+         setLengthCart();
38
+        //console.log("hello");
39
+
40
+        
41
+        
42
+      
43
+    }
44
+    let URLNAMENAV = window.location.href;
45
+    const isTransparent = URLNAMENAV.includes('login')||URLNAMENAV.includes('orderconfirmation');
46
+    let nav_html = `
47
+<header class="header-area section-padding-1 transparent-bar" ${isTransparent ?'style="background:#0A1039"' :''}>
3 48
             <div class="header-large-device">
4 49
                 <div class="header-bottom sticky-bar">
5 50
                     <div class="container">
@@ -131,112 +176,113 @@ let nav_html = `
131 176
                 </div>
132 177
             </div>
133 178
         </div>`;
134
-$("#navbar-head").html(nav_html);
135
-let width = $(window).width();
136
-$(".menu-negative-mrg2,.menu-negative-mrg3,.menu-negative-mrg4").css("width",width);
137
- let ele_page = $("body").hasClass("product_pg");
138
- if(ele_page == true){
139
-   $(".header-area").removeClass("bg-white");
140
-   $(".main-menu").find("nav ul li a").addClass("text-white");
141
-   $(".header-bottom.sticky-bar").removeClass("sticky-bar");
142
-   let src =`../dist/assets/imgs/anwi-logo-2.png`;
143
-    $(".logo-menu-wrap").find("a img").attr("src",src);
144
-    $(".main-body").find("iframe").attr("width",width);
145
-    if (width <= 575 && width >= 390) {
146
-       $(".main-body").find("iframe").attr({
147
-          width: width,
148
-          height: 236,
149
-        })
150
-      } else if(width <= 390 && width >= 270){
151
-       $(".main-body").find("iframe").attr({
152
-          width: width,
153
-          height: 210,
154
-        });
155
-      } else if (width <= 998 && width > 575) {
156
-       $(".main-body").find("iframe").attr({
157
-          width: width,
158
-          height: 530,
159
-        });
160
-      } else if(width <= 2720 && width > 1920){
161
-        $(".main-body").find("iframe").attr({
162
-            width: width,
163
-            height: 1440,
164
-          });
165
-      }else {
166
-       $(".main-body").find("iframe").attr({
167
-          width: width,
168
-          height: 860,
169
-        });
170
-      }
171
- }
179
+    $("#navbar-head").html(nav_html);
180
+    let width = $(window).width();
181
+    $(".menu-negative-mrg2,.menu-negative-mrg3,.menu-negative-mrg4").css("width", width);
182
+    let ele_page = $("body").hasClass("product_pg");
183
+    if (ele_page == true) {
184
+        $(".header-area").removeClass("bg-white");
185
+        $(".main-menu").find("nav ul li a").addClass("text-white");
186
+        $(".header-bottom.sticky-bar").removeClass("sticky-bar");
187
+        let src = `../dist/assets/imgs/anwi-logo-2.png`;
188
+        $(".logo-menu-wrap").find("a img").attr("src", src);
189
+        $(".main-body").find("iframe").attr("width", width);
190
+        if (width <= 575 && width >= 390) {
191
+            $(".main-body").find("iframe").attr({
192
+                width: width,
193
+                height: 236,
194
+            })
195
+        } else if (width <= 390 && width >= 270) {
196
+            $(".main-body").find("iframe").attr({
197
+                width: width,
198
+                height: 210,
199
+            });
200
+        } else if (width <= 998 && width > 575) {
201
+            $(".main-body").find("iframe").attr({
202
+                width: width,
203
+                height: 530,
204
+            });
205
+        } else if (width <= 2720 && width > 1920) {
206
+            $(".main-body").find("iframe").attr({
207
+                width: width,
208
+                height: 1440,
209
+            });
210
+        } else {
211
+            $(".main-body").find("iframe").attr({
212
+                width: width,
213
+                height: 860,
214
+            });
215
+        }
216
+    }
172 217
 
173 218
 
174
-$("a.ram_data").click(function () {
175
-    let item_id = $(this).attr("accessories_id");
176
-    let loc_path = '/products.html'
177
-    if (window.location.pathname.includes(loc_path)) {
178
-        window.location.href = `?itemid=${item_id}`
179
-    }
180
-    else {
181
-        window.location.href = `/products.html#itemid=${item_id}`;
182
-    }
183
-})
219
+    $("a.ram_data").click(function () {
220
+        let item_id = $(this).attr("accessories_id");
221
+        let loc_path = '/products.html'
222
+        if (window.location.pathname.includes(loc_path)) {
223
+            window.location.href = `?itemid=${item_id}`
224
+        }
225
+        else {
226
+            window.location.href = `/products.html#itemid=${item_id}`;
227
+        }
228
+    })
184 229
 
185 230
 
186
-$(".main-menu nav ul").find("li").each(function(){
187
-    var current = window.location.pathname;
188
-    var $this = $(this).find("a");
189
-    if(current != "/"){
190
-        if($this.attr('href').indexOf(current) !== -1){
191
-            $(this).addClass('active_nav');
231
+    $(".main-menu nav ul").find("li").each(function () {
232
+        var current = window.location.pathname;
233
+        var $this = $(this).find("a");
234
+        if (current != "/") {
235
+            if ($this.attr('href').indexOf(current) !== -1) {
236
+                $(this).addClass('active_nav');
237
+            }
192 238
         }
193
-    }
194
-    
195
-})
196 239
 
197
-// destroy localstorage data
198
-let loc_path = '/productdetails.html';
199
-if (window.location.pathname.includes(loc_path) === false) {
200
-    localStorage.removeItem("product_data");
201
-    localStorage.removeItem("top_data")
202
-}
240
+    })
203 241
 
242
+    // destroy localstorage data
243
+    let loc_path = '/productdetails.html';
244
+    if (window.location.pathname.includes(loc_path) === false) {
245
+        localStorage.removeItem("product_data");
246
+        localStorage.removeItem("top_data")
247
+    }
204 248
 
205
-//services pages links and sources
206 249
 
207
-let $body_pg = $("body").hasClass("services_page");
208
-let $hm_pg = "../index.html";
209
-let $nav_img ="../dist/assets/imgs/anwi-logo-1.png";
210
-let $footer_img = "../dist/assets/imgs/anwi-logo-2.png";
211
-let $scrool_top_img = "../dist/assets/imgs/Home/rocket-footer.png";
250
+    //services pages links and sources
212 251
 
213
-if($body_pg == true){
214
-$(".header-large-device").find(".logo-menu-wrap .logo").find("a").attr("href",$hm_pg);
215
-$(".header-large-device").find(".logo-menu-wrap .logo").find("a img").attr("src",$nav_img);
216
-$(".mobile-logo").find("a").attr("href",$hm_pg);
217
-$(".mobile-logo").find("a img").attr("src",$nav_img);
218
-    $(".main-menu").find("nav ul").find("li a").each(function(){
219
-        let $arc = $(this).attr("href");
220
-        let $spcial_char = $arc.includes("./");
221
-        if($spcial_char === true){
222
-            let $refarence = `.${$arc}`
223
-            $(this).attr("href",$refarence);
224
-        }
225
-        $(".same-style").find("a").each(function(){
226
-            let $arc1 = $(this).attr("href");
227
-            let $spcial_char1 = $arc1.includes("./");
228
-            if($spcial_char1 === true){
229
-                let $refarence1 = `.${$arc1}`
230
-                $(this).attr("href",$refarence1);
252
+    let $body_pg = $("body").hasClass("services_page");
253
+    let $hm_pg = "../index.html";
254
+    let $nav_img = "../dist/assets/imgs/anwi-logo-1.png";
255
+    let $footer_img = "../dist/assets/imgs/anwi-logo-2.png";
256
+    let $scrool_top_img = "../dist/assets/imgs/Home/rocket-footer.png";
257
+
258
+    if ($body_pg == true) {
259
+        $(".header-large-device").find(".logo-menu-wrap .logo").find("a").attr("href", $hm_pg);
260
+        $(".header-large-device").find(".logo-menu-wrap .logo").find("a img").attr("src", $nav_img);
261
+        $(".mobile-logo").find("a").attr("href", $hm_pg);
262
+        $(".mobile-logo").find("a img").attr("src", $nav_img);
263
+        $(".main-menu").find("nav ul").find("li a").each(function () {
264
+            let $arc = $(this).attr("href");
265
+            let $spcial_char = $arc.includes("./");
266
+            if ($spcial_char === true) {
267
+                let $refarence = `.${$arc}`
268
+                $(this).attr("href", $refarence);
231 269
             }
232
-        })
233
-    });
234
-    $(".clickable-mainmenu-wrap").find("nav ul").find("li a").each(function(){
235
-        let $arc_mbil = $(this).attr("href");
236
-        let $spcial_char_mbil = $arc_mbil.includes("./");
237
-        if($spcial_char_mbil === true){
238
-            let $refarence_mbil = `.${$arc_mbil}`
239
-            $(this).attr("href",$refarence_mbil);
240
-        }
241
-    });
270
+            $(".same-style").find("a").each(function () {
271
+                let $arc1 = $(this).attr("href");
272
+                let $spcial_char1 = $arc1.includes("./");
273
+                if ($spcial_char1 === true) {
274
+                    let $refarence1 = `.${$arc1}`
275
+                    $(this).attr("href", $refarence1);
276
+                }
277
+            })
278
+        });
279
+        $(".clickable-mainmenu-wrap").find("nav ul").find("li a").each(function () {
280
+            let $arc_mbil = $(this).attr("href");
281
+            let $spcial_char_mbil = $arc_mbil.includes("./");
282
+            if ($spcial_char_mbil === true) {
283
+                let $refarence_mbil = `.${$arc_mbil}`
284
+                $(this).attr("href", $refarence_mbil);
285
+            }
286
+        });
287
+    }
242 288
 }

+ 19
- 4
dist/Js/orderconfirmation.js Zobrazit soubor

@@ -5,10 +5,13 @@ function orderConfirmation(){
5 5
         getOrderStatus();
6 6
     }
7 7
 
8
-    function orderlistsummary({name,price,qty,total}){
8
+    function orderlistsummary({name,price,qty,total,img}){
9 9
         let priceAmt = '';
10 10
         let totalAmt = '';
11 11
 
12
+        let defaultImg =img ? imgServerNameBuild(img): `./dist/assets/imgs/nophoto.png`;
13
+
14
+debugger;
12 15
         
13 16
         let [priceSysm,priceamt] = getCurrencySymbol(price)
14 17
         priceAmt = `${priceSysm}${priceamt}`
@@ -20,6 +23,16 @@ function orderConfirmation(){
20 23
 
21 24
         totalAmt = `${qtySymb}${qtyamt}`
22 25
 
26
+        return `<div class="col-sm-6">
27
+        <img src="${defaultImg}" alt="" class="w-100 h-100">
28
+    </div>
29
+    <div class="col-sm-6 d-flex flex-column justify-content-center">
30
+        <div class="itemname"><span class="font-weight-500">${name}</span></div>
31
+        <div> <span>Unit Price :</span><span class="font-weight-500">${priceAmt}</span> </div>
32
+        <div> <span>Quantity :</span><span class="font-weight-500">${qty}</span> </div>
33
+        <div> <span>Total Amount :</span>  <span class="font-weight-500">${totalAmt}</span></div>
34
+    </div>`;
35
+
23 36
         return `
24 37
         <div class="row">
25 38
                             <div class="col-4">
@@ -112,12 +125,14 @@ function orderConfirmation(){
112 125
        let orderItemsListHTML = '';
113 126
 
114 127
        for(let i=0;i<OrderItems.length;i++){
115
-        const {ItemName:name,UnitPrice:price,Quantity:qty,UnitPrice:total} = OrderItems[i];
128
+        const {ItemName:name,UnitPrice:price,Quantity:qty,UnitPrice:total,ItemImage:img} = OrderItems[i];
129
+        debugger;
116 130
         orderItemsListHTML += orderlistsummary({
117 131
             name,
118 132
             price,
119 133
             qty,
120
-            total
134
+            total,
135
+            img
121 136
         });
122 137
        }
123 138
        let userData = COOKIE_HELPER_ACTIONS.getCookie();
@@ -131,7 +146,7 @@ function orderConfirmation(){
131 146
 debugger;
132 147
        localStorage.removeItem(CART_DATA)
133 148
 
134
-
149
+       setLengthCart();
135 150
        removeFullLoader();
136 151
         console.log(resData);
137 152
 

+ 15
- 2
dist/Js/productdetails/productdetails.js Zobrazit soubor

@@ -16,12 +16,21 @@ function startDetails(){
16 16
     let currentClick = null;
17 17
     debugger;
18 18
     if(productId){
19
+        updateProductId(productId);
19 20
        getProductDetails(productId);
20 21
         appendSpecs(productId)
21 22
     }else{
22 23
        window.location.href = "/notfound.html"
23 24
     }
24 25
 
26
+    function updateProductId(val){
27
+        $('#productidtag').val(val);
28
+    }
29
+
30
+    function updateItemId(val){
31
+        $('#itemidtag').val(val);
32
+    }
33
+
25 34
     let specification_wrap_action = {
26 35
         remove(){
27 36
             debugger;
@@ -157,13 +166,15 @@ function startDetails(){
157 166
         appendSpecs(obj.itemid)
158 167
         $('#skudetailitem').val(obj.sku)
159 168
         $('.des_productdes').html(obj.itemdescription);
160
-        $('#addtocart').attr('data-qty',obj.quantity)
169
+        $('#addtocart').attr('data-qty',obj.quantity);
170
+
161 171
         
162 172
         let defaultImg = obj.itemimageurl ? imgServerNameBuild(obj.itemimageurl): `./dist/assets/imgs/nophoto.png`;
163 173
 console.log(obj.itemimageurl,'obj.itemimageurlobj.itemimageurlobj.itemimageurl');
164 174
 debugger;
165 175
         $('.productDetailsMain  > img').attr('src',defaultImg);
166 176
 
177
+        updateItemId(obj.itemid);
167 178
     }
168 179
 
169 180
     function searchComb(){
@@ -229,6 +240,8 @@ debugger;
229 240
                             itemsName += ` ${$(e).html().trim()}`;
230 241
                         });
231 242
 
243
+                        updateItemId(null);
244
+
232 245
                        specification_wrap_action.remove();
233 246
                         $('#skudetailitem').val(-1)
234 247
                          $('.productname').html(itemsName)
@@ -449,7 +462,7 @@ debugger;
449 462
             tagnames = tagnames.split('|');
450 463
             $('.optiontaganwi').removeClass('borderselector');
451 464
             currentComb = itemtagscombinationRes[0];
452
-       
465
+           // updateItemId(itemtagscombinationRes[0].itemid);
453 466
             
454 467
             for(let i=0;i<tagids.length;i++){
455 468
              

+ 4
- 3
dist/Js/products/products.js Zobrazit soubor

@@ -56,7 +56,7 @@ function ramProductsInit(){
56 56
 
57 57
         console.log(res);
58 58
         let html = '';
59
-
59
+debugger;
60 60
         for(let i=0;i<res.length;i++){
61 61
             html += getRamCardHTML(res[i]);
62 62
         }
@@ -73,7 +73,8 @@ function ramProductsInit(){
73 73
         })
74 74
     }
75 75
 
76
-    function getRamCardHTML({itemname,pricelist,itemid,sku}){
76
+    function getRamCardHTML({itemname,pricelist,itemid,sku,itemimageurl}){
77
+        let img = itemimageurl ? imgServerNameBuild(itemimageurl) : './dist/assets/imgs/nophoto.png'
77 78
         let tags = itemname.split('-');
78 79
         let ramTech = tags[tags.length-2];
79 80
         let gb =  tags[tags.length-1];
@@ -86,7 +87,7 @@ function ramProductsInit(){
86 87
                 <div class="product_card_3 shadow ram_card">
87 88
                     <div class="card-item-header">
88 89
                         <div class="card-header-sub-3"><a class=" py-md-1" href="/productdetails.html?productId=${RAM_ID}#itemid=${itemid}">
89
-                        <img src="./dist/assets/imgs/Navbar/ora_ddr4_desktop.png" class="w-100 h-100"></a>
90
+                        <img src="${img}" class="w-100 h-100"></a>
90 91
                         </div>
91 92
                     </div>
92 93
                     <div class="card-item-body">

+ 11
- 5
dist/Js/shoppingcart/addtocart.js Zobrazit soubor

@@ -105,7 +105,7 @@ function updateSummaryPriceAdd(){
105 105
 }
106 106
 
107 107
 function initAddToCart(){
108
-
108
+debugger;
109 109
     addEventListeners();
110 110
 
111 111
     function addToCartFun(){
@@ -124,7 +124,9 @@ function initAddToCart(){
124 124
                 quantity:$('#quantity').val(),
125 125
                 img:$('.productDetailsMain img').attr('src'),
126 126
                 sku:$('#skudetailitem').val(),
127
-                totalQty:qty
127
+                totalQty:qty,
128
+                productid:$('#productidtag').val(),
129
+                itemid:$('#itemidtag').val()
128 130
             }
129 131
 
130 132
 
@@ -149,7 +151,9 @@ function initAddToCart(){
149 151
                     quantity: parseInt(data[sku].quantity)+parseInt(quantity),
150 152
                     img:img,
151 153
                     sku:sku,
152
-                    totalQty:qty
154
+                    totalQty:qty,
155
+                    productid:$('#productidtag').val(),
156
+                    itemid:$('#itemidtag').val()
153 157
                 }
154 158
                 addtoCart(data);
155 159
             }else{
@@ -159,13 +163,15 @@ function initAddToCart(){
159 163
                     quantity:parseInt(quantity),
160 164
                     img:img,
161 165
                     sku:sku,
162
-                    totalQty:qty
166
+                    totalQty:qty,
167
+                    productid:$('#productidtag').val(),
168
+                    itemid:$('#itemidtag').val()
163 169
                 }
164 170
                 addtoCart(data);
165 171
             }
166 172
             
167 173
         }
168
-
174
+debugger;
169 175
         setLengthCart();
170 176
 
171 177
     }

+ 32
- 14
dist/Js/shoppingcart/shoppingcart.js Zobrazit soubor

@@ -4,6 +4,7 @@ debugger;
4 4
 function shoppingCartInit() {
5 5
 
6 6
     shoppingCartAppend();
7
+    let DELETE_FILTER = null;
7 8
 
8 9
     let insufficientQtyActions = {
9 10
         moreQtyAdd(e){
@@ -40,6 +41,7 @@ function shoppingCartInit() {
40 41
             $('.emptyShow').removeClass('d-none');
41 42
         }
42 43
         setLengthCart();
44
+        console.log(products,'products');
43 45
         for (let product in products) {
44 46
 
45 47
             html += shoppingCartDesktopHTML({ ...products[product], total: products[product].quantity * products[product].price, id: product });
@@ -118,6 +120,26 @@ function shoppingCartInit() {
118 120
             }
119 121
         });
120 122
 
123
+        $('.removeitemcartmodal').off('click').click(function (){
124
+            
125
+           
126
+                setCartData( DELETE_FILTER );
127
+                setLengthCart();
128
+                shoppingCartAppend();
129
+
130
+                let len = Object.keys(DELETE_FILTER).length
131
+                if(!len){
132
+    
133
+                    $('.checkoutbtn').addClass('d-none');
134
+                    $('.emptyShow').removeClass('d-none');
135
+                }else{
136
+                    $('.checkoutbtn').removeClass('d-none');
137
+                    $('.emptyShow').addClass('d-none');
138
+                }
139
+
140
+             
141
+        });
142
+
121 143
         $('.btndeletecart').each(function (i, element) {
122 144
             $(element).click(function (e) {
123 145
                 const cardId = $(e.target).data('cartid');
@@ -127,24 +149,20 @@ function shoppingCartInit() {
127 149
                 debugger;
128 150
                 const products = data;
129 151
                 const productsFilter = {};
152
+              
153
+                $('#modalremovecart').html(products[cardId].name);
130 154
                 for (let product in products) {
131 155
                     if (product != cardId) productsFilter[product] = products[product];
132 156
                 }
133 157
 
134 158
 
135 159
                 data  = productsFilter;
136
-                let len = Object.keys(data).length
137
-                if(!len){
138 160
 
139
-                    $('.checkoutbtn').addClass('d-none');
140
-                    $('.emptyShow').removeClass('d-none');
141
-                }else{
142
-                    $('.checkoutbtn').removeClass('d-none');
143
-                    $('.emptyShow').addClass('d-none');
144
-                }
145
-                setCartData(data);
146
-                setLengthCart();
147
-                shoppingCartAppend();
161
+                console.log(data);
162
+                DELETE_FILTER  = data;
163
+                // setCartData(data);
164
+                // setLengthCart();
165
+                // shoppingCartAppend();
148 166
             });
149 167
         });
150 168
 
@@ -199,14 +217,14 @@ function shoppingCartInit() {
199 217
         </div>`
200 218
     }
201 219
 
202
-    function shoppingCartDesktopHTML({ id, img, name, price, description, quantity, total,totalQty }) {
220
+    function shoppingCartDesktopHTML({ id, img, name, price, description, quantity, total,totalQty,productid,itemid }) {
203 221
         const [currencySymbol,amt] = getCurrencySymbol(price);
204 222
         return `
205 223
         <div class="row bg-white  border-bottom py-4 d-flex justify-content-center align-items-center">
206 224
         <div class="col-md-2 text-center"><img src="${img}" alt="${name}" class="img-fluid"></div>
207 225
         <div class="col-md-4 ">
208 226
           
209
-            <a class="text-decoration-none text-blue fw-600 cursor-pointer" href="/productdetails.html?productId=${id}">${name}</a>
227
+            <a class="text-decoration-none text-blue fw-600 cursor-pointer" href="productdetails.html?productId=${productid}#itemid=${itemid}">${name}</a>
210 228
             <small>${description||''}</small>
211 229
             <span class="badge d-none text-bg-warning">8 Offers ></span>   
212 230
         </div>
@@ -222,7 +240,7 @@ function shoppingCartInit() {
222 240
                 <p class="fw-bold m-0"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-currency-rupee" viewBox="0 0 16 16">
223 241
                     <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"/>
224 242
                   </svg>${total}</p>
225
-                <span class="btndeletecart cursor-pointer fw-500 text-danger" data-cartid="${id}">x</span>
243
+                <span class="btndeletecart cursor-pointer fw-500 text-danger" data-cartid="${id}" data-bs-toggle="modal" data-bs-target="#deletecartmodal">x</span>
226 244
             </div>
227 245
         </div>
228 246
         <div class="warrenty-sec px-3 sec-space-4 d-none">

+ 29
- 15
dist/Js/utils/helpers.js Zobrazit soubor

@@ -3,6 +3,17 @@ const uid = function(){
3 3
     return Date.now().toString(36) + Math.random().toString(36).substr(2);
4 4
 }
5 5
 
6
+function loadScript(src) {
7
+    return new Promise(function (resolve, reject) {
8
+        var s;
9
+        s = document.createElement('script');
10
+        s.src = src;
11
+        s.onload = resolve;
12
+        s.onerror = reject;
13
+        document.head.appendChild(s);
14
+    });
15
+}
16
+
6 17
 
7 18
 function shuffleArray(array) {
8 19
     for (let i = array.length - 1; i > 0; i--) {
@@ -29,24 +40,27 @@ function getCurrencySymbol(value=0) {
29 40
 
30 41
 function toasterHelper(type,message){
31 42
     // toasterOpts()
43
+    debugger;
44
+    toasterOpts();
32 45
 Command: toastr[type](message);
46
+
33 47
 function toasterOpts(){
34 48
     toastr.options = {
35
-      "closeButton": true,
36
-      "debug": false,
37
-      "newestOnTop": true,
38
-      "progressBar": true,
39
-      "positionClass": "toast-top-center",
40
-      "preventDuplicates": true,
41
-      "onclick": null,
42
-      "showDuration": "300",
43
-      "hideDuration": "1000",
44
-      "timeOut": "5000",
45
-      "extendedTimeOut": "1000",
46
-      "showEasing": "swing",
47
-      "hideEasing": "linear",
48
-      "showMethod": "fadeIn",
49
-      "hideMethod": "fadeOut"
49
+        "closeButton": true,
50
+        "debug": false,
51
+        "newestOnTop": true,
52
+        "progressBar": true,
53
+        "positionClass": "toast-top-center",
54
+        "preventDuplicates": true,
55
+        "onclick": null,
56
+        "showDuration": "300",
57
+        "hideDuration": "1000",
58
+        "timeOut": "5000",
59
+        "extendedTimeOut": "1000",
60
+        "showEasing": "swing",
61
+        "hideEasing": "linear",
62
+        "showMethod": "fadeIn",
63
+        "hideMethod": "fadeOut"
50 64
     }
51 65
   }
52 66
 }

+ 5
- 2
index1.html Zobrazit soubor

@@ -298,13 +298,16 @@
298 298
     <!-- footer -->
299 299
     <div id="footer-head" class="sec-space-12"></div>
300 300
     <!-- end-footer -->
301
+    <script src="./libs/cookies.min.js"></script>
302
+    <script src="./libs/axios.min.js"></script>
303
+    <script src="./dist/js/utils/helpers.js"></script>
301 304
     <script src="./libs/bootstrap/js/bootstrap.bundle.min.js"></script>
302 305
     <script src="./dist/js/jquery.min.js"></script>
303 306
     <script src="./libs/owlcarousel/js/owl.carousel.min.js"></script>
304 307
     <script src="./dist/js/navbar.js"></script>
305
-    <script src="./dist/js/axios.min.js"></script>
308
+  
306 309
     <script src="./dist/js/footer.js"></script>
307
-    <script src="./dist/js/cookies.min.js"></script>
310
+    
308 311
     <script src="./dist/js/fontawesome.all.js"></script>
309 312
     <script src="./dist/js/fontawesome.min.js"></script>
310 313
     <script src="./dist/js/vendor/modernizr-3.11.7.min.js"></script>

+ 3
- 1
login.html Zobrazit soubor

@@ -562,6 +562,8 @@
562 562
     <!-- end-footer -->
563 563
     <script src="./libs/bootstrap/js/bootstrap.bundle.min.js"></script>
564 564
     <script src="./dist/js/jquery.min.js"></script>
565
+    <script src="./dist/js/utils/helpers.js"></script>
566
+
565 567
     <script src="./libs/owlcarousel/js/owl.carousel.min.js"></script>
566 568
     <script src="./dist/js/shoppingcart/addtocart.js"></script>
567 569
     <script src="./dist/js/auth/apiservice.js"></script>
@@ -583,7 +585,7 @@
583 585
     <script src="./dist/js/utils/CookieHelper.js"></script>
584 586
     <script src="./dist/toaster/toastr.js"></script>
585 587
     <script src="./dist/js/auth/login.js"></script>
586
-    <script src="./dist/js/navbar1.js"></script>
588
+    <script src="./dist/js/navbar.js"></script>
587 589
     <script src="./dist/js/footer.js"></script>
588 590
     <!-- Main JS -->
589 591
     <script src="./dist/js/main.js"></script>

+ 13
- 4
orderconfirmation.html Zobrazit soubor

@@ -67,7 +67,7 @@
67 67
                 <hr class="m-0 p-0"/>
68 68
                 <div class="p-3">
69 69
                     <div>
70
-                        <div class="row">
70
+                        <div class="row d-none">
71 71
                             <div class="col-4 font-weight-600">
72 72
                                 Order Summary
73 73
                             </div>
@@ -81,8 +81,16 @@
81 81
                                Total
82 82
                              </div>
83 83
                         </div>
84
-                        <div class="orderlistconfirm">
85
-
84
+                        <div class="orderlistconfirm row">
85
+                            <div class="col-sm-4">
86
+                                <img src="./dist/assets/imgs/accessiories/processed-079a4496-e3fb-44fe-81ab-d0ca2e5cdfdd_ZHABV48Z.jpeg" alt="" class="w-100 h-100">
87
+                            </div>
88
+                            <div class="col-sm-8 ">
89
+                                <div class="itemname">${name}</div>
90
+                                <div> ${priceAmt}</div>
91
+                                <div> ${qty}</div>
92
+                                <div> ${totalAmt}</div>
93
+                            </div>
86 94
                         </div>
87 95
                     </div>
88 96
                 </div>
@@ -116,7 +124,7 @@
116 124
 
117 125
     <script src="./libs/bootstrap/js/bootstrap.bundle.min.js"></script>
118 126
     <script src="./dist/js/jquery.min.js"></script>
119
-    <script src="./dist/js/navbar1.js"></script>
127
+
120 128
 
121 129
     <script src="./dist/js/footer.js"></script>
122 130
     <script src="./libs/cookies.min.js"></script>
@@ -138,6 +146,7 @@
138 146
 
139 147
 
140 148
     <script src="./dist/js/orderconfirmation.js"></script>
149
+    <script src="./dist/js/navbar.js"></script>
141 150
 
142 151
   
143 152
 

+ 3
- 1
press.html Zobrazit soubor

@@ -305,7 +305,7 @@
305 305
   <script src="./libs/bootstrap/js/bootstrap.bundle.min.js"></script>
306 306
   <script src="./dist/js/jquery.min.js"></script>
307 307
   <script src="./libs/owlcarousel/js/owl.carousel.min.js"></script>
308
-  <script src="./dist/js/navbar.js"></script>
308
+
309 309
   <script src="./dist/js/axios.min.js"></script>
310 310
   <script src="./dist/js/footer.js"></script>
311 311
     <script src="./libs/cookies.min.js"></script>
@@ -324,8 +324,10 @@
324 324
   <script src="./dist/js/plugins/isotope.js"></script>
325 325
   <script src="./dist/js/plugins/jquery-ui.js"></script>
326 326
   <script src="./dist/js/plugins/magnific-popup.js"></script>
327
+  <script src="./dist/js/navbar.js"></script>
327 328
   <!-- Main JS -->
328 329
   <script src="./dist/js/main.js"></script>
330
+
329 331
   <script>
330 332
 
331 333
     let list_imgs = [

+ 2
- 0
productdetails.html Zobrazit soubor

@@ -63,6 +63,8 @@
63 63
                             <div class="d-none">
64 64
                             <!-- <div class="d-none d-xl-flex flex-column col-xl-2"> -->
65 65
                                 <div class=" d-flex flex-column gap-2 p-2 d-none">
66
+                                    <input type="hidden" id="productidtag">
67
+                                    <input type="hidden" id="itemidtag">
66 68
                                    <!--  <div class="product-item-gallery active-gallery-img">
67 69
                                         <img src="./dist/assets/imgs/Navbar/Accessiories-1.png" alt=""
68 70
                                             class="w-100 h-100">

+ 3
- 1
selectdelivery.html Zobrazit soubor

@@ -257,6 +257,7 @@
257 257
             </div>
258 258
         </div>
259 259
     </div>
260
+   
260 261
     <!-- footer -->
261 262
     <div id="footer-head" class=""></div>
262 263
     <div class="paymentgatewaypage d-none">
@@ -273,7 +274,7 @@
273 274
     <!-- <script src="./libs/select2/select2.js"></script> -->
274 275
 
275 276
   
276
-    <script src="./dist/js/navbar.js"></script>
277
+
277 278
     <script src="./libs/axios.min.js"></script>
278 279
     <script src="./dist/js/footer.js"></script>
279 280
     <script src="./libs/cookies.min.js"></script>
@@ -302,6 +303,7 @@
302 303
     <script src="./dist/js/components/authloader/authloader.js"></script>
303 304
 
304 305
     <script src="./dist/js/localstorage/checkout.js"></script>
306
+    <script src="./dist/js/navbar.js"></script>
305 307
     <!-- <script src="./dist/js/shoppingcart/selectdelivery.js"></script> -->
306 308
     <script src="./dist/js/shoppingcart/select_delivery.js"></script>
307 309
 

+ 32
- 1
shopping-cart.html Zobrazit soubor

@@ -361,12 +361,43 @@
361 361
             <!-- delivery to -->
362 362
         </div>
363 363
     </main>
364
+
365
+     <!-- modal -->
366
+ <!-- Button trigger modal -->
367
+ <!-- <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#deletecartmodal">
368
+    Launch demo modal
369
+  </button> -->
370
+  
371
+  <!-- Modal -->
372
+  <div class="modal fade" id="deletecartmodal" tabindex="-1" aria-labelledby="modalremovecart" aria-hidden="true">
373
+    <div class="modal-dialog">
374
+      <div class="modal-content">
375
+        <div class="modal-header">
376
+          <h1 class="modal-title fs-5" id="modalremovecart">Modal title</h1>
377
+          <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
378
+        </div>
379
+        <div class="modal-body">
380
+         <div>
381
+           Are you sure? You want to delete this item?
382
+         </div>
383
+        </div>
384
+        <div class="modal-footer">
385
+          <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
386
+          <button type="button" data-bs-dismiss="modal" class="btn btn-danger removeitemcartmodal">Remove item</button>
387
+        </div>
388
+      </div>
389
+    </div>
390
+  </div>
391
+
392
+    <!-- modal -->
393
+
364 394
     <!-- footer -->
365 395
     <div id="footer-head"></div>
366 396
     <!-- end-footer -->
367 397
     <script src="./libs/bootstrap/js/bootstrap.bundle.min.js"></script>
368 398
     <script src="./dist/js/jquery.min.js"></script>
369 399
     <script src="./libs/owlcarousel/js/owl.carousel.min.js"></script>
400
+    <script src="./dist/js/utils/helpers.js"></script>
370 401
     <script src="./dist/js/navbar.js"></script>
371 402
     <script src="./libs/axios.min.js"></script>
372 403
     <script src="./dist/js/footer.js"></script>
@@ -388,7 +419,7 @@
388 419
     <script src="./dist/js/plugins/jquery-ui.js"></script>
389 420
     <script src="./dist/js/plugins/magnific-popup.js"></script>
390 421
     <!-- Main JS -->
391
-    <script src="./dist/js/utils/helpers.js"></script>
422
+    
392 423
     <script src="./dist/js/main.js"></script>
393 424
     <script src="./dist/js/auth/apiservice.js"></script>
394 425
     <script src="./dist/js/shoppingcart/addtocart.js"></script>  

Loading…
Zrušit
Uložit