added aio landing page

This commit is contained in:
2024-04-04 15:01:14 +05:30
parent a12121bc5b
commit d3532c6cb8
24 changed files with 2263 additions and 3122 deletions
+2 -1
View File
@@ -1,9 +1,10 @@
@import "./libs/bootstrap/css/bootstrap.min.css"; @import "./libs/bootstrap/css/bootstrap.min.css";
@import "./dist/css/main.css"; @import "./dist/css/main.css";
@import "./style.css"; @import "./style.css";
/* @import "./styles/style.css"; */
@import "./libs/owlcarousel/Css/owl.carousel.min.css"; @import "./libs/owlcarousel/Css/owl.carousel.min.css";
@import "./libs/owlcarousel/Css/owl.theme.default.min.css"; @import "./libs/owlcarousel/Css/owl.theme.default.min.css";
@import ".dist/css/pages/productdetails.css"; @import "./dist/css/pages/productdetails.css";
@import "./dist/css/font_icon.min.css"; @import "./dist/css/font_icon.min.css";
Binary file not shown.

After

Width:  |  Height:  |  Size: 993 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1022 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

+2 -2
View File
@@ -4144,7 +4144,7 @@ textarea:focus {
.main-menu>nav>ul>li>a { .main-menu>nav>ul>li>a {
font-size: 12px; font-size: 12px;
color: #fff; color: #fff;
display: inline-block; /* display: inline-block; */
font-weight: 600; font-weight: 600;
; ;
} }
@@ -4152,7 +4152,7 @@ textarea:focus {
.header-bottom.sticky-bar.stick .main-menu>nav>ul>li>a { .header-bottom.sticky-bar.stick .main-menu>nav>ul>li>a {
font-size: 12px; font-size: 12px;
color: #0A1039; color: #0A1039;
display: inline-block; /* display: inline-block; */
font-weight: 600; font-weight: 600;
; ;
} }
+107 -84
View File
@@ -1,13 +1,11 @@
navINIT(); navINIT();
function navINIT() { function navINIT() {
async function getAllProdouctsIds() { async function getAllProdouctsIds() {
let res = await API_SERVICES_ACTIONS.getAPIService('apis/v4/bizgaze/integrations/products/getallproducts',true); let res = await API_SERVICES_ACTIONS.getAPIService(
"apis/v4/bizgaze/integrations/products/getallproducts",
true
);
if (res.isError) { if (res.isError) {
return; return;
} }
@@ -21,14 +19,14 @@ function navINIT() {
// ACCESSORIES // ACCESSORIES
switch (productname) { switch (productname) {
case 'Zeno Sleekbook': case "Zeno Sleekbook":
appendIdNav('zenosleekbook',id); appendIdNav("zenosleekbook", id);
break; break;
case 'Zeno Dualbook': case "Zeno Dualbook":
appendIdNav('zenodualbook',id); appendIdNav("zenodualbook", id);
break; break;
case "FYRO Flagship": case "FYRO Flagship":
appendIdNav('fyroflagship',id); appendIdNav("fyroflagship", id);
break; break;
case "AIO Fyro": case "AIO Fyro":
// appendIdNav('fyroaio',id); // appendIdNav('fyroaio',id);
@@ -42,25 +40,27 @@ function navINIT() {
} }
function appendIdNav(className, id) { function appendIdNav(className, id) {
let html = $(`.${className}`).attr('href'); let html = $(`.${className}`).attr("href");
const pattern = /{[^}]+}/g; const pattern = /{[^}]+}/g;
const replacedString = html.replace(pattern, id); const replacedString = html.replace(pattern, id);
$(`.${className}`).parents('.nav-tab-show').removeClass('d-none') $(`.${className}`).parents(".nav-tab-show").removeClass("d-none");
$(`.${className}`).attr('href',replacedString); $(`.${className}`).attr("href", replacedString);
} }
if(!window.location.href.includes('orderconfirmation')&&!window.location.href.includes('/w/')){ if (
!window.location.href.includes("orderconfirmation") &&
!window.location.href.includes("/w/")
) {
loadCart(); loadCart();
} }
function loadHelper(src = './dist/js/utils/helpers.js'){ function loadHelper(src = "./dist/js/utils/helpers.js") {
if ($(`script[src="${src}"]`).length > 0) { if ($(`script[src="${src}"]`).length > 0) {
return new Promise((resolve) => resolve()); return new Promise((resolve) => resolve());
} }
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
var s; var s;
s = document.createElement('script'); s = document.createElement("script");
s.src = src; s.src = src;
s.onload = resolve; s.onload = resolve;
s.onerror = reject; s.onerror = reject;
@@ -68,17 +68,15 @@ function navINIT() {
}); });
} }
async function loadCart() { async function loadCart() {
if (!window.location.href.includes("services/paymentmethod.html")) {
if(!window.location.href.includes('services/paymentmethod.html')){ let files = ["./dist/js/shoppingcart/addtocart.js"];
let files = ['./dist/js/shoppingcart/addtocart.js'];
await loadHelper(); await loadHelper();
for (let i = 0; i < files.length; i++) { for (let i = 0; i < files.length; i++) {
if ($(`script[src="${files[i]}"]`).length > 0) { if ($(`script[src="${files[i]}"]`).length > 0) {
continue; continue;
} }
try { try {
await loadHelper(files[i]) await loadHelper(files[i]);
} catch (error) { } catch (error) {
return; return;
} }
@@ -88,16 +86,17 @@ function navINIT() {
setLengthCart(); setLengthCart();
getAllProdouctsIds(); getAllProdouctsIds();
//console.log("hello"); //console.log("hello");
} }
let URLNAMENAV = window.location.href; let URLNAMENAV = window.location.href;
const isTransparent = URLNAMENAV.includes('login')||URLNAMENAV.includes('orderconfirmation')|| URLNAMENAV.includes('services/paymentmethod.html'); const isTransparent =
URLNAMENAV.includes("login") ||
URLNAMENAV.includes("orderconfirmation") ||
URLNAMENAV.includes("services/paymentmethod.html");
debugger; debugger;
let nav_html = ` let nav_html = `
<header class="header-area section-padding-1 transparent-bar" ${isTransparent ?'style="background:#fff"' :''}> <header class="header-area section-padding-1 transparent-bar" ${
isTransparent ? 'style="background:#fff"' : ""
}>
<div class="header-large-device"> <div class="header-large-device">
<div class="header-bottom sticky-bar"> <div class="header-bottom sticky-bar">
<div class="container"> <div class="container">
@@ -160,7 +159,7 @@ function navINIT() {
<div class="position-relative nav-tab-show"> <div class="position-relative nav-tab-show">
<a class="h-100 nav_items zenoaio" href="/laptopdetails.html?AIO Zeno#productId=106633230000026#itemid=106633240000112"> <a class="h-100 nav_items zenoaio" href="/laptopdetails.html?AIO Zeno#productId=106633230000026#itemid=106633240000112">
<div style="" class="align-items-center cursor-pointer d-flex flex-column h-100 justify-content-center rounded-3"> <div style="" class="align-items-center cursor-pointer d-flex flex-column h-100 justify-content-center rounded-3">
<img src="https://assets.bizgaze.com/_files/documents/663/801719ca-c57b-4652-8ab9-37e7dcaab746/aio-removebg-preview.png" alt="ora img" class="nav_imgs"/> <img src="https://assets.bizgaze.com/_files/documents/663/3e4f2cb7-e48e-4805-a70e-78277dd2ac39/home-aio.png" alt="ora img" class="nav_imgs"/>
<p class="mb-0 text-center text-dark w-100">Zeno All in ones</p> <p class="mb-0 text-center text-dark w-100">Zeno All in ones</p>
</div> </div>
</a> </a>
@@ -263,7 +262,11 @@ function navINIT() {
<h2 class="titleproductnav sub_nav_item me-3 fs-9"></h2></span> <h2 class="titleproductnav sub_nav_item me-3 fs-9"></h2></span>
<ul class="d-flex mb-0 py-3 justify-content-center align-items-center" style="list-style:none;"> <ul class="d-flex mb-0 py-3 justify-content-center align-items-center" style="list-style:none;">
<li> <li>
<a data-overview="#${window.location.href.includes('Zeno')?'overview_data_zeno':'overview_data_fyro'}" class="sub_nav_item overview me-3 fs-9">Overview</a> <a data-overview="#${
window.location.href.includes("Zeno")
? "overview_data_zeno"
: "overview_data_fyro"
}" class="sub_nav_item overview me-3 fs-9">Overview</a>
</li> </li>
<li> <li>
<a data-spec="true" class="sub_nav_item me-3 fs-9 overviewspecs">Specifications</a> <a data-spec="true" class="sub_nav_item me-3 fs-9 overviewspecs">Specifications</a>
@@ -451,21 +454,25 @@ function navINIT() {
</div>`; </div>`;
$("#navbar-head").html(nav_html); $("#navbar-head").html(nav_html);
$('.explandlinavnameparent').click(function (e){ $(".explandlinavnameparent").click(function (e) {
let parentElement = $(e.target).parents(".expandlinav");
let parentElement = $(e.target).parents('.expandlinav'); if ($(parentElement).find(".content-expandlinav").hasClass("d-none")) {
if($(parentElement).find('.content-expandlinav').hasClass('d-none')){ const name = $(parentElement).find(".viewall_li").data("name");
const name = $(parentElement).find('.viewall_li').data('name'); $(parentElement)
$(parentElement).find('.viewall_li').html(`<a href="${name}">view all</a>`); .find(".viewall_li")
$(parentElement).find('.content-expandlinav').removeClass('d-none'); .html(`<a href="${name}">view all</a>`);
$(parentElement).find(".content-expandlinav").removeClass("d-none");
} else { } else {
$(parentElement).find('.viewall_li').html('+'); $(parentElement).find(".viewall_li").html("+");
$(parentElement).find('.content-expandlinav').addClass('d-none'); $(parentElement).find(".content-expandlinav").addClass("d-none");
} }
}); });
let width = $(window).width(); let width = $(window).width();
$(".menu-negative-mrg2,.menu-negative-mrg3,.menu-negative-mrg4").css("width", width); $(".menu-negative-mrg2,.menu-negative-mrg3,.menu-negative-mrg4").css(
"width",
width
);
let ele_page = $("body").hasClass("product_pg"); let ele_page = $("body").hasClass("product_pg");
if (ele_page == true) { if (ele_page == true) {
$(".header-area").removeClass("bg-white"); $(".header-area").removeClass("bg-white");
@@ -478,7 +485,7 @@ function navINIT() {
$(".main-body").find("iframe").attr({ $(".main-body").find("iframe").attr({
width: width, width: width,
height: 236, height: 236,
}) });
} else if (width <= 390 && width >= 270) { } else if (width <= 390 && width >= 270) {
$(".main-body").find("iframe").attr({ $(".main-body").find("iframe").attr({
width: width, width: width,
@@ -499,8 +506,7 @@ function navINIT() {
width: width, width: width,
height: 1132, height: 1132,
}); });
} } else if (width <= 1920 && width > 1620) {
else if(width <= 1920 && width > 1620){
$(".main-body").find("iframe").attr({ $(".main-body").find("iframe").attr({
width: width, width: width,
height: 1083, height: 1083,
@@ -513,18 +519,15 @@ function navINIT() {
} }
} }
$("a.ram_data").click(function () { $("a.ram_data").click(function () {
let item_id = $(this).attr("accessories_id"); let item_id = $(this).attr("accessories_id");
let loc_path = '/products.html' let loc_path = "/products.html";
if (window.location.pathname.includes(loc_path)) { if (window.location.pathname.includes(loc_path)) {
window.location.href = `?itemid=${item_id}` window.location.href = `?itemid=${item_id}`;
} } else {
else {
window.location.href = `/products.html#itemid=${item_id}`; window.location.href = `/products.html#itemid=${item_id}`;
} }
}) });
// $(".main-menu nav ul").find("li").each(function () { // $(".main-menu nav ul").find("li").each(function () {
// var current = window.location.pathname; // var current = window.location.pathname;
@@ -538,22 +541,18 @@ function navINIT() {
// }) // })
// destroy localstorage data // destroy localstorage data
let loc_path = '/productdetails.html'; let loc_path = "/productdetails.html";
if (window.location.pathname.includes(loc_path) === false) { if (window.location.pathname.includes(loc_path) === false) {
localStorage.removeItem("product_data"); localStorage.removeItem("product_data");
localStorage.removeItem("top_data") localStorage.removeItem("top_data");
} }
let loc_path1 = '/productcatloguedetails.html'; let loc_path1 = "/productcatloguedetails.html";
if (window.location.pathname.includes(loc_path1) === false) { if (window.location.pathname.includes(loc_path1) === false) {
localStorage.removeItem("product_catlogue_obj"); localStorage.removeItem("product_catlogue_obj");
} }
//services pages links and sources //services pages links and sources
let $body_pg = $("body").hasClass("services_page"); let $body_pg = $("body").hasClass("services_page");
let $hm_pg = "../index.html"; let $hm_pg = "../index.html";
let $nav_img = "../dist/assets/imgs/anwi-logo-1.png"; let $nav_img = "../dist/assets/imgs/anwi-logo-1.png";
@@ -565,34 +564,58 @@ function navINIT() {
let img_src = `./dist/assets/imgs/anwi-logo-1.png`; let img_src = `./dist/assets/imgs/anwi-logo-1.png`;
$(".logo-menu-wrap").find(".logo a img").attr("src", img_src); $(".logo-menu-wrap").find(".logo a img").attr("src", img_src);
$(".header-bottom").addClass("sticky-bar stick"); $(".header-bottom").addClass("sticky-bar stick");
$("body.about_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#000"); $("body.about_page")
.find(".header-large-device")
.find(".header-action-wrap")
.find(".same-style")
.find("svg")
.find("path")
.attr("fill", "#000");
} }
if ($body_pg == true) { if ($body_pg == true) {
$(".header-large-device").find(".logo-menu-wrap .logo").find("a").attr("href", $hm_pg); $(".header-large-device")
$(".header-large-device").find(".logo-menu-wrap .logo").find("a img").attr("src", $nav_img); .find(".logo-menu-wrap .logo")
.find("a")
.attr("href", $hm_pg);
$(".header-large-device")
.find(".logo-menu-wrap .logo")
.find("a img")
.attr("src", $nav_img);
$(".mobile-logo").find("a").attr("href", $hm_pg); $(".mobile-logo").find("a").attr("href", $hm_pg);
$(".mobile-logo").find(".logo a img").attr("src", $nav_img); $(".mobile-logo").find(".logo a img").attr("src", $nav_img);
$("body.services_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#000"); $("body.services_page")
$(".main-menu").find("nav ul").find("li a").each(function () { .find(".header-large-device")
$(this).addClass("text-dark") .find(".header-action-wrap")
.find(".same-style")
.find("svg")
.find("path")
.attr("fill", "#000");
$(".main-menu")
.find("nav ul")
.find("li a")
.each(function () {
$(this).addClass("text-dark");
$(".header-bottom").addClass("sticky-bar stick"); $(".header-bottom").addClass("sticky-bar stick");
let $arc = $(this).attr("href"); let $arc = $(this).attr("href");
let $spcial_char = $arc.includes("./"); let $spcial_char = $arc.includes("./");
if ($spcial_char === true) { if ($spcial_char === true) {
let $refarence = `.${$arc}` let $refarence = `.${$arc}`;
$(this).attr("href", $refarence); $(this).attr("href", $refarence);
} }
}); });
$(".same-style").find("a").each(function () { $(".same-style")
.find("a")
.each(function () {
let $arc1 = $(this).attr("href"); let $arc1 = $(this).attr("href");
let $spcial_char1 = $arc1.includes("./"); let $spcial_char1 = $arc1.includes("./");
if ($spcial_char1 === true) { if ($spcial_char1 === true) {
let $refarence1 = `.${$arc1}` let $refarence1 = `.${$arc1}`;
$(this).attr("href", $refarence1); $(this).attr("href", $refarence1);
} }
}) });
$(".tab-content").find("img").each(function(){ $(".tab-content")
.find("img")
.each(function () {
let $img_src = $(this).attr("src"); let $img_src = $(this).attr("src");
let $img_src1 = $img_src.includes("./"); let $img_src1 = $img_src.includes("./");
if ($img_src1 === true) { if ($img_src1 === true) {
@@ -600,11 +623,14 @@ function navINIT() {
$(this).attr("src", $refarenceimg1); $(this).attr("src", $refarenceimg1);
} }
}); });
$(".clickable-mainmenu-wrap").find("nav ul").find("li a").each(function () { $(".clickable-mainmenu-wrap")
.find("nav ul")
.find("li a")
.each(function () {
let $arc_mbil = $(this).attr("href"); let $arc_mbil = $(this).attr("href");
let $spcial_char_mbil = $arc_mbil.includes("./"); let $spcial_char_mbil = $arc_mbil.includes("./");
if ($spcial_char_mbil === true) { if ($spcial_char_mbil === true) {
let $refarence_mbil = `.${$arc_mbil}` let $refarence_mbil = `.${$arc_mbil}`;
$(this).attr("href", $refarence_mbil); $(this).attr("href", $refarence_mbil);
} }
}); });
@@ -612,26 +638,23 @@ function navINIT() {
setTimeout(() => { setTimeout(() => {
if (width <= 600) { if (width <= 600) {
$('.same-style').find('svg path').attr('fill','#000'); $(".same-style").find("svg path").attr("fill", "#000");
} }
}, 300); }, 300);
// overview // overview
$('.overview').click(function (e){ $(".overview").click(function (e) {
let name = $(e.target).data('overview'); let name = $(e.target).data("overview");
document.querySelector(name)?.scrollIntoView({ document.querySelector(name)?.scrollIntoView({
behavior: 'smooth' behavior: "smooth",
});
});
$('.overviewspecs').click(function (e){
document.querySelector('#specification_data')?.scrollIntoView({
behavior: 'smooth'
}); });
}); });
$(".overviewspecs").click(function (e) {
document.querySelector("#specification_data")?.scrollIntoView({
behavior: "smooth",
});
});
} }
+116 -89
View File
@@ -1,13 +1,11 @@
navINIT(); navINIT();
function navINIT() { function navINIT() {
async function getAllProdouctsIds() { async function getAllProdouctsIds() {
let res = await API_SERVICES_ACTIONS.getAPIService('apis/v4/bizgaze/integrations/products/getallproducts',true); let res = await API_SERVICES_ACTIONS.getAPIService(
"apis/v4/bizgaze/integrations/products/getallproducts",
true
);
if (res.isError) { if (res.isError) {
console.log(res.errorMsg); console.log(res.errorMsg);
return; return;
@@ -22,14 +20,14 @@ function navINIT() {
// ACCESSORIES // ACCESSORIES
switch (productname) { switch (productname) {
case 'Zeno Sleekbook': case "Zeno Sleekbook":
appendIdNav('zenosleekbook',id); appendIdNav("zenosleekbook", id);
break; break;
case 'Zeno Dualbook': case "Zeno Dualbook":
appendIdNav('zenodualbook',id); appendIdNav("zenodualbook", id);
break; break;
case "FYRO Flagship": case "FYRO Flagship":
appendIdNav('fyroflagship',id); appendIdNav("fyroflagship", id);
break; break;
case "AIO Fyro": case "AIO Fyro":
// appendIdNav('fyroaio',id); // appendIdNav('fyroaio',id);
@@ -43,25 +41,27 @@ function navINIT() {
} }
function appendIdNav(className, id) { function appendIdNav(className, id) {
let html = $(`.${className}`).attr('href'); let html = $(`.${className}`).attr("href");
const pattern = /{[^}]+}/g; const pattern = /{[^}]+}/g;
const replacedString = html.replace(pattern, id); const replacedString = html.replace(pattern, id);
$(`.${className}`).parents('.nav-tab-show').removeClass('d-none') $(`.${className}`).parents(".nav-tab-show").removeClass("d-none");
$(`.${className}`).attr('href',replacedString); $(`.${className}`).attr("href", replacedString);
} }
if(!window.location.href.includes('orderconfirmation')&&!window.location.href.includes('/w/')){ if (
!window.location.href.includes("orderconfirmation") &&
!window.location.href.includes("/w/")
) {
loadCart(); loadCart();
} }
function loadHelper(src = './dist/js/utils/helpers.js'){ function loadHelper(src = "./dist/js/utils/helpers.js") {
if ($(`script[src="${src}"]`).length > 0) { if ($(`script[src="${src}"]`).length > 0) {
return new Promise((resolve) => resolve()); return new Promise((resolve) => resolve());
} }
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
var s; var s;
s = document.createElement('script'); s = document.createElement("script");
s.src = src; s.src = src;
s.onload = resolve; s.onload = resolve;
s.onerror = reject; s.onerror = reject;
@@ -69,18 +69,15 @@ function navINIT() {
}); });
} }
async function loadCart() { async function loadCart() {
if (!window.location.href.includes("services/paymentmethod.html")) {
if(!window.location.href.includes('services/paymentmethod.html')){ let files = ["./dist/js/shoppingcart/addtocart.js"];
let files = ['./dist/js/shoppingcart/addtocart.js'];
await loadHelper(); await loadHelper();
for (let i = 0; i < files.length; i++) { for (let i = 0; i < files.length; i++) {
if ($(`script[src="${files[i]}"]`).length > 0) { if ($(`script[src="${files[i]}"]`).length > 0) {
continue; continue;
} }
try { try {
await loadHelper(files[i]);
await loadHelper(files[i])
} catch (error) { } catch (error) {
console.log(error); console.log(error);
return; return;
@@ -90,16 +87,16 @@ function navINIT() {
setLengthCart(); setLengthCart();
getAllProdouctsIds(); getAllProdouctsIds();
} }
let URLNAMENAV = window.location.href; let URLNAMENAV = window.location.href;
const isTransparent = URLNAMENAV.includes('login')||URLNAMENAV.includes('orderconfirmation')|| URLNAMENAV.includes('services/paymentmethod.html'); const isTransparent =
; URLNAMENAV.includes("login") ||
URLNAMENAV.includes("orderconfirmation") ||
URLNAMENAV.includes("services/paymentmethod.html");
let nav_html = ` let nav_html = `
<header class="header-area section-padding-1 transparent-bar" ${isTransparent ?'style="background:#fff"' :''}> <header class="header-area section-padding-1 transparent-bar" ${
isTransparent ? 'style="background:#fff"' : ""
}>
<div class="header-large-device"> <div class="header-large-device">
<div class="header-bottom sticky-bar"> <div class="header-bottom sticky-bar">
<div class="container-lg"> <div class="container-lg">
@@ -114,7 +111,7 @@ function navINIT() {
<nav> <nav>
<ul class="mb-0 p-0"> <ul class="mb-0 p-0">
<li class="hover_tab_1"> <li class="hover_tab_1">
<a href="/laptops.html" class="satoshi_font">LAPTOPS <a href="/laptops.html" class="satoshi_font flex items-center">LAPTOPS
<svg style="width:18px;height:15px" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"> <svg style="width:18px;height:15px" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
<path fill="#000" d="M1395 736q0 13-10 23l-466 466q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l393 393 393-393q10-10 23-10t23 10l50 50q10 10 10 23z"/> <path fill="#000" d="M1395 736q0 13-10 23l-466 466q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l393 393 393-393q10-10 23-10t23 10l50 50q10 10 10 23z"/>
</svg> </svg>
@@ -151,7 +148,7 @@ function navINIT() {
</ul> </ul>
</li> </li>
<li class="hover_tab_2"> <li class="hover_tab_2">
<a href="/allinones.html" class="satoshi_font">ALL IN ONES <a href="/allinones.html" class="satoshi_font flex items-center">ALL IN ONES
<svg style="width:18px;height:15px;" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"> <svg style="width:18px;height:15px;" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
<path fill="#000" d="M1395 736q0 13-10 23l-466 466q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l393 393 393-393q10-10 23-10t23 10l50 50q10 10 10 23z"/> <path fill="#000" d="M1395 736q0 13-10 23l-466 466q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l393 393 393-393q10-10 23-10t23 10l50 50q10 10 10 23z"/>
</svg> </svg>
@@ -180,7 +177,7 @@ function navINIT() {
</ul> </ul>
</li> </li>
<li class="hover_tab_2"> <li class="hover_tab_2">
<a href="/accessories.html" class="satoshi_font">ACCESSORIES <a href="/accessories.html" class="satoshi_font flex items-center">ACCESSORIES
<svg style="width:18px;height:15px;" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"> <svg style="width:18px;height:15px;" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
<path fill="#000" d="M1395 736q0 13-10 23l-466 466q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l393 393 393-393q10-10 23-10t23 10l50 50q10 10 10 23z"/> <path fill="#000" d="M1395 736q0 13-10 23l-466 466q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l393 393 393-393q10-10 23-10t23 10l50 50q10 10 10 23z"/>
</svg> </svg>
@@ -266,7 +263,11 @@ function navINIT() {
<h2 class="titleproductnav sub_nav_item me-3 fs-9"></h2></span> <h2 class="titleproductnav sub_nav_item me-3 fs-9"></h2></span>
<ul class="d-flex mb-0 py-3 justify-content-center align-items-center" style="list-style:none;"> <ul class="d-flex mb-0 py-3 justify-content-center align-items-center" style="list-style:none;">
<li> <li>
<a data-overview="#${window.location.href.includes('Zeno')?'overview_data_zeno':'overview_data_fyro'}" href="#home-main-container" class="sub_nav_item overview me-3 fs-9">Overview</a> <a data-overview="#${
window.location.href.includes("Zeno")
? "overview_data_zeno"
: "overview_data_fyro"
}" href="#home-main-container" class="sub_nav_item overview me-3 fs-9">Overview</a>
</li> </li>
<li> <li>
<a data-spec="true" class="sub_nav_item me-3 fs-9 overviewspecs">Specifications</a> <a data-spec="true" class="sub_nav_item me-3 fs-9 overviewspecs">Specifications</a>
@@ -453,25 +454,29 @@ function navINIT() {
</div>`; </div>`;
$("#navbar-head").html(nav_html); $("#navbar-head").html(nav_html);
$('.explandlinavnameparent').click(function (e){ $(".explandlinavnameparent").click(function (e) {
let parentElement = $(e.target).parents(".expandlinav");
let parentElement = $(e.target).parents('.expandlinav'); if ($(parentElement).find(".content-expandlinav").hasClass("d-none")) {
if($(parentElement).find('.content-expandlinav').hasClass('d-none')){ const name = $(parentElement).find(".viewall_li").data("name");
const name = $(parentElement).find('.viewall_li').data('name'); $(parentElement)
$(parentElement).find('.viewall_li').html(`<a href="${name}">view all</a>`); .find(".viewall_li")
$(parentElement).find('.content-expandlinav').removeClass('d-none'); .html(`<a href="${name}">view all</a>`);
$(parentElement).find(".content-expandlinav").removeClass("d-none");
} else { } else {
$(parentElement).find('.viewall_li').html('+'); $(parentElement).find(".viewall_li").html("+");
$(parentElement).find('.content-expandlinav').addClass('d-none'); $(parentElement).find(".content-expandlinav").addClass("d-none");
} }
}); });
let width = $(window).width(); let width = $(window).width();
if (width <= 576) { if (width <= 576) {
$(".success-img.left-block").attr({"width":"250px","height":"250px"}); $(".success-img.left-block").attr({ width: "250px", height: "250px" });
$(".product_item").addClass("flex-column") $(".product_item").addClass("flex-column");
} }
$(".menu-negative-mrg2,.menu-negative-mrg3,.menu-negative-mrg4").css("width", width); $(".menu-negative-mrg2,.menu-negative-mrg3,.menu-negative-mrg4").css(
"width",
width
);
let ele_page = $("body").hasClass("product_pg"); let ele_page = $("body").hasClass("product_pg");
if (ele_page == true) { if (ele_page == true) {
$(".header-area").removeClass("bg-white"); $(".header-area").removeClass("bg-white");
@@ -484,7 +489,7 @@ function navINIT() {
$(".main-body").find("iframe").attr({ $(".main-body").find("iframe").attr({
width: width, width: width,
height: 236, height: 236,
}) });
} else if (width <= 390 && width >= 270) { } else if (width <= 390 && width >= 270) {
$(".main-body").find("iframe").attr({ $(".main-body").find("iframe").attr({
width: width, width: width,
@@ -505,8 +510,7 @@ function navINIT() {
width: width, width: width,
height: 1132, height: 1132,
}); });
} } else if (width <= 1920 && width > 1620) {
else if(width <= 1920 && width > 1620){
$(".main-body").find("iframe").attr({ $(".main-body").find("iframe").attr({
width: width, width: width,
height: 1083, height: 1083,
@@ -519,18 +523,15 @@ function navINIT() {
} }
} }
$("a.ram_data").click(function () { $("a.ram_data").click(function () {
let item_id = $(this).attr("accessories_id"); let item_id = $(this).attr("accessories_id");
let loc_path = '/products.html' let loc_path = "/products.html";
if (window.location.pathname.includes(loc_path)) { if (window.location.pathname.includes(loc_path)) {
window.location.href = `?itemid=${item_id}` window.location.href = `?itemid=${item_id}`;
} } else {
else {
window.location.href = `/products.html#itemid=${item_id}`; window.location.href = `/products.html#itemid=${item_id}`;
} }
}) });
// $(".main-menu nav ul").find("li").each(function () { // $(".main-menu nav ul").find("li").each(function () {
// var current = window.location.pathname; // var current = window.location.pathname;
@@ -544,22 +545,18 @@ function navINIT() {
// }) // })
// destroy localstorage data // destroy localstorage data
let loc_path = '/productdetails.html'; let loc_path = "/productdetails.html";
if (window.location.pathname.includes(loc_path) === false) { if (window.location.pathname.includes(loc_path) === false) {
localStorage.removeItem("product_data"); localStorage.removeItem("product_data");
localStorage.removeItem("top_data") localStorage.removeItem("top_data");
} }
let loc_path1 = '/productcatloguedetails.html'; let loc_path1 = "/productcatloguedetails.html";
if (window.location.pathname.includes(loc_path1) === false) { if (window.location.pathname.includes(loc_path1) === false) {
localStorage.removeItem("product_catlogue_obj"); localStorage.removeItem("product_catlogue_obj");
} }
//services pages links and sources //services pages links and sources
let $body_pg = $("body").hasClass("services_page"); let $body_pg = $("body").hasClass("services_page");
let $hm_pg = "../index.html"; let $hm_pg = "../index.html";
let $nav_img = "../dist/assets/imgs/anwi-logo-1.png"; let $nav_img = "../dist/assets/imgs/anwi-logo-1.png";
@@ -571,41 +568,69 @@ function navINIT() {
let img_src = `./dist/assets/imgs/anwi-logo-1.png`; let img_src = `./dist/assets/imgs/anwi-logo-1.png`;
$(".logo-menu-wrap").find(".logo a img").attr("src", img_src); $(".logo-menu-wrap").find(".logo a img").attr("src", img_src);
$(".header-bottom").addClass("sticky-bar stick"); $(".header-bottom").addClass("sticky-bar stick");
$("body.about_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#000"); $("body.about_page")
.find(".header-large-device")
.find(".header-action-wrap")
.find(".same-style")
.find("svg")
.find("path")
.attr("fill", "#000");
} }
let $body_nav = $("body").attr("class"); let $body_nav = $("body").attr("class");
if($body_nav === "support_pg" || $body_nav === "media_page" || $body_nav === "meter_pg"){ if (
$body_nav === "support_pg" ||
$body_nav === "media_page" ||
$body_nav === "meter_pg"
) {
$(".main-menu").find("nav ul li a").addClass("text-dark"); $(".main-menu").find("nav ul li a").addClass("text-dark");
let img_src = `./dist/assets/imgs/anwi-logo-1.png`; let img_src = `./dist/assets/imgs/anwi-logo-1.png`;
$(".logo-menu-wrap").find(".logo a img").attr("src", img_src); $(".logo-menu-wrap").find(".logo a img").attr("src", img_src);
$('.same-style').find('svg path').attr('fill','#000'); $(".same-style").find("svg path").attr("fill", "#000");
} }
if ($body_pg == true) { if ($body_pg == true) {
$(".header-large-device").find(".logo-menu-wrap .logo").find("a").attr("href", $hm_pg); $(".header-large-device")
$(".header-large-device").find(".logo-menu-wrap .logo").find("a img").attr("src", $nav_img); .find(".logo-menu-wrap .logo")
.find("a")
.attr("href", $hm_pg);
$(".header-large-device")
.find(".logo-menu-wrap .logo")
.find("a img")
.attr("src", $nav_img);
$(".mobile-logo").find("a").attr("href", $hm_pg); $(".mobile-logo").find("a").attr("href", $hm_pg);
$(".mobile-logo").find(".logo a img").attr("src", $nav_img); $(".mobile-logo").find(".logo a img").attr("src", $nav_img);
$("body.services_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#000"); $("body.services_page")
$(".main-menu").find("nav ul").find("li a").each(function () { .find(".header-large-device")
$(this).addClass("text-dark") .find(".header-action-wrap")
.find(".same-style")
.find("svg")
.find("path")
.attr("fill", "#000");
$(".main-menu")
.find("nav ul")
.find("li a")
.each(function () {
$(this).addClass("text-dark");
$(".header-bottom").addClass("sticky-bar stick"); $(".header-bottom").addClass("sticky-bar stick");
let $arc = $(this).attr("href"); let $arc = $(this).attr("href");
let $spcial_char = $arc.includes("./"); let $spcial_char = $arc.includes("./");
if ($spcial_char === true) { if ($spcial_char === true) {
let $refarence = `.${$arc}` let $refarence = `.${$arc}`;
$(this).attr("href", $refarence); $(this).attr("href", $refarence);
} }
}); });
$(".same-style").find("a").each(function () { $(".same-style")
.find("a")
.each(function () {
let $arc1 = $(this).attr("href"); let $arc1 = $(this).attr("href");
let $spcial_char1 = $arc1.includes("./"); let $spcial_char1 = $arc1.includes("./");
if ($spcial_char1 === true) { if ($spcial_char1 === true) {
let $refarence1 = `.${$arc1}` let $refarence1 = `.${$arc1}`;
$(this).attr("href", $refarence1); $(this).attr("href", $refarence1);
} }
}) });
$(".tab-content").find("img").each(function(){ $(".tab-content")
.find("img")
.each(function () {
let $img_src = $(this).attr("src"); let $img_src = $(this).attr("src");
let $img_src1 = $img_src.includes("./"); let $img_src1 = $img_src.includes("./");
if ($img_src1 === true) { if ($img_src1 === true) {
@@ -613,11 +638,14 @@ function navINIT() {
$(this).attr("src", $refarenceimg1); $(this).attr("src", $refarenceimg1);
} }
}); });
$(".clickable-mainmenu-wrap").find("nav ul").find("li a").each(function () { $(".clickable-mainmenu-wrap")
.find("nav ul")
.find("li a")
.each(function () {
let $arc_mbil = $(this).attr("href"); let $arc_mbil = $(this).attr("href");
let $spcial_char_mbil = $arc_mbil.includes("./"); let $spcial_char_mbil = $arc_mbil.includes("./");
if ($spcial_char_mbil === true) { if ($spcial_char_mbil === true) {
let $refarence_mbil = `.${$arc_mbil}` let $refarence_mbil = `.${$arc_mbil}`;
$(this).attr("href", $refarence_mbil); $(this).attr("href", $refarence_mbil);
} }
}); });
@@ -625,24 +653,23 @@ function navINIT() {
setTimeout(() => { setTimeout(() => {
if (width <= 600) { if (width <= 600) {
$('.same-style').find('svg path').attr('fill','#000'); $(".same-style").find("svg path").attr("fill", "#000");
} }
}, 300); }, 300);
// overview // overview
$('.overview').click(function (e){ $(".overview").click(function (e) {
let name = $(e.target).data('overview'); let name = $(e.target).data("overview");
document.querySelector(name)?.scrollIntoView({ document.querySelector(name)?.scrollIntoView({
behavior: 'smooth' behavior: "smooth",
});
}); });
}); $(".overviewspecs").click(function (e) {
document.querySelector("#specification_data")?.scrollIntoView({
$('.overviewspecs').click(function (e){ behavior: "smooth",
document.querySelector('#specification_data')?.scrollIntoView({
behavior: 'smooth'
}); });
}); });
} }
+303 -324
View File
File diff suppressed because it is too large Load Diff
-939
View File
@@ -1,939 +0,0 @@
function startDetails() {
// http://127.0.0.1:5502/productdetails.html?productId=106633230000024
if (window.location.search.split('=')[0] == '') {
window.location.href = "/notfound.html";
return;
}
let productId = window.location.hash.split('#')[1].split('=')[1];
console.log(productId);
let itemtagscombinationRes = null;
let labels = {};
let isThereInLabel = {};
let currentComb = null;
let colorId = null;
let group = {};
let loadingActions = {
addLoader() {
$('.loadingCall').removeClass('d-none');
$('.mainContanierProduct').addClass('d-none');
},
removeLoader() {
$('.loadingCall').addClass('d-none');
$('.mainContanierProduct').removeClass('d-none');
}
}
let currentClick = null;
if (productId) {
swapSectionsVideo();
loadingActions.addLoader();
updateProductId(productId);
getProductDetails(productId);
appendSpecs(productId)
} else {
window.location.href = "/notfound.html"
}
function updateProductId(val) {
$('#productidtag').val(val);
}
function updateItemId(val) {
$('#itemidtag').val(val);
}
let specification_wrap_action = {
remove() {
$('.specification-wrap').addClass('d-none');
},
add() {
$('.specification-wrap').removeClass('d-none');
}
}
let description_action = {
addVal(value) {
$('.description-wrap > p').html(value);
},
removeVal(value) {
$('.description-wrap > p').html('');
}
}
function getSpecsItemHTML({ name, des, itemid, id }) {
return `<div id="${id}" data-specitemid="${itemid}" class="">
<div class="row border-bottom">
<div class="col-sm-6 bg-gray-3 py-2">
${name}
</div>
<div class="col-sm-6 py-2">
${des}
</div>
</div>
</div>`;
}
// function getSpecsItemHTML({name,des,itemid,id}){
// return ` <tr id="${id}" data-specitemid="${itemid}">
// <td style="width:200px">${name}</td>
// <td class="">${des}</td>
// </tr>`;
// }
async function appendSpecs(id) {
let resData = await API_SERVICES_ACTIONS.getAPIService(`apis/v4/bizgaze/integrations/products/itemspecifications/itemid/${id}`, true);
if (resData.isError) {
$('.productdetailstabs').addClass('d-none');
$('.specContainerleft').html('')
$('.specContainerRight').html('')
return;
}
$('.productdetailstabs ').removeClass('d-none');
const res = resData.response;
// console.log(JSON.parse(res.result));
const data = JSON.parse(res.result);
// console.log(data);
let html = '';
let leftHtml = '';
let rightHtml = '';
if (data.length == 0) {
$('.productdetailstabs ').addClass('d-none');
$('.specContainerleft').html('')
$('.specContainerRight').html('')
return;
}
for (let i = 0; i < data.length; i++) {
const { specificationname, specificationitemid, itemid, description } = data[i];
if ((i + 1) % 2 == 0) {
rightHtml += getSpecsItemHTML({
name: specificationname, id: specificationitemid, itemid, des: description
})
} else {
leftHtml += getSpecsItemHTML({
name: specificationname, id: specificationitemid, itemid, des: description
});
}
}
$('.specContainerleft').html(leftHtml)
$('.specContainerRight').html(rightHtml)
}
function getParentHTML(name, productid, id, isMain) {
return `<div data-parentidgroup="${name?.replace(" ", '')}-parent" class="pb-2 groupingitems_search ${name?.replace(" ", '')}-parent">
<h5 class="py-2 smallHeadingProductDetails">${name}</h5>
<div class="d-flex gap-2 flex-lg-row flex-wrap ${id}container" data-tagid="${id}">
</div>
</div>`;
}
function onClickHandler(e) {
$(e).parent().find('.borderselector').removeClass('borderselector');
$(e).addClass('borderselector')
}
function getChildHTML(tagid, name, isTrue,parentid) {
let blue = '#253746';
let greenLight = '#5e7975';
let brown = '#624839';
let bgColor = '';
if(name === 'Deep Sea Blue'){
bgColor = blue;
}else if(name == 'Desert Brown'){
bgColor = brown;
}else if(name == 'Eucalyptus Green'){
bgColor = greenLight;
}
if(colorId == parentid){
return `
<div data-type="${tagid}-${name}" data-tagiditem="${tagid}" class="specsmallcard optiontaganwi ${isTrue ? 'borderselector' : ''} colorselector card text-center small-font cursor-pointer ">
<span style="
height: 25px;
border-radius: 5px;
width:25px;
background: ${bgColor} !important;
pointer-events:none;
"></span>
</div> `
}
return `
<div data-type="${tagid}-${name}" data-tagiditem="${tagid}" class="specsmallcard optiontaganwi ${isTrue ? 'borderselector' : ''} card text-center small-font cursor-pointer p-3">
${name}
</div> `
}
function addeventlisteners() {
$('.optiontaganwi').each(function (i, el) {
$(el).click(function (e) {
$('#quantity').val(1);
$(e.target).parent().find('.borderselector').removeClass('borderselector');
$(e.target).addClass('borderselector');
currentClick = e.target;
;
//searchComb();
// getAllCombination();
getandsetCombination();
})
});
}
function getandsetCombination(){
let keyOption = $(currentClick).data('tagiditem');
$('.disabled-option-item').removeClass('disabled-option-item');
let tagsNames = [];
let currOptionAvaIds = {};
$('.borderselector').each(function (i,e){
let id = $(e).data('tagiditem');
tagsNames.push(id);
});
for(let i=0;i<itemtagscombinationRes.length;i++){
let tagItems = itemtagscombinationRes[i].tagids;;
if(tagItems.includes(keyOption)){
let splitArr = tagItems.split('|');
for(let j=0;j<splitArr.length;j++){
if(keyOption){
currOptionAvaIds[splitArr[j]] = splitArr[j];
}
}
}
}
console.log(currOptionAvaIds);
console.log(itemtagscombinationRes);
let parentsArr = [];
$('.optiontaganwi').each(function (i,e){
let currParent = $(e).parents('.groupingitems_search');
if(currParent.find(`[data-tagiditem="${keyOption}"]`).length==0){
let currId = $(e).data('tagiditem');
if(!currOptionAvaIds[currId]){
if($(e).hasClass('borderselector')){
parentsArr.push(currParent);
$(e).removeClass('borderselector');
}
$(e).addClass('disabled-option-item');
}
}
});
for(let i=0;i<parentsArr.length;i++){
let currParent = parentsArr[i];
currParent.find('.optiontaganwi').each(function (j,e){
let isTrue = $(e).hasClass('disabled-option-item');
if(!isTrue){
$(e).addClass('borderselector');
return false;
}
});
}
// $('.optiontaganwi').addClass('disabled-option-item');
let parentId = $(currentClick).parents('.groupingitems_search');
let parentData = $(parentId).data('parentidgroup');
let parentArr = [];
$('.groupingitems_search').each(function (i,e){
const curParentId = $(e).data('parentidgroup');
if(parentData != curParentId){
let obj = {
name:$(e).find('.smallHeadingProductDetails').html(),
arr:[]
}
$(e).find('.optiontaganwi').each(function (j,evt){
let id = $(evt).data('tagiditem');
obj.arr.push(id);
});
parentArr.push(obj);
}
})
console.log(parentArr);
let arrone = parentArr[0].arr;
let arrtwo = [];
if(parentArr.length>1){
arrtwo = parentArr[1]?.arr;
}
let currId = keyOption;
let ids = [];
for(let i=0;i<arrone.length;i++){
//let currEl = [currId,arrone[i]];
let currEl = ``
for(let j=0;j<arrtwo.length;j++){
currEl = `${currId}|${arrone[i]}|${arrtwo[j]}`;
ids.push(currEl);
currEl = '';
}
}
console.log(ids,'ids');
let findObj = [];
debugger
for(let i=0;i<ids.length;i++){
let curId = ids[i]
for(let j=0;j<itemtagscombinationRes.length;j++){
const currItem = itemtagscombinationRes[j].tagids.split('|');
let isTrue = true;
for(let k=0;k<currItem.length;k++){
if(!curId.includes(currItem[k])){
isTrue = false;
break;
}
}
if(isTrue){
findObj.push(itemtagscombinationRes[j]);
}
}
}
console.log(findObj);
$('.optiontaganwi').addClass('disabled-option-item');
debugger;
for(let i=0;i<findObj.length;i++){
let item = findObj[i].tagids.split('|');
for(let j=0;j<item.length;j++){
$(`[data-tagiditem=${item[j]}]`).removeClass('disabled-option-item');
}
}
$(parentId).find('.optiontaganwi').each(function (i,e){
$(e).removeClass('disabled-option-item')
});
for(let i=0;i<itemtagscombinationRes.length;i++){
let currIds = itemtagscombinationRes[i].tagids;
let isTrue = true;
let isPro = false;
for(let j=0;j<tagsNames.length;j++){
if(tagsNames.join().includes('106631360000128')&&(tagsNames.join().includes('106631360000132')||tagsNames.join().includes('106631360000133'))){
isPro = true;
}
if(!currIds.includes(tagsNames[j])){
isTrue = false;
}
}
if(isTrue){
const { quantity } = itemtagscombinationRes[i];
if (true) {
currentComb = itemtagscombinationRes[i];
updateDetailsByObj(itemtagscombinationRes[i]);
if(isPro){
$(`[data-tagiditem="106631360000089"]`).addClass(' disabled-option-item')
$(`[data-tagiditem="106631360000088"]`).addClass(' disabled-option-item')
}
} else {
let name = itemtagscombinationRes[i].itemname.split('-')[0];
$('#addtocart').addClass('disabled');
let itemsName = name;
$('.borderselector').each(function (i, e) {
itemsName += ` ${$(e).html().trim()}`;
});
updateItemId(null);
let defaultImg = itemtagscombinationRes[i].itemimageurl ? imgServerNameBuild(itemtagscombinationRes[i].itemimageurl) : `./dist/assets/imgs/nophoto.png`;
$('.productDetailsMain > img').attr('src', defaultImg);
specification_wrap_action.remove();
$('#skudetailitem').val(-1)
$('.productname').html(itemsName)
$('.msgErrorDetailsItem').removeClass('d-none');
$('.des_productdes').html('');
$('.price').html('');
}
initAddToCart()
return;
}
}
// return;
return;
let commonTags = [];
// $('.optiontaganwi').addClass('disabled-option-item')
for(let i=0;i<tagsNames.length;i++){
let currtagName = tagsNames[i];
let arr = currtagItemCom(currtagName);
commonTags.push(arr);
}
console.log(commonTags);
// for(let i=0;i<commonTags.length;i++){
// let currObj = commonTags[i];
// for(let item in currObj){
// console.log($(`[data-tagiditem="${item}"]`));
// $(`[data-tagiditem="${item}"]`).removeClass('disabled-option-item')
// }
// }
let finalAns = {};
let arra = [];
for(let i=0;i<commonTags.length;i++){
let currObj = commonTags[i];
for(let item in currObj){
let isTrue = true;
for(let j=0;j<commonTags.length;j++){
if(j!=i){
let currComb = commonTags[j];
if(!currComb[item]){
isTrue = false;
}
}
}
if(isTrue){
arra.push(currObj[item])
finalAns[currObj[item]] = currObj[item];
$(`[data-tagiditem="${item}"]`).removeClass('disabled-option-item')
}
}
}
// console.log(arra);
// for(let i=0;i<itemtagscombinationRes.length;i++){
// let tagItems = itemtagscombinationRes[i].tagids;;
// if(tagItems.includes(keyOption)){
// let splitArr = tagItems.split('|');
// for(let j=0;j<splitArr.length;j++){
// commonTags[splitArr[j]] = splitArr[j];
// }
// }
// }
// for(let i=0;i<currOptionAvaIds.length;i++){
// let currId = currOptionAvaIds[i];
// if(parentId.find(currId).length === 0){
// console.log(currId);
// }
// }
}
function currtagItemCom(keyOption){
debugger;
let arr = [];
let commonTags = {};
for(let i=0;i<itemtagscombinationRes.length;i++){
let tagItems = itemtagscombinationRes[i].tagids;;
if(tagItems.includes(keyOption)){
let splitArr = tagItems.split('|');
for(let j=0;j<splitArr.length;j++){
if(!commonTags[splitArr[j]]){
commonTags[splitArr[j]] = {
keyOption,
data:itemtagscombinationRes[i]
};
arr.push(splitArr[j]);
}
}
}
}
return commonTags;
}
function updateDetailsByObj(obj) {
$('.productname').html(obj.itemname);
$('.titleproductnav').html(obj.itemname);
let [currencySymbol, amount] = getCurrencySymbol(obj?.pricelist||0);
let commingSoonText = window.location.href.toLowerCase().includes('zeno')||window.location.href.includes('fyro')
$('.price').html(obj.pricelist ? `<span class="font-w600">${currencySymbol}${amount}</span>${commingSoonText?'<span class="mx-1 badge d-md-none bg-gradient-violet text-a-color">Pre Order Now!</span>':''}` : 'pre order now');
appendSpecs(obj.itemid)
$('#skudetailitem').val(obj.sku)
$('.des_productdes').html(obj.itemdescription);
$('#addtocart').attr('data-qty', obj.quantity);
let defaultImg = obj.itemimageurl ? imgServerNameBuild(obj.itemimageurl) : `./dist/assets/imgs/nophoto.png`;
// console.log(obj.itemimageurl, 'obj.itemimageurlobj.itemimageurlobj.itemimageurl');
debugger;
let productId = window.location.hash.split('#')[1]?.split('=')[1];
let itemId = window.location.hash.split('#')[2]?.split('=')[1];
history.replaceState(undefined, undefined, `#productId=${productId}#itemid=${obj.itemid}`)
$('.productDetailsMain > img').attr('src', defaultImg).attr('loading','lazy');
updateItemId(obj.itemid);
console.log(obj,'objobjobj');
debugger;
if (!obj.pricelist || !obj.quantity) {
$('.buynow').attr('disabled', true);
$('#addtocart').attr('disabled', true);
} else {
$('.buynow').attr('disabled', false);
$('#addtocart').attr('disabled', false);
}
}
function searchComb() {
let valuesSelected = [];
$('.optiontaganwi').removeClass('disabled-option-item')
$('#addtocart').removeClass('disabled');
$('.msgErrorDetailsItem').addClass('d-none');
$('.borderselector,border_selector').each(function (i, el) {
console.log($(el).html())
let val = $(el).data('tagiditem');
valuesSelected.push(val);
});
let labelRecord = {};
for (let label in labels) {
labelRecord[label] = false;
}
console.log(labelRecord);
specification_wrap_action.add();
console.log(group);
let unFiler = null;
for (let i = 0; i < itemtagscombinationRes.length; i++) {
const currItem = itemtagscombinationRes[i];
const { tagids } = currItem;
let isTrue = true;
let labelFilter = labelRecord;
for (let i = 0; i < valuesSelected.length; i++) {
if (!tagids.includes(valuesSelected[i])) {
isTrue = false
unFiler = labelFilter;
break;
}
labelFilter[group[valuesSelected[i]]] = true;
}
if (isTrue) {
// console.log(itemtagscombinationRes[i], 'itemtagscombinationRes[i]');
const { quantity } = itemtagscombinationRes[i];
if (quantity >= $('#quantity').val() && quantity >= 1) {
currentComb = itemtagscombinationRes[i];
// $('.productname').html(itemtagscombinationRes[i].itemname)
// $('.price').html(itemtagscombinationRes[i].pricelist);
// location.hash = itemtagscombinationRes[i].itemname.trim();
// appendSpecs(itemtagscombinationRes[i].itemid)
// history.replaceState(null, null, `#itemid=${itemtagscombinationRes[i].itemid}#${itemtagscombinationRes[i].itemname.trim()}`);
// $('#skudetailitem').val(itemtagscombinationRes[i].sku)
// $('.des_productdes').html(itemtagscombinationRes[i].itemdescription);
updateDetailsByObj(itemtagscombinationRes[i]);
} else {
let name = itemtagscombinationRes[i].itemname.split('-')[0];
$('#addtocart').addClass('disabled');
let itemsName = name;
$('.borderselector').each(function (i, e) {
itemsName += ` ${$(e).html().trim()}`;
});
updateItemId(null);
let defaultImg = itemtagscombinationRes[i].itemimageurl ? imgServerNameBuild(itemtagscombinationRes[i].itemimageurl) : `./dist/assets/imgs/nophoto.png`;
// console.log(itemtagscombinationRes[i].itemimageurl, 'obj.itemimageurlobj.itemimageurlobj.itemimageurl');
$('.productDetailsMain > img').attr('src', defaultImg);
specification_wrap_action.remove();
$('#skudetailitem').val(-1)
$('.productname').html(itemsName)
// history.replaceState(null, null, `#`);
$('.msgErrorDetailsItem').removeClass('d-none');
$('.des_productdes').html('');
$('.price').html('');
}
initAddToCart()
return;
}
}
// alert("j");
let name = itemtagscombinationRes[0].itemname.split('-')[0];
let itemsName = name;
$('.borderselector').each(function (i, e) {
itemsName += `- ${$(e).html().trim()}`;
})
specification_wrap_action.remove();
$('.productname').html(itemsName)
$('#skudetailitem').val(-1)
$('.price').html('');
$('#addtocart').addClass('disabled');
$('.msgErrorDetailsItem').removeClass('d-none');
initAddToCart()
}
function getAllCombination() {
debugger;
const currClickAttr = $(currentClick).html().trim();
const optionId = $(currentClick).data('tagiditem');
let curr = $(currentClick).parents('.groupingitems_search').data('parentidgroup');
$('.groupingitems_search').each(function (i, e) {
const id = $(e).data('parentidgroup');
if (id != curr) {
$(e).find('.optiontaganwi').addClass('disabled-option-item');
$(e).find('.borderselector').removeClass('borderselector');
}
});
let ansArr = [];
let index = 0;
let comb = null;
for(let i=0;i<itemtagscombinationRes.length;i++){
let currIds = itemtagscombinationRes[i].tagids;
if(currIds.includes(optionId)){
currIds = currIds.split('|');
for(let j=0;j<currIds.length;j++){
debugger;
if(index==0 &&optionId != currIds[j] ) {
$(`[data-tagiditem="${currIds[j]}"]`).addClass('borderselector')
comb = itemtagscombinationRes[i];
index++;
}
$(`[data-tagiditem="${currIds[j]}"]`).removeClass('disabled-option-item');
// $().parents('[data-tagid]').find()
}
}
}
// console.log(comb,'comb tag');
updateDetailsByObj(comb);
let currentItem = comb.tagids.split('|');
for(let i=0;i<currentItem.length;i++){
$(`[data-tagiditem="${currentItem[i]}"]`).removeClass('disabled-option-item').addClass('borderselector');
}
// history.replaceState(null, null, `#${comb.itemname}`);
// window.location.href = `#${comb.itemname}`
console.log(itemtagscombinationRes,'gobal');
return;
};
async function getProductDetails(id) {
debugger;
let resData = await API_SERVICES_ACTIONS.getAPIService(`apis/v4/bizgaze/integrations/products/productattributelist/productid/${id}`, true);
if (resData.isError) {
loadingActions.removeLoader();
alert(resData.errorMsg.message);
return;
}
if(resData.response.result == '[]' || !resData.response.result){
$('.barbgnav').removeClass('d-none')
loadingActions.removeLoader();
toasterHelper("Something Went Wrong")
return;
}
let res = resData.response;
res = JSON.parse(res.result);
// console.log(res, 'productattributelist');
if (!res) {
loadingActions.removeLoader();
return;
};
let html = '';
for (let i = 0; i < res.length; i++) {
const currItem = res[i];
// parenttagid means under what label
// tag id means it know unquie id
const { parentattribute, parenttagid, tagid, attribute, productid } = currItem;
if (labels[parentattribute]) {
labels[parentattribute].items.push({
attribute,
tagid: tagid
});
} else {
labels[parentattribute] = {
id: parenttagid,
items: [{
attribute,
tagid: tagid
}]
};
if(parentattribute.toLowerCase() === 'colour'){
colorId = parenttagid;
}
html += getParentHTML(parentattribute, productid, parenttagid, i == 0);
}
}
$('#spec-container-details').html(html);
console.log(labels,'labels');
let childIds = [];
for (let item in labels) {
let { id, items } = labels[item];
// $(`[data-tagid=${id}]`)
let html = '';
for (let i = 0; i < items.length; i++) {
const { attribute, tagid } = items[i]
childIds.push(tagid);
group[attribute] = item;
console.log(attribute,colorId,"s");
html += getChildHTML(tagid, attribute, i == 0,id);
console.log(attribute,"attributeattributeattributeattribute");
}
debugger;
$(`[data-tagid="${id}"]`).html(html);
}
itemtagscombinationRes = await API_SERVICES_ACTIONS.getAPIService(`apis/v4/bizgaze/integrations/products/getitemwithoutbranch/productid/${id}`, true);
itemtagscombinationRes = JSON.parse(itemtagscombinationRes.response.result);
console.log(itemtagscombinationRes, "conductt");
let itemidSearch = window.location.hash.split('#')[2]?.split('=')[1];
if(!itemidSearch){
itemidSearch = itemtagscombinationRes[0].itemid
}
let valuesSelected = [];
$('.borderselector').each(function (i, el) {
let val = $(el).html();
valuesSelected.push(val.trim());
});
debugger;
// let searchParams = window.location.search.split("&");
// let skuId = window.location.hash.split('#')[2].split('=')[1];
// skuId = skuId.split('=')[1]
let isGo = true;
for (let i = 0; i < itemtagscombinationRes.length; i++) {
const currItem = itemtagscombinationRes[i];
const { tagnames, sku, itemid } = currItem;
isThereInLabel[tagnames] = itemtagscombinationRes[i];
let isTrue = true;
if (isGo) {
// for(let i=0;i<valuesSelected.length;i++){
// if(!tagnames.includes(valuesSelected[i])){
// isTrue = false
// }
// }
if (itemidSearch != itemid) {
isTrue = false
}
// if (i != 0) {
// isTrue = false
// }
if (isTrue) {
// console.log(itemtagscombinationRes[i], 'itemtagscombinationRes[i]');
currentComb = itemtagscombinationRes[i];
updateDetailsByObj(itemtagscombinationRes[i]);
isGo = false;
let { tagnames, tagids, pricelist } = itemtagscombinationRes[i];
tagids = tagids.split('|');
tagnames = tagnames.split('|');
$('.optiontaganwi').removeClass('borderselector');
for (let i = 0; i < tagids.length; i++) {
$(`[data-tagiditem="${tagids[i]}"]`).addClass('borderselector');
}
break;
// tagiditem
}
}
}
if (isGo && itemtagscombinationRes.length != 0) {
// console.log(itemtagscombinationRes[0]);
let { tagnames, tagids, pricelist } = itemtagscombinationRes[0];
tagids = tagids.split('|');
tagnames = tagnames.split('|');
$('.optiontaganwi').removeClass('borderselector');
currentComb = itemtagscombinationRes[0];
// updateItemId(itemtagscombinationRes[0].itemid);
for (let i = 0; i < tagids.length; i++) {
$(`[data-type="${tagids[i]}-${tagnames[i]}"]`).addClass('borderselector');
// $(`[data-type="${tagids[i]}-Eucalyptus Green"]`).removeClass('borderselector');
// $(`[data-type="${tagids[i]}-Desert Brown"]`).removeClass('borderselector');
// $(`[data-type="${tagids[i]}-Deep Sea Blue"]`).removeClass('borderselector');
}
// $('.price').html(pricelist);
// $('.des_productdes').html(itemtagscombinationRes[0].itemdescription);
// appendSpecs(itemtagscombinationRes[0].itemid);
updateDetailsByObj(itemtagscombinationRes[0]);
//console.log(childIds);
//
}
//getAllCombination()
// for(let i=0;i<itemtagscombinationRes.length;i++){
// const {tagnames} = itemtagscombinationRes[i];
// }
$('#spec-container-details').children().find('.specsmallcard').removeClass('specsmallcard');
//getting the first borderselector in first $('.groupingitems_search')[0]
let firstParentGroup = $('.groupingitems_search')[0];
debugger;
let optionId = $(firstParentGroup).find('.borderselector').data('tagiditem');
currentClick = $(firstParentGroup).find('.borderselector')
getandsetCombination();
addeventlisteners();
loadingActions.removeLoader();
return;
}
}
startDetails();
-650
View File
@@ -1,650 +0,0 @@
function startDetails() {
// http://127.0.0.1:5502/productdetails.html?productId=106633230000024
if (window.location.search.split('=')[0] == '') {
window.location.href = "/notfound.html";
return;
}
let productId = window.location.href.split('=')[1].split('&')[0].split('#')[0];
console.log(productId);
let itemtagscombinationRes = null;
let labels = {};
let isThereInLabel = {};
let currentComb = null;
let group = {};
let loadingActions = {
addLoader() {
$('.loadingCall').removeClass('d-none');
$('.mainContanierProduct').addClass('d-none');
},
removeLoader() {
$('.loadingCall').addClass('d-none');
$('.mainContanierProduct').removeClass('d-none');
}
}
let currentClick = null;
if (productId) {
loadingActions.addLoader();
updateProductId(productId);
getProductDetails(productId);
appendSpecs(productId)
} else {
window.location.href = "/notfound.html"
}
function updateProductId(val) {
$('#productidtag').val(val);
}
function updateItemId(val) {
$('#itemidtag').val(val);
}
let specification_wrap_action = {
remove() {
$('.specification-wrap').addClass('d-none');
},
add() {
$('.specification-wrap').removeClass('d-none');
}
}
let description_action = {
addVal(value) {
$('.description-wrap > p').html(value);
},
removeVal(value) {
$('.description-wrap > p').html('');
}
}
function getSpecsItemHTML({ name, des, itemid, id }) {
return `<div id="${id}" data-specitemid="${itemid}" class="">
<div class="row border-bottom">
<div class="col-sm-6 bg-gray-3 py-2">
${name}
</div>
<div class="col-sm-6 py-2">
${des}
</div>
</div>
</div>`;
return ` <tr id="${id}" data-specitemid="${itemid}">
<td style="width:200px">${name}</td>
<td class="">${des}</td>
</tr>`;
}
// function getSpecsItemHTML({name,des,itemid,id}){
// return ` <tr id="${id}" data-specitemid="${itemid}">
// <td style="width:200px">${name}</td>
// <td class="">${des}</td>
// </tr>`;
// }
async function appendSpecs(id) {
let resData = await API_SERVICES_ACTIONS.getAPIService(`apis/v4/bizgaze/integrations/products/itemspecifications/itemid/${id}`, true);
if (resData.isError) {
$('.productdetailstabs').addClass('d-none');
$('.specContainerleft').html('')
$('.specContainerRight').html('')
return;
}
$('.productdetailstabs ').removeClass('d-none');
const res = resData.response;
console.log(JSON.parse(res.result));
const data = JSON.parse(res.result);
console.log(data);
let html = '';
let leftHtml = '';
let rightHtml = '';
if (data.length == 0) {
$('.productdetailstabs ').addClass('d-none');
$('.specContainerleft').html('')
$('.specContainerRight').html('')
return;
}
for (let i = 0; i < data.length; i++) {
const { specificationname, specificationitemid, itemid, description } = data[i];
if ((i + 1) % 2 == 0) {
rightHtml += getSpecsItemHTML({
name: specificationname, id: specificationitemid, itemid, des: description
})
} else {
leftHtml += getSpecsItemHTML({
name: specificationname, id: specificationitemid, itemid, des: description
});
}
}
$('.specContainerleft').html(leftHtml)
$('.specContainerRight').html(rightHtml)
}
function getParentHTML(name, productid, id, isMain) {
return `<div class="pb-2 $${name?.replace(" ", '')}-parent">
<h5 class="py-2 smallHeadingProductDetails">${name}</h5>
<div class="d-flex gap-2 flex-lg-row flex-wrap ${id}container" data-tagid="${id}">
</div>
</div>`;
}
function onClickHandler(e) {
$(e).parent().find('.borderselector').removeClass('borderselector');
$(e).addClass('borderselector')
}
function getChildHTML(tagid, name, isTrue) {
let item_color_1 = `#5e7975`;
let item_color_2 = `#624839`;
let item_color_3 = `#253746`;
if(name == "Eucalyptus Green"){
return `<p item_color=${item_color_1} data-type="${tagid}-${name}" data-tagiditem="${tagid}" class="optiontaganwi_color specsmallcard optiontaganwi fs-7 cursor-pointer text-white rounded mb-0 me-1 py-2 px-3" ${item_color_1 ? `style="background-color:${item_color_1}"`:''}><span class="${isTrue ? 'border-bottom color' : 'color'}">${name}</span></p>`;
}else if(name == "Desert Brown"){
return `<p item_color=${item_color_2} data-type="${tagid}-${name}" data-tagiditem="${tagid}" class="optiontaganwi_color specsmallcard optiontaganwi mb-0 fs-7 cursor-pointer me-1 rounded text-white py-2 px-3" ${item_color_2 ? `style="background-color:${item_color_2}"`:''}><span class="${isTrue ? 'border-bottom color' : 'color'}">${name}</span></p>`;
}else if(name == "Deep Sea Blue"){
return `<p item_color=${item_color_3} data-type="${tagid}-${name}" data-tagiditem="${tagid}" class="optiontaganwi_color specsmallcard optiontaganwi mb-0 fs-7 text-white cursor-pointer rounded py-2 px-3 " ${item_color_3 ? `style="background-color:${item_color_3}"`:''}><span class="${isTrue ? 'border-bottom color' : 'color'}">${name}</span></p>`;
}
else{
return `
<div data-type="${tagid}-${name}" data-tagiditem="${tagid}" class="specsmallcard optiontaganwi ${isTrue ? 'borderselector' : ''} card text-center small-font cursor-pointer p-3">
${name}
</div> `
}
}
function addeventlisteners() {
$('.optiontaganwi').each(function (i, el) {
$(el).click(function (e) {
$('#quantity').val(1);
debugger;
let ele_col = $(e.target).hasClass("color");
let ele_col1 = $(e.target).hasClass("optiontaganwi_color");
if(ele_col === true){
$(e.target).parent().find("span.color").removeClass('border-bottom');
$(e.target).parent().addClass("border_selector");
$(e.target).addClass("border-bottom");
$(e.target).parent().find("span.border-bottom").removeClass("border-bottom text-dark");
$(e.target).addClass("border_selector");
$(e.target).find("span.color").addClass("border-bottom text-dark");
$(e.target).parent().find('.borderselector').removeClass('borderselector');
// $(e.target).addClass('borderselector');
searchComb();
currentClick = e.target;
}else if(ele_col1 === true){
$(e.target).parent().find("span.text-dark").removeClass("text-dark border-bottom");
$(e.target).addClass("border_selector");
$(e.target).find("span.color").addClass("text-dark");
$(e.target).parent().find('.borderselector').removeClass('borderselector');
$(e.target).addClass('borderselector');
searchComb();
currentClick = e.target;
}else{
$(e.target).parent().find('.borderselector').removeClass('borderselector');
$(e.target).addClass('borderselector');
searchComb();
currentClick = e.target;
}
searchComb();
currentClick = e.target;
// getAllCombination();
})
});
// $('.optiontaganwi_color span.color').each(function (i, el) {
// $(el).click(function (e) {
// $('#quantity').val(1);
// $(e.target).parent().find("span.border-bottom").removeClass("border-bottom");
// $(e.target).addClass("border-bottom");
// searchComb();
// currentClick = e.target;
// // getAllCombination();
// })
// });
}
// function getChildHTML(tagid,name,isTrue){
// return `
// <div data-type="${tagid}-${name}" data-tagiditem="${tagid}" class="specsmallcard optiontaganwi ${isTrue?'borderselector':''} card small-font cursor-pointer p-3">
// ${name}
// </div>
// `
// }
// function addeventlisteners(){
// $('.optiontaganwi').each(function (i,el){
// $(el).click(function (e){
// $('#quantity').val(1)
// $(e.target).parent().find('.borderselector').removeClass('borderselector');
// $(e.target).addClass('borderselector')
// searchComb();
// currentClick = e.target;
// // getAllCombination();
// })
// });
// }
function updateDetailsByObj(obj) {
$('.productname').html(obj.itemname)
$('.price').html(obj.pricelist?obj.pricelist:'coming soon');
appendSpecs(obj.itemid)
$('#skudetailitem').val(obj.sku)
$('.des_productdes').html(obj.itemdescription);
$('#addtocart').attr('data-qty', obj.quantity);
let defaultImg = obj.itemimageurl ? imgServerNameBuild(obj.itemimageurl) : `./dist/assets/imgs/nophoto.png`;
console.log(obj.itemimageurl, 'obj.itemimageurlobj.itemimageurlobj.itemimageurl');
$('.productDetailsMain > img').attr('src', defaultImg);
updateItemId(obj.itemid);
if(!obj.pricelist){
$('.buynow').attr('disabled',true);
$('#addtocart').attr('disabled',true);
}else{
$('.buynow').attr('disabled',false);
$('#addtocart').attr('disabled',false);
}
}
function searchComb() {
let valuesSelected = [];
$('#addtocart').removeClass('disabled');
$('.msgErrorDetailsItem').addClass('d-none');
$('.borderselector,border_selector').each(function (i, el) {
console.log($(el).html())
let val = $(el).html();
valuesSelected.push(val.trim());
});
let labelRecord = {};
for (let label in labels) {
labelRecord[label] = false;
}
console.log(labelRecord);
specification_wrap_action.add();
console.log(group);
let unFiler = null;
for (let i = 0; i < itemtagscombinationRes.length; i++) {
const currItem = itemtagscombinationRes[i];
const { tagnames } = currItem;
let isTrue = true;
let labelFilter = labelRecord;
for (let i = 0; i < valuesSelected.length; i++) {
if (!tagnames.includes(valuesSelected[i])) {
isTrue = false
unFiler = labelFilter;
break;
}
labelFilter[group[valuesSelected[i]]] = true;
}
if (isTrue) {
console.log(itemtagscombinationRes[i], 'itemtagscombinationRes[i]');
const { quantity } = itemtagscombinationRes[i];
if (quantity >= $('#quantity').val() && quantity >= 1) {
currentComb = itemtagscombinationRes[i];
// $('.productname').html(itemtagscombinationRes[i].itemname)
// $('.price').html(itemtagscombinationRes[i].pricelist);
// location.hash = itemtagscombinationRes[i].itemname.trim();
// appendSpecs(itemtagscombinationRes[i].itemid)
history.replaceState(null, null, `#itemid=${itemtagscombinationRes[i].itemid}#${itemtagscombinationRes[i].itemname.trim()}`);
// $('#skudetailitem').val(itemtagscombinationRes[i].sku)
// $('.des_productdes').html(itemtagscombinationRes[i].itemdescription);
updateDetailsByObj(itemtagscombinationRes[i]);
} else {
let name = itemtagscombinationRes[i].itemname.split('-')[0];
$('#addtocart').addClass('disabled');
let itemsName = name;
$('.borderselector').each(function (i, e) {
itemsName += ` ${$(e).html().trim()}`;
});
updateItemId(null);
specification_wrap_action.remove();
$('#skudetailitem').val(-1)
$('.productname').html(itemsName)
history.replaceState(null, null, `#`);
$('.msgErrorDetailsItem').removeClass('d-none');
$('.des_productdes').html('');
$('.price').html('');
}
initAddToCart()
return;
}
}
let name = itemtagscombinationRes[0].itemname.split('-')[0];
let itemsName = name;
$('.borderselector').each(function (i, e) {
itemsName += `- ${$(e).html().trim()}`;
})
specification_wrap_action.remove();
$('.productname').html(itemsName)
$('#skudetailitem').val(-1)
$('.price').html('');
$('#addtocart').addClass('disabled');
$('.msgErrorDetailsItem').removeClass('d-none');
initAddToCart()
}
function getAllCombination() {
const currClickAttr = $(currentClick).html().trim();
let isThere = [];
for (let item in isThereInLabel) {
let { tagnames } = isThereInLabel[item];
if (tagnames.includes(currClickAttr)) {
isThere.push(isThereInLabel[item])
}
}
let selected = [];
$('.borderselector').each(function (i, e) {
selected.push($(e).html().trim())
});
// console.log(selected);
// console.log(isThere);
let ishashObj = {};
for (let i = 0; i < isThere.length; i++) {
let { tagnames, tagids } = isThere[i];
tagnames = tagnames.split('|');
tagids = tagids.split('|');
for (let j = 0; j < tagnames.length; j++) {
if (!ishashObj[tagnames[j]]) {
ishashObj[tagnames[j]] = tagids[j];
}
}
}
// console.log(ishashObj);
// for(let i=0;i<itemtagscombinationRes.length;i++){
// }
}
async function getProductDetails(id) {
// let res = await getStatAPIService(`${SERVERNAME}/apis/v4/bizgaze/integrations/products/productattributelist/productid/${id}`);
let resData = await API_SERVICES_ACTIONS.getAPIService(`apis/v4/bizgaze/integrations/products/productattributelist/productid/${id}`, true);
if (resData.isError) {
loadingActions.removeLoader();
alert(resData.errorMsg.message);
return;
}
let res = resData.response;
res = JSON.parse(res.result);
console.log(res, 'productattributelist');
if (!res) {
loadingActions.removeLoader();
return;
};
let html = '';
for (let i = 0; i < res.length; i++) {
const currItem = res[i];
// parenttagid means under what label
// tag id means it know unquie id
const { parentattribute, parenttagid, tagid, attribute, productid } = currItem;
if (labels[parentattribute]) {
labels[parentattribute].items.push({
attribute,
tagid: tagid
});
} else {
labels[parentattribute] = {
id: parenttagid,
items: [{
attribute,
tagid: tagid
}]
};
html += getParentHTML(parentattribute, productid, parenttagid, i == 0);
}
}
$('#spec-container-details').html(html);
// console.log(labels,'labels');
let childIds = [];
for (let item in labels) {
let { id, items } = labels[item];
// $(`[data-tagid=${id}]`)
let html = '';
for (let i = 0; i < items.length; i++) {
const { attribute, tagid } = items[i]
childIds.push(tagid);
group[attribute] = item;
html += getChildHTML(tagid, attribute, i == 0);
}
$(`[data-tagid="${id}"]`).html(html);
}
itemtagscombinationRes = await API_SERVICES_ACTIONS.getAPIService(`apis/v4/bizgaze/integrations/products/getitemwithoutbranch/productid/${id}`, true);
itemtagscombinationRes = JSON.parse(itemtagscombinationRes.response.result);
console.log(itemtagscombinationRes, "conductt");
let valuesSelected = [];
$('.borderselector').each(function (i, el) {
let val = $(el).html();
valuesSelected.push(val.trim());
});
let searchParams = window.location.search.split("&");
let skuId = window.location.hash.split('#')[1].split('=')[1];
// skuId = skuId.split('=')[1]
let isGo = true;
for (let i = 0; i < itemtagscombinationRes.length; i++) {
const currItem = itemtagscombinationRes[i];
const { tagnames, sku, itemid } = currItem;
isThereInLabel[tagnames] = itemtagscombinationRes[i];
let isTrue = true;
if (isGo) {
// for(let i=0;i<valuesSelected.length;i++){
// if(!tagnames.includes(valuesSelected[i])){
// isTrue = false
// }
// }
if (skuId != itemid) {
isTrue = false
}
if (isTrue) {
console.log(itemtagscombinationRes[i], 'itemtagscombinationRes[i]');
currentComb = itemtagscombinationRes[i];
// location.hash = itemtagscombinationRes[i].itemname.trim();
// $('.productname').html(itemtagscombinationRes[i].itemname);
// $('#skudetailitem').val(itemtagscombinationRes[i].sku)
// $('.price').html(itemtagscombinationRes[i].pricelist)
// appendSpecs(itemtagscombinationRes[i].itemid);
// $('.des_productdes').html(itemtagscombinationRes[i].itemdescription);
updateDetailsByObj(itemtagscombinationRes[i]);
isGo = false;
let { tagnames, tagids, pricelist } = itemtagscombinationRes[i];
tagids = tagids.split('|');
tagnames = tagnames.split('|');
$('.optiontaganwi').removeClass('borderselector');
for (let i = 0; i < tagids.length; i++) {
$(`[data-tagiditem="${tagids[i]}"]`).addClass('borderselector');
}
// tagiditem
}
}
}
if (isGo && itemtagscombinationRes.length != 0) {
console.log(itemtagscombinationRes[0]);
let { tagnames, tagids, pricelist } = itemtagscombinationRes[0];
tagids = tagids.split('|');
tagnames = tagnames.split('|');
$('.optiontaganwi').removeClass('borderselector');
currentComb = itemtagscombinationRes[0];
// updateItemId(itemtagscombinationRes[0].itemid);
for (let i = 0; i < tagids.length; i++) {
$(`[data-type="${tagids[i]}-${tagnames[i]}"]`).addClass('borderselector');
$(`[data-type="${tagids[i]}-Eucalyptus Green"]`).removeClass('borderselector');
$(`[data-type="${tagids[i]}-Desert Brown"]`).removeClass('borderselector');
$(`[data-type="${tagids[i]}-Deep Sea Blue"]`).removeClass('borderselector');
}
// $('.price').html(pricelist);
// $('.des_productdes').html(itemtagscombinationRes[0].itemdescription);
// appendSpecs(itemtagscombinationRes[0].itemid);
updateDetailsByObj(itemtagscombinationRes[0]);
//console.log(childIds);
//
}
//getAllCombination(valuesSelected)
// for(let i=0;i<itemtagscombinationRes.length;i++){
// const {tagnames} = itemtagscombinationRes[i];
// }
$('#spec-container-details').children().find('.specsmallcard').removeClass('specsmallcard');
addeventlisteners();
loadingActions.removeLoader();
return;
// let resTwo = await postStatAPIService(`${SERVERNAME}/apis/v4/bizgaze/integrations/products/itemtagscombination/productid/${id}`);
//let html = '';
let attributesObj = {};
for (let i = 0; i < res.length; i++) {
const { parentattribute, tagid, productid } = res[i];
// let attributes = await postStatAPIService(`${SERVERNAME}/apis/v4/bizgaze/integrations/products/productattributelist/parenttagid/${tagid}`);
// attributesObj[tagid] = JSON.parse(attributes.data.result);
// console.log(attributes.data.result,tagid);
html += getParentHTML(parentattribute, productid, tagid, i == 0);
}
$('#spec-container-details').html(html);
// let attributes = await postStatAPIService(`${SERVERNAME}/apis/v4/bizgaze/integrations/products/productattributelist/parenttagid/${tagid}`);
return;
for (let attr in attributesObj) {
const arr = attributesObj[attr];
let html = '';
for (let i = 0; i < arr.length; i++) {
const { attribute, tagid } = arr[i];
html += getChildHTML(tagid, attribute, i == 0);
}
$(`[data-tagid="${attr}"]`).html(html);
}
let defaultValues = await postStatAPIService(`${SERVERNAME}/apis/v4/bizgaze/integrations/products/sellableitemlist/productid/${id}`);
defaultValues = JSON.parse(defaultValues.data.result);
let { itemname, price } = defaultValues[0];
$('.productname').html(itemname);
$('.price').html(price)
$('#spec-container-details').children().slice(1).find('.specsmallcard').removeClass('specsmallcard');
// getQuantityById(id)
}
}
startDetails();
+3 -6
View File
@@ -197,9 +197,7 @@
<h5 class="card-text my-4"><small <h5 class="card-text my-4"><small
class="satoshi_font text-black-50">Starting from ₹ class="satoshi_font text-black-50">Starting from ₹
47,990</small></h5> 47,990</small></h5>
<a class="btn btn-dark " <a class="btn btn-dark " href="/zeno-landing.html">Know More</a>
href="/laptopdetails.html?Zeno#productId=106633230000029">Buy
Now</a>
</div> </div>
</div> </div>
</div> </div>
@@ -231,9 +229,8 @@
<h5 class="card-text my-4"><small <h5 class="card-text my-4"><small
class="satoshi_font text-black-50">Starting from ₹ class="satoshi_font text-black-50">Starting from ₹
47,990</small></h5> 47,990</small></h5>
<a class="btn btn-dark " <a class="btn btn-dark " href="/zeno-landing.html">Know More</a>
href="/laptopdetails.html?Zeno#productId=106633230000029">Buy
Now</a>
</div> </div>
</div> </div>
</div> </div>
+13 -9
View File
@@ -388,7 +388,7 @@
<div class="container mainContanierProduct d-none section-two"> <div class="container mainContanierProduct d-none section-two">
<div class="row"> <div class="row">
<div class="col-xl-5 "> <div class="col-xl-5 ">
<div class="left_anwi_img"> <div class="left_anwi_img bgproductDGen">
<div class=" productDetailsShadow productDetailsMain card border-0 box-shodow"> <div class=" productDetailsShadow productDetailsMain card border-0 box-shodow">
<img src="./dist/assets/imgs/nophoto.png" alt="" class="card-img img-fluid success-img p-5" <img src="./dist/assets/imgs/nophoto.png" alt="" class="card-img img-fluid success-img p-5"
id="main_show_img"> id="main_show_img">
@@ -664,14 +664,18 @@
<!-- <div class="d-flex gap-5 specContainer mt-3"> --> <!-- <div class="d-flex gap-5 specContainer mt-3"> -->
<div class="specContainerleft"> <div class="specContainerleft">
<div class="accordion custom-accordion text-dark" id="faqAccordion"> <div class="accordion custom-accordion text-dark" id="faqAccordion">
<!-- <div class="accordion-item custom-accordion-item"> <div class="accordion-item custom-accordion-item">
<h2 class="accordion-header custom-accordion-header" id="questionOneHeader"> <h2 class="accordion-header custom-accordion-header"
<button class="accordion-button bg-white text-dark custom-accordion-button" type="button" id="questionOneHeader">
data-bs-toggle="collapse" data-bs-target="#answerOne" aria-expanded="true" <button
aria-controls="answerOne"> class="accordion-button bg-white text-dark custom-accordion-button"
type="button" data-bs-toggle="collapse" data-bs-target="#answerOne"
aria-expanded="true" aria-controls="answerOne">
<div id="answerOne" class="accordion-collapse collapse show custom-accordion-content" <div id="answerOne"
aria-labelledby="questionOneHeader" data-bs-parent="#faqAccordion"> class="accordion-collapse collapse show custom-accordion-content"
aria-labelledby="questionOneHeader"
data-bs-parent="#faqAccordion">
<div class="accordion-body custom-accordion-body"> <div class="accordion-body custom-accordion-body">
Windows 11 Home/Windows 11 Pro Windows 11 Home/Windows 11 Pro
@@ -680,7 +684,7 @@
</button> </button>
</h2> </h2>
</div> --> </div>
<div class="accordion-item border-x-none py-4"> <div class="accordion-item border-x-none py-4">
<h2 class="accordion-header" id="${mainid}"> <h2 class="accordion-header" id="${mainid}">
+391 -6
View File
File diff suppressed because it is too large Load Diff
+5 -1
View File
@@ -1650,7 +1650,7 @@ body {
} }
.home-main-container .zeno_steamlined_section { .home-main-container .zeno_steamlined_section {
background-color: #000; /* background-color: #000; */
} }
.home-main-container .zeno_steamlined_section .zeno_logo img { .home-main-container .zeno_steamlined_section .zeno_logo img {
@@ -2778,4 +2778,8 @@ body {
width: 100px; width: 100px;
} }
.specContainerleft .accordion-button::after {
background-image: none !important;
}
/*# sourceMappingURL=style.css.map */ /*# sourceMappingURL=style.css.map */
+310
View File
@@ -0,0 +1,310 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link href="./dist/css/plugins/aos.css" rel="stylesheet" />
<link rel="stylesheet" href="./all.css" />
<script src="https://cdn.tailwindcss.com"></script>
<title>Anwi</title>
</head>
<body>
<!-- navbar -->
<!-- <auth-loader></auth-loader> -->
<div id="navbar-head" class=""></div>
<!-- end-navbar -->
<!-- main-body -->
<main class="main-body home-main-container loading-main" id="home-main-container">
<!-- banner section -->
<section>
<div class="container">
<img src="./dist/assets/imgs/zeno/aio/banner-1-DT.jpg" alt="">
<h2 class="text-7xl text-center font-semibold">Anwi Zeno AIO</h2>
<h4 class="text-5xl text-center my-3">Sleek Elegance,<span class="font-semibold"> Powerful
Performance</span>
</h4>
<p class="text-center max-w-5xl text-2xl m-auto my-5"><strong>We dont just build machines;</strong> we
create tools that
make
your
life easier and better. Every product is made with love, understanding what
you really need.</p>
</div>
</section>
<!-- stand section -->
<section>
<div class="container bg-black py-24">
<div class="md:grid grid-cols-5 max-w-7xl my-5 mx-auto">
<div class="text-white col-span-2 flex flex-col justify-center">
<h2 class="text-3xl font-semibold">Adapts to you</h2>
<p class="text-xl mt-3">Versatile stands give you the freedom to use your display at the angle
with
tilt, height, and
swivel functionality that can adapt to a range of working styles--whether sitting at a desk,
or standing to serve customers, you´ll always have the best view.</p>
</div>
<div class="col-span-3 flex justify-center">
<img src="./dist/assets/imgs/zeno/aio/stand.png" alt="" class="w-4/6">
</div>
</div>
</div>
</section>
<!-- display section -->
<section>
<div class="container">
<div class=" max-w-7xl m-auto text-center my-5 relative">
<h2 class="text-2xl uppercase "><span
class="text-cyan-700 tracking-widest border-t-2 border-cyan-700 pt-2">Display</span>
</h2>
<h3 class="text-5xl font-semibold my-4"><span>Display of brilliance</span></h3>
<div class="mx-44 text-xl font-medium">The space-saving ANWI M3402WFA is remarkably slim and light,
and
its NanoEdge
display<sup class="footnote-num"><a href="#footnote-3" aria-label="Footnote 3">3</a></sup>
features
a
thin bezel for edge-to-edge viewing and an impressive up to 88% screen-to-body ratio. This
stunning widescreen display includes 178<sup class="sign-deg">°</sup> viewing angles and 100%
sRGB color gamut for vivid and realistic-looking colors. The 24-inch touchscreen<sup
class="footnote-num"><a href="#footnote-2" aria-label="Footnote 2">2</a></sup> also boasts
1920x1080 resolution and features an anti-glare coating and certified by TÜV Rheinland for eye
comfort and low blue-light emissions — so your eyes stay fresh during long viewing sessions.
</div>
<div class="grid grid-cols-5 my-12">
<div class="" data-gaid="" data-index="1">
<div class="text-5xl font-medium text-cyan-700">24”</div>
<div class=""><span>FHD NanoEdge display</span>
</div>
</div>
<div class="" data-gaid="" data-index="2">
<div class="text-5xl font-medium text-cyan-700">88%</div>
<div class=""><span>screen-to-body ratio</span>
</div>
</div>
<div class="" data-gaid="" data-index="3">
<div class="text-5xl font-medium text-cyan-700">100%</div>
<div class=""><span>sRGB color gamut</span>
</div>
</div>
<div class="" data-gaid="" data-index="4">
<div class=""><img class="img img__icon img__icon4"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII="
alt="An icon for TÜV Rheinland-certified eye care">
</div>
<div class=""><span>TÜV Rheinland-certified eye care</span>
</div>
</div>
<div class="" data-gaid="" data-index="5">
<div class=""><img class="img img__icon img__icon5"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII="
alt="An icon for anti-glare display">
</div>
<div class=""><span>anti-glare display</span>
</div>
</div>
</div>
</div>
<div class="mt-[-300px]">
<img src="./dist/assets/imgs/zeno/aio/Banner-2-DT.jpg" alt="">
</div>
</div>
</section>
<!-- audio section -->
<section>
<div class="relative container">
<div>
<img src="./dist/assets/imgs/zeno/aio/audio.jpg" alt="">
</div>
<div class="absolute left-2/3 bottom-1/3">
<h2 class="uppercase tracking-widest"><span
class="text-cyan-700 border-t-2 border-cyan-700 text-2xl">Audio</span>
</h2>
<h3 class="text-5xl font-semibold leading-snug my-4"><span>High-fidelity SonicMaster sound, expertly
optimized</span>
</h3>
<div class="font-medium text-xl">ANWI SonicMaster, developed by the ANWI Golden Ear team, empowers
ANWI
M3402WFA with
quality audio that delivers wider frequency range for clearer vocals and rich, deep bass.
SonicMaster is a tailored mix of superior hardware and clever software designed to give you full
audio controls for truly immersive sound for movies, music and games.</div>
</div>
</div>
</section>
<!-- beginners section -->
<section>
<div class="container">
<div class="grid grid-cols-2 gap-5 mx-3">
<div class=""><img
src="https://in-files.apjonlinecdn.com/landingpages/content-pages/hp-aio-desktop/images/w100_everyday_img2_v2.jpg"
alt="Desktops For Beginners" data-src="" class="img_width_100">
<div class=" show-in-mobile"></div>
</div>
<div class="md:me-44">
<h3 class="text-blue-800 text-xl">Desktops For Beginners</h3>
<h5 class="text-2xl font-medium">Comfortable viewing experience for the little ones.
</h5>
<ul class="space-y-3 divide-y-2 divide-black">
<li>Designed for eye comfort</li>
<li>Big, anti-glare screen</li>
<li>Safe for kids privacy with HD Wide Vision
Camera</li>
<li class="mt-4 pt-4">
Starting from <span class="lowest_price">
<span class="price">₹36,499</span> </span>
</li>
</ul>
<div class="mt-8">
<a href="#" class="bg-black text-white px-3 py-2 mt-8" tabindex="0">Shop
Now</a>
</div>
</div>
</div>
</div>
</section>
<!-- ports section -->
<section>
<div class="container">
<div class="mt-5 pt-5">
<h2 class="uppercase tracking-widest text-center"><span
class="text-cyan-700 border-t-2 border-cyan-700 text-2xl">Connectivity</span>
</h2>
<h3 class="text-4xl font-semibold text-center my-3">
<span>Fast, reliable connectivity</span>
</h3>
<div class="max-w-4xl m-auto text-xl font-medium text-center">
ANWI M3402WFA is loaded with the latest connectivity, including an HDMI-in port that lets you
hook up video and audio from an external source — enabling amazing big-screen experiences for
your laptop, mobile device, game console or even a set-top TV box. There are also three USB 3.2
Gen 1 ports for connecting all your peripherals, an HDMI-out port for attaching an external
display and an SD card reader<sup class="footnote-num"><a href="#"
aria-label="Footnote 2">2</a></sup> for everyday convenience. ANWI M3402WFA also has
integrated security, with a built-in Kensington lock slot for simple and effective physical
protection.</div>
<div class="grid grid-cols-4 max-w-3xl mx-auto text-center my-24 font-medium">
<div class="">
<div class="text-5xl font-medium text-cyan-700"><img class="m-auto"
src="./dist/assets/imgs/zeno/aio/icon_typea.png"
alt="An icon for USB 3.2 Gen 1 Type-A x 3">
</div>
<div class="wd__feature__describe"><span>USB 3.2 Gen 1 Type-A x 3</span>
</div>
</div>
<div class="">
<div class="text-5xl font-medium text-cyan-700"><img class="img img__icon img__icon1"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII="
alt="An icon for USB-C® 3.2 Gen 1">
</div>
<div class=""><span>USB-C<sup role="img" aria-label="registered" class="sign-reg">®</sup>
3.2 Gen 1</span>
</div>
</div>
<div class="">
<div class="text-3xl font-medium text-cyan-700 ">10x</div>
<div class=""><span>faster than USB 2.0</span>
</div>
</div>
<div class="">
<div class="text-5xl font-medium text-cyan-700 text-center"><img class="m-auto"
src="./dist/assets/imgs/zeno/aio/icon_typed.png" alt="An icon for HDMI-in Port">
</div>
<div class=""><span>HDMI-in Port</span>
</div>
</div>
</div>
</div>
<img src="./dist/assets/imgs/zeno/aio/ports.png" alt="" class="mt-5">
</div>
</section>
<!-- secure section -->
<section>
<div class="container">
<div class="relative">
<img src="./dist/assets/imgs/zeno/aio/security.jpg" alt="" class="">
<div class="absolute top-16 max-w-xl right-16">
<h2 class="uppercase tracking-widest"><span
class="text-cyan-700 border-t-2 border-cyan-700 text-2xl">Security</span>
</h2>
<h3 class="my-6 text-5xl font-semibold">
<span>Secure your crucial data</span>
</h3>
<div class="text-xl font-medium">Remote working is
accelerating, and with it the need to keep your crucial data safe. Thats why ANWI M3402WFA
is equipped with first-class security. The cameras shutter slides across in a moment for
instant privacy, whenever you need it. Theres also the all-new Microsoft Pluton chip that
bakes security into the CPU core, ensuring both code integrity and the latest protection —
virtually eliminating the risk of leaks through hacking. ANWI M3402WFA also has a Kensington
slot that provides a way to physically safeguard the machine, preventing theft of the PC
from unsupervised locations.</div>
</div>
</div>
</div>
</section>
<section>
<div class="container p-3" style="background: #e2e2e2;">
<h2 class="text-center font-weight-600 my-4">
Zeno: Experience Desktop Power
</h2>
<div class="d-flex">
<h3 class="font-weight-lighter">
Upgradability in <br>
<div style="white-space: nowrap; font-weight: 800;" class="pt-4">Sleek
All-in-One</div> Design
</h3>
<div class="ms-5">
<img src="./dist/assets/imgs/zeno/aio/aio1.jpeg" alt="" class="w-100">
</div>
</div>
</div>
</section>
<section>
<div class="container">
<img src="./dist/assets/imgs/zeno/aio/front.jpeg" alt="">
</div>
</section>
<section>
<div class="container">
<img src="./dist/assets/imgs/zeno/aio/inner-panel.jpeg" alt="">
</div>
</section>
<section>
<div class="container">
<img src="./dist/assets/imgs/zeno/aio/rear.jpeg" alt="">
</div>
</section>
</main>
<!-- footer -->
<div id="footer-head"></div>
<!-- end-footer -->
<!-- <script src="https://player.vimeo.com/api/player.js"></script> -->
<script src="./dist/js/components/authloader/authloader.js"></script>
<script src="./dist/js/jquery.min.js"></script>
<script src="./libs/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="./dist/js/vendor/modernizr-3.11.7.min.js"></script>
<script src="./dist/js/vendor/jquery-v3.6.0.min.js"></script>
<script src="./dist/js/vendor/jquery-migrate-v3.3.2.min.js"></script>
<script src="./dist/js/plugins/jquery-ui.js"></script>
<script src="./dist/js/plugins/magnific-popup.js"></script>
<script src="./dist/js/navbar.js"></script>
<script src="./dist/js/footer.js"></script>
<script src="./dist/js/main.js"></script>
<script src="./dist/js/plugins/aos.js"></script>
<script>
AOS.init();
</script>
</body>
</html>