added new zeno landing pages
This commit is contained in:
Vendored
+10
-26
@@ -120,35 +120,19 @@ function navINIT() {
|
||||
<li>
|
||||
<div class="d-flex gap-5 pt-5 pb-4 align-items-center justify-content-center">
|
||||
<div class="position-relative nav-tab-show bg-gray-3 rounded-2 px-md-5 pt-md-5 pb-md-4 d-none notes cursor-pointer">
|
||||
<a class="h-100 nav_items zenosleekbook" href="/laptopdetails.html?Zeno#productId={106633230000029}">
|
||||
<a class="h-100 nav_items zenosleekbook" href="/zeno-landing.html">
|
||||
<div style="" class="align-items-center cursor-pointer d-flex gap-5 flex-column h-100 justify-content-center rounded-3">
|
||||
<img src="https://assets.bizgaze.com/_files/documents/663/e7b635fd-2247-4691-9492-108889b17930/14%20inch.png" alt="ora img" class="nav_imgs success-img"/>
|
||||
<p class="mb-0 text-center text-dark w-100 fw-500">Zeno Sleekbook </p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="position-relative nav-tab-show bg-gray-3 rounded-2 px-md-5 pt-md-5 pb-md-4 d-none notes cursor-pointer">
|
||||
<a class="h-100 nav_items fyroflagship" href="/laptopdetails.html?Fyro#productId={106633230000031}">
|
||||
<div style="" class=" align-items-center cursor-pointer d-flex gap-5 flex-column h-100 justify-content-center rounded-3">
|
||||
<img src="https://assets.bizgaze.com/_files/documents/663/c7ff1466-6274-48a4-abfd-aba94ad9d56f/17 inches.png" alt="ora img" class="nav_imgs success-img"/>
|
||||
<p class="mb-0 text-center text-dark w-100 fw-500">Fyro Flagship </p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="position-relative nav-tab-show bg-gray-3 rounded-2 px-md-5 pt-md-5 pb-md-4 notes cursor-pointer d-none">
|
||||
<a class="h-100 nav_items zenodualbook" href="/laptopdetails.html?Zeno#productId={106633230000030}">
|
||||
<div style="" class=" align-items-center cursor-pointer d-flex gap-5 flex-column h-100 justify-content-center rounded-3">
|
||||
<img src="https://assets.bizgaze.com/_files/documents/663/74040488-b018-48bb-8dbc-d3d2a3ab0576/zeno-dual-book.png" alt="ora img" class="nav_imgs success-img"/>
|
||||
<p class="mb-0 text-center text-dark w-100 fw-500">Zeno Dual Book </p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="hover_tab_2">
|
||||
<a href="/allinones.html" class="satoshi_font flex items-center">ALL IN ONES
|
||||
<a href="/zeno-aio-landing.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">
|
||||
<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>
|
||||
@@ -157,14 +141,14 @@ function navINIT() {
|
||||
<li>
|
||||
<div class="d-flex gap-5 pt-5 pb-4 align-items-center justify-content-center">
|
||||
<div class="position-relative nav-tab-show bg-gray-3 rounded-2 px-md-5 pt-md-5 pb-md-4 notes cursor-pointer">
|
||||
<a class="h-100 nav_items zenoaio" href="/laptopdetails.html?AIO Zeno#productId=106633230000026#itemid=106633240000112">
|
||||
<a class="h-100 nav_items zenoaio" href="/zeno-aio-landing.html">
|
||||
<div style="" class="align-items-center cursor-pointer d-flex gap-5 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 success-img"/>
|
||||
<img src="/dist/assets/imgs/zeno/aio/aio.png" alt="ora img" class="nav_imgs success-img"/>
|
||||
<p class="mb-0 text-center text-dark w-100 fw-500">Zeno All in ones</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="position-relative nav-tab-show bg-gray-3 rounded-2 px-md-5 pt-md-5 pb-md-4 notes cursor-pointer">
|
||||
<div class="position-relative d-none nav-tab-show bg-gray-3 rounded-2 px-md-5 pt-md-5 pb-md-4 notes cursor-pointer">
|
||||
<a class="h-100 nav_items" href="/laptopdetails.html?AIO Fyro#productId=106633230000027#itemid=106633240000126">
|
||||
<div style="" class=" align-items-center cursor-pointer d-flex gap-5 flex-column h-100 justify-content-center rounded-3">
|
||||
<img src="https://assets.bizgaze.com/_files/documents/663/abfaa5a3-339a-4bf8-ade2-f6928bfae04b/Asset 4@2x.png" alt="ora img" class="nav_imgs success-img"/>
|
||||
@@ -378,25 +362,25 @@ function navINIT() {
|
||||
Zeno Sleekbook
|
||||
</div>
|
||||
</a>
|
||||
<a class="h-100 p-1 fyroflagship" href="/laptopdetails.html?Fyro#productId={106633230000031}">
|
||||
<a class="h-100 p-1 fyroflagship d-none" href="/laptopdetails.html?Fyro#productId={106633230000031}">
|
||||
<div class="ps-2">Fyro Flagship </div>
|
||||
</a>
|
||||
<a class="h-100 p-1 zenodualbook" href="/laptopdetails.html?Zeno#productId={106633230000030}">
|
||||
<a class="h-100 p-1 zenodualbook d-none" href="/laptopdetails.html?Zeno#productId={106633230000030}">
|
||||
<div class="ps-2">Zeno Dual Book </div>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="expandlinav">
|
||||
<div class="d-flex justify-content-between explandlinavnameparent">
|
||||
<span class="explandlinavname">ALL IN ONES </span><span data-name="allinones.html" class="viewall_li">+</span>
|
||||
<span class="explandlinavname">ALL IN ONES </span><span data-name="zeno-aio-landing.html" class="viewall_li">+</span>
|
||||
</div>
|
||||
<div class="content-expandlinav pt-2 d-none">
|
||||
<a class="h-100 p-1" href="/laptopdetails.html?AIO Zeno#productId=106633230000026#itemid=106633240000112">
|
||||
<a class="h-100 p-1" href="/zeno-aio-landing.html">
|
||||
<div class="ps-2">
|
||||
Zeno All In One
|
||||
</div>
|
||||
</a>
|
||||
<a class="h-100 p-1" href="/laptopdetails.html?AIO Fyro#productId=106633230000027#itemid=106633240000126">
|
||||
<a class="h-100 d-none p-1" href="/laptopdetails.html?AIO Fyro#productId=106633230000027#itemid=106633240000126">
|
||||
<div class="ps-2">
|
||||
Fyro All iIn One
|
||||
</div>
|
||||
|
||||
Vendored
+310
-284
@@ -1,294 +1,302 @@
|
||||
function ramProductsInit(){
|
||||
let RAM_ID = '';
|
||||
|
||||
async function init(){
|
||||
let id
|
||||
if(location.search==''&&(location.href.includes('laptops')||location.href.includes('allinones'))){
|
||||
id = await getallproductsFun();
|
||||
}else{
|
||||
id = await getProductIdService();
|
||||
}
|
||||
getRamData(id)
|
||||
function ramProductsInit() {
|
||||
let RAM_ID = "";
|
||||
|
||||
async function init() {
|
||||
let id;
|
||||
if (
|
||||
location.search == "" &&
|
||||
(location.href.includes("laptops") || location.href.includes("allinones"))
|
||||
) {
|
||||
id = await getallproductsFun();
|
||||
} else {
|
||||
id = await getProductIdService();
|
||||
}
|
||||
getRamData(id);
|
||||
}
|
||||
|
||||
async function getProductsIds(nameArr) {
|
||||
let resData = await API_SERVICES_ACTIONS.getAPIService(
|
||||
`apis/v4/bizgaze/integrations/products/getallproducts`,
|
||||
true
|
||||
);
|
||||
if (resData.isError) {
|
||||
toasterHelper("error", "Something went wrong!");
|
||||
return;
|
||||
}
|
||||
|
||||
async function getProductsIds(nameArr){
|
||||
let resData = await API_SERVICES_ACTIONS.getAPIService(`apis/v4/bizgaze/integrations/products/getallproducts`,true);
|
||||
if(resData.isError){
|
||||
toasterHelper("error","Something went wrong!")
|
||||
return;
|
||||
let res = resData.response;
|
||||
|
||||
res = JSON.parse(res.result);
|
||||
let ids = [];
|
||||
|
||||
for (let i = 0; i < nameArr.length; i++) {
|
||||
const currName = nameArr[i];
|
||||
let id = res.find((item) => {
|
||||
if (currName === item.productname) {
|
||||
return item.productid;
|
||||
}
|
||||
|
||||
let res = resData.response;
|
||||
|
||||
res = JSON.parse(res.result);
|
||||
let ids = [];
|
||||
|
||||
for(let i=0;i<nameArr.length;i++){
|
||||
const currName = nameArr[i];
|
||||
let id = res.find((item)=>{
|
||||
if(currName === item.productname){
|
||||
return item.productid;
|
||||
}
|
||||
})
|
||||
if(id){
|
||||
ids.push(id);
|
||||
}
|
||||
}
|
||||
|
||||
return ids;
|
||||
|
||||
});
|
||||
if (id) {
|
||||
ids.push(id);
|
||||
}
|
||||
}
|
||||
|
||||
async function getallproductsFun(){
|
||||
let laptopStr = ['FYRO Flagship','Zeno Dualbook','Zeno Sleekbook'];
|
||||
let allInOnesStr = ['AIO Zeno','AIO Fyro'];
|
||||
return ids;
|
||||
}
|
||||
|
||||
|
||||
async function getallproductsFun() {
|
||||
let laptopStr = ["FYRO Flagship", "Zeno Dualbook", "Zeno Sleekbook"];
|
||||
let allInOnesStr = ["AIO Zeno", "AIO Fyro"];
|
||||
|
||||
let name = window.location.href;
|
||||
let name = window.location.href;
|
||||
|
||||
name = name.includes('laptops') ?laptopStr : allInOnesStr;
|
||||
name = name.includes("laptops") ? laptopStr : allInOnesStr;
|
||||
|
||||
const ids = await getProductsIds(name);
|
||||
const ids = await getProductsIds(name);
|
||||
|
||||
console.log(ids);
|
||||
console.log(ids);
|
||||
|
||||
return ids;
|
||||
return ids;
|
||||
}
|
||||
|
||||
function getProductIdService() {
|
||||
return new Promise(async (reslove, reject) => {
|
||||
let resData = await API_SERVICES_ACTIONS.getAPIService(
|
||||
`apis/v4/bizgaze/integrations/products/getallproducts`,
|
||||
true
|
||||
);
|
||||
if (resData.isError) {
|
||||
alert(resData.errorMsg.message);
|
||||
return;
|
||||
}
|
||||
|
||||
let res = resData.response;
|
||||
|
||||
res = JSON.parse(res.result);
|
||||
|
||||
// console.log(res);
|
||||
|
||||
let searchName = window.location.search.split("?")[1];
|
||||
let urlPathName = window.location.pathname;
|
||||
let searchTerm = "";
|
||||
if (urlPathName.includes("ram")) {
|
||||
searchTerm = "RAM ORA";
|
||||
} else if (urlPathName.includes("storage")) {
|
||||
searchTerm = `SSD ORA`;
|
||||
} else {
|
||||
searchTerm = searchName.replaceAll("%20", " ");
|
||||
}
|
||||
let resultItem = [];
|
||||
|
||||
if (searchTerm.toLowerCase() === "zeno") {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if (
|
||||
res[i].productname.includes("Zeno Sleekbook") ||
|
||||
res[i].productname.includes("Zeno Dualbook")
|
||||
) {
|
||||
resultItem.push(res[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return reslove(resultItem);
|
||||
} else if (searchTerm.toLowerCase() === "fyro") {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if (res[i].productname.includes("FYRO Flagship")) {
|
||||
resultItem.push(res[i]);
|
||||
return reslove(resultItem);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
if (res[i].productname.includes(searchTerm)) {
|
||||
resultItem.push(res[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return reslove(resultItem);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function getRamData(ids) {
|
||||
let resData;
|
||||
let res;
|
||||
let data = [];
|
||||
let windowSearch = window.location.href;
|
||||
for (let i = 0; i < ids.length; i++) {
|
||||
let id = ids[i].productid;
|
||||
if (
|
||||
windowSearch.includes("laptops") ||
|
||||
windowSearch.includes("allinones")
|
||||
) {
|
||||
resData = await API_SERVICES_ACTIONS.getAPIService(
|
||||
`apis/v4/Bizgaze/integrations/products/getitemwithoutbranch/productid/${id}`,
|
||||
true
|
||||
);
|
||||
} else {
|
||||
resData = await API_SERVICES_ACTIONS.getAPIService(
|
||||
`apis/v4/bizgaze/integrations/products/itemtagscombination/productid/${id}`,
|
||||
true
|
||||
);
|
||||
}
|
||||
if (resData.isError) {
|
||||
alert(resData.errorMsg.message);
|
||||
return;
|
||||
}
|
||||
|
||||
res = resData.response;
|
||||
|
||||
res = JSON.parse(res.result);
|
||||
data = [...data, ...res];
|
||||
}
|
||||
|
||||
function getProductIdService(){
|
||||
return new Promise(async (reslove,reject)=>{
|
||||
|
||||
let resData =await API_SERVICES_ACTIONS.getAPIService(`apis/v4/bizgaze/integrations/products/getallproducts`,true);
|
||||
if(resData.isError){
|
||||
alert(resData.errorMsg.message);
|
||||
return;
|
||||
console.log(data);
|
||||
let html = "";
|
||||
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
console.log(data[i].tagids);
|
||||
let tags_id = data[i].tagids;
|
||||
let tags_filter = tags_id.includes("106631360000087");
|
||||
let tags_filter_2 = tags_id.includes("106631360000088");
|
||||
let tags_filter_3 = tags_id.includes("106631360000089");
|
||||
|
||||
if (
|
||||
tags_filter == false &&
|
||||
tags_filter_2 == false &&
|
||||
tags_filter_3 == false
|
||||
) {
|
||||
if (data[i].itemname.includes("AIO Fyro - 32")) continue;
|
||||
html += getRamCardHTML(data[i]);
|
||||
} else {
|
||||
let data_name = tags_id.includes("106631360000087");
|
||||
let name_id = data[i].tagids.includes("106631360000087");
|
||||
if (data_name === true && name_id === true) {
|
||||
for (let j = 0; j < data.length; j++) {
|
||||
if (j == 0) {
|
||||
if (data[j].itemname.includes("AIO Fyro - 32")) continue;
|
||||
html += getRamCardHTML(data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$(".product_card_section").html(html);
|
||||
if (window.location.href.includes("?Zeno")) {
|
||||
$(".product_card_section div.ram_card:nth-child(1)").addClass("d-none");
|
||||
$(".product_card_section div.ram_card:nth-child(6)").addClass("d-none");
|
||||
}
|
||||
if (window.location.href.includes("?FYRO")) {
|
||||
$(".product_card_section div.ram_card:nth-child(3)").addClass("d-none");
|
||||
$(".product_card_section div.ram_card:nth-child(7)").addClass("d-none");
|
||||
$(".product_card_section div.ram_card:nth-child(8)").addClass("d-none");
|
||||
}
|
||||
// $('.ramcard').click(function(e){
|
||||
|
||||
let res = resData.response;
|
||||
|
||||
res = JSON.parse(res.result);
|
||||
// let sku = $(e.target).data('itemid');
|
||||
// let itemid = $(e.target).data('itemid');
|
||||
|
||||
// console.log(res);
|
||||
// window.location.href = `/productdetails.html?productId=${RAM_ID}#itemid=${itemid}`
|
||||
|
||||
let searchName = window.location.search.split('?')[1];
|
||||
let urlPathName = window.location.pathname;
|
||||
let searchTerm = '';
|
||||
if(urlPathName.includes('ram')){
|
||||
searchTerm = "RAM ORA";
|
||||
}else if(urlPathName.includes('storage')){
|
||||
searchTerm = `SSD ORA`;
|
||||
}else{
|
||||
searchTerm = searchName.replaceAll('%20',' ');
|
||||
}
|
||||
let resultItem = [];
|
||||
|
||||
if(searchTerm.toLowerCase() === 'zeno'){
|
||||
for(let i=0;i<res.length;i++){
|
||||
if(res[i].productname.includes("Zeno Sleekbook")||res[i].productname.includes("Zeno Dualbook")){
|
||||
resultItem.push( res[i])
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return reslove(resultItem)
|
||||
}else if(searchTerm.toLowerCase() === 'fyro'){
|
||||
for(let i=0;i<res.length;i++){
|
||||
if(res[i].productname.includes("FYRO Flagship")){
|
||||
resultItem.push(res[i]);
|
||||
return reslove(resultItem)
|
||||
}
|
||||
}
|
||||
}else{
|
||||
for(let i=0;i<res.length;i++){
|
||||
if(res[i].productname.includes(searchTerm)){
|
||||
resultItem.push(res[i])
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return reslove(resultItem)
|
||||
}
|
||||
// })
|
||||
}
|
||||
|
||||
|
||||
function getRamCardHTML({
|
||||
itemname,
|
||||
pricelist,
|
||||
itemid,
|
||||
sku,
|
||||
itemimageurl,
|
||||
productid,
|
||||
tagnames,
|
||||
}) {
|
||||
let img = itemimageurl
|
||||
? imgServerNameBuild(itemimageurl)
|
||||
: "./dist/assets/imgs/nophoto.png";
|
||||
let tags = itemname.split("-");
|
||||
let ramTech = tags[tags.length - 2];
|
||||
let tag_name = tagnames.split("|");
|
||||
|
||||
});
|
||||
let gb = tags[tags.length - 1];
|
||||
const [currencySymbol, amount] = getCurrencySymbol(pricelist);
|
||||
let priceAmt = `${currencySymbol} ${amount}`;
|
||||
|
||||
let detailPageName;
|
||||
let addSearch = "";
|
||||
if (window.location.href.includes("laptops")) {
|
||||
detailPageName = "laptopdetails";
|
||||
let name = itemname.toLowerCase().includes("zeno") ? "Zeno" : "Fyro";
|
||||
addSearch = `?${name}`;
|
||||
} else {
|
||||
detailPageName = "productdetails";
|
||||
}
|
||||
|
||||
async function getRamData(ids){
|
||||
let resData;
|
||||
let res
|
||||
let data = [];
|
||||
let windowSearch = window.location.href;
|
||||
for(let i=0;i<ids.length;i++){
|
||||
let id = ids[i].productid;
|
||||
if (windowSearch.includes('laptops')||windowSearch.includes('allinones')) {
|
||||
resData = await API_SERVICES_ACTIONS.getAPIService(`apis/v4/Bizgaze/integrations/products/getitemwithoutbranch/productid/${id}`, true);
|
||||
}
|
||||
else {
|
||||
resData = await API_SERVICES_ACTIONS.getAPIService(`apis/v4/bizgaze/integrations/products/itemtagscombination/productid/${id}`, true);
|
||||
}
|
||||
if(resData.isError){
|
||||
alert(resData.errorMsg.message);
|
||||
return;
|
||||
}
|
||||
|
||||
res = resData.response;
|
||||
|
||||
res = JSON.parse(res.result);
|
||||
data = [...data,...res];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
let color_name = tag_name[tag_name.length - 1].trim();
|
||||
let processor_name1 = tagnames.includes("i7");
|
||||
let processor_name2 = tagnames.includes("i5");
|
||||
let processor_name3 = tagnames.includes("i3");
|
||||
let dul_core = itemname.includes("Zeno Dualbook");
|
||||
|
||||
console.log(data);
|
||||
let html = '';
|
||||
|
||||
for(let i=0;i<data.length;i++){
|
||||
console.log(data[i].tagids);
|
||||
let tags_id = data[i].tagids;
|
||||
let tags_filter = tags_id.includes("106631360000087");
|
||||
let tags_filter_2 = tags_id.includes("106631360000088");
|
||||
let tags_filter_3 = tags_id.includes("106631360000089");
|
||||
|
||||
if(tags_filter == false && tags_filter_2 == false && tags_filter_3 == false){
|
||||
if(data[i].itemname.includes('AIO Fyro - 32')) continue;
|
||||
html += getRamCardHTML(data[i]);
|
||||
}
|
||||
else{
|
||||
let data_name = tags_id.includes("106631360000087");
|
||||
let name_id = data[i].tagids.includes("106631360000087");
|
||||
if(data_name === true && name_id === true){
|
||||
for(let j=0;j<data.length;j++){
|
||||
if(j==0){
|
||||
if(data[j].itemname.includes('AIO Fyro - 32')) continue;
|
||||
html += getRamCardHTML(data[i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
$('.product_card_section').html(html);
|
||||
if(window.location.href.includes("?Zeno")){
|
||||
$('.product_card_section div.ram_card:nth-child(1)').addClass("d-none");
|
||||
$('.product_card_section div.ram_card:nth-child(6)').addClass("d-none");
|
||||
}
|
||||
if(window.location.href.includes("?FYRO")){
|
||||
$('.product_card_section div.ram_card:nth-child(3)').addClass("d-none");
|
||||
$('.product_card_section div.ram_card:nth-child(7)').addClass("d-none");
|
||||
$('.product_card_section div.ram_card:nth-child(8)').addClass("d-none");
|
||||
}
|
||||
// $('.ramcard').click(function(e){
|
||||
|
||||
// let sku = $(e.target).data('itemid');
|
||||
// let itemid = $(e.target).data('itemid');
|
||||
|
||||
// window.location.href = `/productdetails.html?productId=${RAM_ID}#itemid=${itemid}`
|
||||
|
||||
// })
|
||||
let processor;
|
||||
if (processor_name1 === true) {
|
||||
if (dul_core === true) {
|
||||
processor = `i7`;
|
||||
} else {
|
||||
processor = `i5 / i7`;
|
||||
}
|
||||
} else if (processor_name2 === true) {
|
||||
if (dul_core === true) {
|
||||
processor = `i7`;
|
||||
} else {
|
||||
processor = `i5 / i7`;
|
||||
}
|
||||
} else if (processor_name3 === true) {
|
||||
processor = `i3`;
|
||||
} else if (itemname.includes("I7") || itemname.includes("i7")) {
|
||||
let fyro_data_2 = itemname.includes("RTX 4060");
|
||||
if (fyro_data_2 === true) {
|
||||
processor = `i5 / i7 / i9`;
|
||||
} else {
|
||||
processor = `i5 / i7`;
|
||||
}
|
||||
} else if (itemname.includes("I9") || itemname.includes("i9")) {
|
||||
let fyro_data_1 = itemname.includes("RTX 4050");
|
||||
let fyro_data_2 = itemname.includes("RTX 4060");
|
||||
if (fyro_data_1 === true || fyro_data_2 === true) {
|
||||
processor = `i5 / i7 / i9`;
|
||||
} else {
|
||||
processor = `i9`;
|
||||
}
|
||||
} else if (itemname.includes("I5") || itemname.includes("i5")) {
|
||||
let fyro_data = itemname.includes("RTX 4060");
|
||||
if (fyro_data === true) {
|
||||
processor = `i5 / i7 / i9`;
|
||||
} else {
|
||||
processor = `i5 / i7 / i9`;
|
||||
}
|
||||
}
|
||||
|
||||
function getRamCardHTML({itemname,pricelist,itemid,sku,itemimageurl,productid,tagnames}){
|
||||
let img = itemimageurl ? imgServerNameBuild(itemimageurl) : './dist/assets/imgs/nophoto.png'
|
||||
let tags = itemname.split('-');
|
||||
let ramTech = tags[tags.length-2];
|
||||
let tag_name = tagnames.split('|');
|
||||
|
||||
let gb = tags[tags.length-1];
|
||||
const [currencySymbol,amount] = getCurrencySymbol(pricelist);
|
||||
let priceAmt = `${currencySymbol} ${amount}`;
|
||||
|
||||
let detailPageName;
|
||||
let addSearch = '';
|
||||
if (window.location.href.includes('laptops')) {
|
||||
detailPageName = 'laptopdetails';
|
||||
let name = itemname.toLowerCase().includes('zeno') ? 'Zeno' : 'Fyro';
|
||||
addSearch = `?${name}`;
|
||||
} else {
|
||||
detailPageName = 'productdetails';
|
||||
|
||||
};
|
||||
|
||||
let color_name = tag_name[tag_name.length-1].trim();
|
||||
let processor_name1 = tagnames.includes("i7");
|
||||
let processor_name2 = tagnames.includes("i5");
|
||||
let processor_name3 = tagnames.includes("i3");
|
||||
let dul_core = itemname.includes("Zeno Dualbook");
|
||||
|
||||
|
||||
let processor;
|
||||
if( processor_name1 === true){
|
||||
if(dul_core === true){
|
||||
processor = `i7`
|
||||
}else{
|
||||
processor = `i5 / i7`
|
||||
}
|
||||
|
||||
}else if( processor_name2 === true){
|
||||
if(dul_core === true){
|
||||
processor = `i7`
|
||||
}else{
|
||||
processor = `i5 / i7`
|
||||
}
|
||||
}else if( processor_name3 === true){
|
||||
processor = `i3`
|
||||
}
|
||||
else if(itemname.includes("I7") || itemname.includes("i7")){
|
||||
let fyro_data_2 = itemname.includes("RTX 4060");
|
||||
if(fyro_data_2 === true){
|
||||
processor = `i5 / i7 / i9`
|
||||
}else{
|
||||
processor = `i5 / i7`
|
||||
}
|
||||
|
||||
}else if(itemname.includes("I9") || itemname.includes("i9")){
|
||||
let fyro_data_1 = itemname.includes("RTX 4050");
|
||||
let fyro_data_2 = itemname.includes("RTX 4060");
|
||||
if(fyro_data_1 === true || fyro_data_2 === true){
|
||||
processor = `i5 / i7 / i9`
|
||||
}else{
|
||||
processor = `i9`
|
||||
}
|
||||
|
||||
}else if(itemname.includes("I5") || itemname.includes("i5")){
|
||||
let fyro_data = itemname.includes("RTX 4060");
|
||||
if(fyro_data === true){
|
||||
processor = `i5 / i7 / i9`
|
||||
}
|
||||
else{
|
||||
processor = `i5 / i7 / i9`
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
let item_color_1;
|
||||
let item_color_2;
|
||||
let item_color_3;
|
||||
let item_color_4;
|
||||
if(color_name == "Eucalyptus Green" || color_name == "Desert Brown"){
|
||||
item_color_1 = `#5e7975`;
|
||||
item_color_2 = `#624839`;
|
||||
item_color_3 = `#253746`;
|
||||
}else if( color_name == "Deep Sea Blue"){
|
||||
item_color_1 = `#5e7975`;
|
||||
item_color_2 = `#624839`;
|
||||
item_color_3 = `#253746`;
|
||||
}
|
||||
else{
|
||||
if(color_name.length <=14){
|
||||
item_color_4 = ``;
|
||||
}else{
|
||||
item_color_4 = `#0d0a08`;
|
||||
}
|
||||
}
|
||||
debugger;
|
||||
return `<div class="col-lg-4 col-md-6 mb-4 col-md-6 ram_card cursor-pointer">
|
||||
<div class="card border bg-gray-3 rounded-3 p-1 h-100">
|
||||
let item_color_1;
|
||||
let item_color_2;
|
||||
let item_color_3;
|
||||
let item_color_4;
|
||||
if (color_name == "Eucalyptus Green" || color_name == "Desert Brown") {
|
||||
item_color_1 = `#5e7975`;
|
||||
item_color_2 = `#624839`;
|
||||
item_color_3 = `#253746`;
|
||||
} else if (color_name == "Deep Sea Blue") {
|
||||
item_color_1 = `#5e7975`;
|
||||
item_color_2 = `#624839`;
|
||||
item_color_3 = `#253746`;
|
||||
} else {
|
||||
if (color_name.length <= 14) {
|
||||
item_color_4 = ``;
|
||||
} else {
|
||||
item_color_4 = `#0d0a08`;
|
||||
}
|
||||
}
|
||||
debugger;
|
||||
return `<div class="col-lg-4 col-md-6 mb-4 col-md-6 ram_card cursor-pointer">
|
||||
<div class="card border bg-white rounded-3 p-1 h-100">
|
||||
|
||||
<a href="/${detailPageName}.html${addSearch}#productId=${productid}#itemid=${itemid}" class="">
|
||||
<img src="${img}" alt="${itemname}" class="p-5" style="width:350px;height:300px"></a>
|
||||
@@ -299,12 +307,30 @@ function ramProductsInit(){
|
||||
</div>
|
||||
<hr>
|
||||
<ul class="border-0 mb-0 d-flex h-100 justify-content-between px-md-3 px-4 list-group-flush p-0 text-secondary" style="list-style: none;">
|
||||
<li class="processor_name"><img src="../dist/assets/imgs/processor.svg" class="w-20p pe-1"/><span class="pt-1">${processor?processor:""}</span></li>
|
||||
<li class="processor_name"><img src="../dist/assets/imgs/processor.svg" class="w-20p pe-1"/><span class="pt-1">${
|
||||
processor ? processor : ""
|
||||
}</span></li>
|
||||
<li class="d-flex justify-content-between">
|
||||
<p item_color=${item_color_1} class="colors mb-0 me-1" ${item_color_1?`style="width:18px;height:18px;border-radius:0%;background-color:${item_color_1}"`:''}></p>
|
||||
<p item_color=${item_color_2} class="mb-0 me-1" ${item_color_2?`style="width:18px;height:18px;border-radius:0%;background-color:${item_color_2}"`:''}></p>
|
||||
<p item_color=${item_color_3} class="mb-0" ${item_color_3?`style="width:18px;height:18px;border-radius:0%;background-color:${item_color_3}"`:''}></p>
|
||||
<p item_color=${item_color_4} class="mb-0" ${item_color_4?`style="width:18px;height:18px;border-radius:0%;background-color:${item_color_4}"`:''}></p>
|
||||
<p item_color=${item_color_1} class="colors mb-0 me-1" ${
|
||||
item_color_1
|
||||
? `style="width:18px;height:18px;border-radius:0%;background-color:${item_color_1}"`
|
||||
: ""
|
||||
}></p>
|
||||
<p item_color=${item_color_2} class="mb-0 me-1" ${
|
||||
item_color_2
|
||||
? `style="width:18px;height:18px;border-radius:0%;background-color:${item_color_2}"`
|
||||
: ""
|
||||
}></p>
|
||||
<p item_color=${item_color_3} class="mb-0" ${
|
||||
item_color_3
|
||||
? `style="width:18px;height:18px;border-radius:0%;background-color:${item_color_3}"`
|
||||
: ""
|
||||
}></p>
|
||||
<p item_color=${item_color_4} class="mb-0" ${
|
||||
item_color_4
|
||||
? `style="width:18px;height:18px;border-radius:0%;background-color:${item_color_4}"`
|
||||
: ""
|
||||
}></p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="border-0 d-flex h-100 justify-content-between px-md-3 px-4 list-group-flush p-0 text-secondary" style="list-style: none;">
|
||||
@@ -315,7 +341,9 @@ function ramProductsInit(){
|
||||
</span>
|
||||
</li>
|
||||
<li class="border-0 py-0">
|
||||
<span class="satoshi_font"><h6>${pricelist?priceAmt:'Coming Soon'}</h6></span>
|
||||
<span class="satoshi_font"><h6>${
|
||||
pricelist ? priceAmt : "Coming Soon"
|
||||
}</h6></span>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="card-body text-center">
|
||||
@@ -325,11 +353,9 @@ function ramProductsInit(){
|
||||
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
|
||||
|
||||
return `<div class="col-lg-4 col-md-6 mb-4 col-md-6 ram_card cursor-pointer">
|
||||
<div class="card border bg-gray-3 rounded-3 p-1 h-100">
|
||||
|
||||
return `<div class="col-lg-4 col-md-6 mb-4 col-md-6 ram_card cursor-pointer">
|
||||
<div class="card border bg-white rounded-3 p-1 h-100">
|
||||
|
||||
<a href="/productdetails.html?productId=${RAM_ID}#itemid=${itemid}" class=""><img src="${img}" alt="${itemname}" class="w-100 h-100"></a>
|
||||
<div class="card-body">
|
||||
@@ -353,8 +379,8 @@ function ramProductsInit(){
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
//abhi anna design
|
||||
return `
|
||||
//abhi anna design
|
||||
return `
|
||||
|
||||
<!--desktop--->
|
||||
<div class="col-sm-4 p-3">
|
||||
@@ -375,7 +401,7 @@ function ramProductsInit(){
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
return `<div class="col-lg-3 col-md-6 ram_card">
|
||||
return `<div class="col-lg-3 col-md-6 ram_card">
|
||||
<div class="card shadow border-0 p-1 h-100">
|
||||
<a href="#">
|
||||
<img src="../dist/assets/imgs/Navbar/ora_ddr5_laptop.png" class="card-img-top" alt="...">
|
||||
@@ -410,10 +436,10 @@ function ramProductsInit(){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`
|
||||
}
|
||||
</div>`;
|
||||
}
|
||||
|
||||
init();
|
||||
init();
|
||||
}
|
||||
|
||||
ramProductsInit();
|
||||
ramProductsInit();
|
||||
|
||||
Reference in New Issue
Block a user