Gentleman Powermatic 80 | T127.407.11.051.00 (2024)

Gentleman Powermatic 80 | T127.407.11.051.00 (1)

")}, ajaxLoadProduct: function(){var t=0; o.click(function(n){n.preventDefault(), e(this).text("Loading123 ..."), e.ajax({url: "ajax/category-ajax-products.html", success: function(n){var i=e(n); setTimeout(function(){i.appendTo(".product-ajax-grid"), o.text("Load More"), ++t >=2 && o.hide()}, 350)}, failure: function(){o.text("Sorry something went wrong.")}})})}, toggleFilter: function(){e(".filter-toggle a").click(function(t){t.preventDefault(), e(".filter-toggle").toggleClass("opened"), e("main").toggleClass("sidebar-opened")}), e(".sidebar-overlay").click(function(t){e(".filter-toggle").removeClass("opened"), e("main").removeClass("sidebar-opened")}), e(".sort-menu-trigger").click(function(t){t.preventDefault(), e(".select-custom").removeClass("opened"), e(t.target).closest(".select-custom").toggleClass("opened")})}, toggleSidebar: function(){e(".sidebar-toggle").click(function(){e("main").toggleClass("sidebar-opened")})}, scrollToElement: function(){e('.scrolling-box a[href^="#"]').on("click", function(t){var o=e(this.getAttribute("href")); o.length && (t.preventDefault(), e("html, body").stop().animate({scrollTop: o.offset().top - 100}, 700))})}, loginPopup: function(){e(".login-link").click(function(o){o.preventDefault(), t.ajaxLoading(); setTimeout(function(){e.magnificPopup.open({type: "ajax", mainClass: "login-popup", tLoading: "", preloader: !1, removalDelay: 350, items:{src: "ajax/login-popup.html"}, callbacks:{beforeClose: function(){e(".ajaxOverlay").remove()}}, ajax:{tError: ""}})}, 1500)})}, windowClick: function(){e(document).click(function(t){e(t.target).closest(".toolbox-item.select-custom").length || e(".select-custom").removeClass("opened")})}}, o=e(".loadmore .btn"); jQuery(document).ready(function(){t.init()}), e(window).on("load", function(){t.scrollBtnAppear()}), e(window).on("scroll", function(){t.scrollBtnAppear()})}(jQuery);`) .appendTo('.product-details-page-container'); }); } loaded = true; }; function range(start, end, step) { var len = Math.floor((end - start) / step) + 1; return Array(len).fill().map(function(a, idx){ return ({key: start + (idx * step), value: (start + (idx * step)) * 10});}); } function changeImgSrc() { setTimeout(()=>{ $('.sample-img').addClass('d-none') $('.single-img').removeClass('d-none') $('.zoomContainer').attr('display','block'); $('.product-single-carousel').css('display','block'); },1700) } var app = angular.module("editorApp", []).run(function ($rootScope) { $rootScope.apiBasepath = window.apiBasePath; $rootScope.storeNameSlug = window.storeNameSlug; $rootScope.storeId = window.storeId; $rootScope.websiteName = window.websiteName; $rootScope.selectedLanguage = window.selectedLanguage; localStorage.setItem('selectedLanguage', $rootScope.selectedLanguage) $rootScope.corsHeaders = { 'Access-Control-Allow-Credentials': true, 'Access-Control-Allow-Origin': true, 'Access-Control-Allow-Headers': true, 'Access-Control-Expose-Headers': true }; if(production && (!localStorage.getItem('inEditor') || localStorage.getItem('inEditor') == 'false')){ $('.show-on-editor').addClass('d-none'); $('.product-details-page-container').removeClass('d-none'); $('.product-details-page-container').removeClass('hide'); } websiteName = $rootScope.websiteName; shopId = $rootScope.storeId; var testingDomains = [ "localhost", "127.0.0.1", "www.goedenoot.nl", "goedenoot.nl", "prismanote.it", "www.prismanote.it", "sterjuwelier.nl", "www.sterjuwelier.nl", $rootScope.apiBasepath ]; $rootScope.awsUrl = "https://prismanote.s3.amazonaws.com/"; }); app.factory('interceptor', function ($q){ return { request: function (config) { config = angular.copy(config) if(config.method === 'POST' || config.method === 'PUT') { var encrypted = CryptoJS.AES.encrypt(JSON.stringify(config.data), '2e35f242a46d67eeb74aabc37d5e5d05').toString() config.data = { encrypted: encrypted } } return config || $q.when(config) }, requestError: function (rejection) { return $q.reject(rejection) }, response: function (response) { return response }, responseError: function (rejection) { return rejection } } }) app.config(function($interpolateProvider, $httpProvider) { $interpolateProvider.startSymbol('{[{'); $interpolateProvider.endSymbol('}]}'); $httpProvider.interceptors.push('interceptor') }); app.controller("productController", function ($scope, $rootScope, $http, $q, $sce) {$scope.product = [];$scope.featuredProducts = [];$currentUrl = getUrlVars();$scope.nameSlug = $currentUrl['name'] ? $currentUrl['name'] : '';$scope.multiShopId = $currentUrl['msId'] ? $currentUrl['msId'] : '';$scope.retailerCompanyId = $currentUrl['ccId'] ? $currentUrl['ccId'] : '';$scope.dropShipperCompanyId = $currentUrl['scId'] ? $currentUrl['scId'] : $scope.retailerCompanyId;$scope.b2bProdectDetail = $currentUrl['ccId'] ? true : false;const token = localStorage.getItem('customer');$scope.validUserForAddReview = token && token !== "" ? true : false;$scope.rating = 0;$scope.reviewDescription = "";$scope.reviews = [];$scope.loading = true;$scope.ajaxLoadProduct = false;$scope.productId = "";$scope.productExistInCart = 0;$scope.quantity = 1;$scope.localTest = localStorage.getItem('Test22');const productExistCart = { en: 'Product already exists in your shopping cart.', nl: 'Product bestaat al in uw winkelwagen.', de: 'Das Produkt befindet sich bereits in Ihrem Warenkorb.', fr: 'Le produit existe déjà dans votre panier.', es: 'El producto ya existe en su carrito de compras.' };if ($scope.nameSlug === '') { var list =new URL(window.location.href).pathname; var data = list.split('/'); if(data.length > 2 && data.includes("details")){ $scope.nameSlug = data[data.length -1]; }else if(!localStorage.getItem('inEditor') || localStorage.getItem('inEditor') == 'false'){ window.location.href = '404'; }}$scope.variantProducts = [];$scope.variantCollection = [];$scope.variantBase = [];$scope.variantIndex = 0;$scope.specifications = {};$scope.multiShopProductDetails = [];$scope.showMultiShopList = false;$scope.showCartOnShopSelect = false;$scope.selectedShopId = $rootScope.storeId;$scope.selectedShop = {};$scope.userDetails = { firstName: '', lastName: '', email: '', language: '', shopId: '', phoneNumber: '', description: '', productName: '', status: 'reserve-product' }; $scope.dateTime = ""; $scope.showTranslation = {}; $scope.getJewelRingSize = [ { key : 11.75, value: 37}, { key : 12.00, value: 38}, { key : 12.25, value: 38.5}, { key : 12.50, value: 39}, { key : 12.75, value: 40}, { key : 13.00, value: 41}, { key : 13.25, value: 42}, { key : 13.50, value: 42.5}, { key : 13.75, value: 43}, { key : 14.00, value: 44}, { key : 14.25, value: 45}, { key : 14.50, value: 46}, { key : 14.75, value: 46.5}, { key : 15.00, value: 47}, { key : 15.25, value: 48}, { key : 15.50, value: 49}, { key : 15.75, value: 49.5}, { key : 16.00, value: 50}, { key : 16.25, value: 51}, { key : 16.50, value: 52}, { key : 16.75, value: 52.5}, { key : 17.00, value: 53}, { key : 17.25, value: 54}, { key : 17.50, value: 55}, { key : 17.75, value: 56}, { key : 18.00, value: 57}, { key : 18.25, value: 57.5}, { key : 18.50, value: 58}, { key : 18.75, value: 58.5}, { key : 19.00, value: 59}, { key : 19.25, value: 60}, { key : 19.50, value: 61}, { key : 19.75, value: 62}, { key : 20.00, value: 63}, { key : 20.25, value: 64}, { key : 20.50, value: 65}, { key : 20.75, value: 65.5}, { key : 21.00, value: 66}, { key : 21.25, value: 67}, { key : 21.50, value: 67.5}, { key : 21.75, value: 68}, { key : 22.00, value: 69}, { key : 22.25, value: 70}, { key : 22.50, value: 71}, { key : 22.75, value: 71.5}, { key : 23.00, value: 72}, { key : 23.25, value: 73}, { key : 23.50, value: 74}, { key : 23.75, value: 74.5}, { key : 24.00, value: 75}, { key : 24.25, value: 76}, { key : 24.50, value: 77}, { key : 24.75, value: 78}, { key : 25.00, value: 78.5}, { key : 25.25, value: 79}, { key : 25.50, value: 80}, { key : 25.75, value: 81}, { key : 26.00, value: 82}, { key : 26.25, value: 83}, { key : 26.50, value: 83.5}, { key : 26.75, value: 84}, { key : 27.00, value: 85}, { key : 27.25, value: 85.5}, { key : 27.50, value: 86}, { key : 27.75, value: 87}, { key : 28.00, value: 88}, { key : 28.25, value: 89}, { key : 28.50, value: 89.5}, { key : 28.75, value: 90}, { key : 29.00, value: 91}, { key : 29.25, value: 92}, { key : 29.50, value: 93}, { key : 29.75, value: 93.5}, { key : 30.00, value: 94}, { key : 30.25, value: 95}, { key : 30.50, value: 96} ]; $scope.braceletSizeList = range(8, 31, 0.5); $scope.necklaceSizeList = range(35, 135, 1); $scope.productSize = 0; $scope.showSizeBox = false; $scope.sizeBoxFor = { watch : [ "TITANIUM", "STAINLESS_STEEL", "ALUMINIUM", "METAL", "PALLADIUM", "REAL_GOLD", "GOLD", "CERAMICS", "PLATINUM", "Bronze", "WOOD" ], jewel : { type: [ "RING", "SEAL_RING", "COMBINATION_RING", "RING_WITH_PEARL", "RING_WITH_GEM", ], material: [ "GOLD", "SILVER" ] } }; var myVar = setInterval(function(){ if(window.Parameters.currentLanguage.toLowerCase() == localStorage.getItem("websiteLanguage") && localStorage.getItem("allTranslations")){ clearInterval(myVar); $scope.showTranslation = JSON.parse(localStorage.getItem("allTranslations")); } }, 500); if(window.Parameters.currentLanguage.toLowerCase() == localStorage.getItem("websiteLanguage") && localStorage.getItem("allTranslations")){ clearInterval(myVar); $scope.showTranslation = JSON.parse(localStorage.getItem("allTranslations")); }// First we will fetch productId using nameSlug and from that productId we will fetch more details of product$http({method: "GET",url: $rootScope.apiBasepath + "/api/product-id-from-nameslug/" + $scope.nameSlug, headers : $rootScope.corsHeaders}).then(function (response) {if (response && response.data && response.data.result && response.data.result.productId && response.data.result.productId !== "") {$scope.productId = response.data.result.productId;$scope.fetchProductByProductId(response.data.result.productId);if($scope.shopDetails && (($scope.shopDetails.multiShops && $scope.shopDetails.multiShops.length > 0) || ($scope.shopDetails.dropShippers && $scope.shopDetails.dropShippers.length > 0))){ $scope.fetchMultiShopDetails($scope.productId);}$scope.getFeaturedProducts();$scope.getShopDetails();} else if(!localStorage.getItem('inEditor') || localStorage.getItem('inEditor') == 'false'){hulla.send('Product not found', 'danger');setTimeout(() => {window.location.href = '404';}, 2000);}}).catch(function (err) { if(!localStorage.getItem('inEditor') || localStorage.getItem('inEditor') == 'false'){ window.location.href = '404'; }// hulla.send('Internal server error', 'danger');}); const fetchCartReqData = { method: "GET", url: $rootScope.apiBasepath + "/api/customer/cart/" + $rootScope.storeId, headers : $rootScope.corsHeaders, params : {sessionId : localStorage.getItem('SessionId')} }; if (token && token !== "") { fetchCartReqData['headers'] = Object.assign($rootScope.corsHeaders, {"x-authorization": token ? token : ''}); } $http(fetchCartReqData) .then(function (response) { $scope.cartItems = response.data.result.cart; $scope.totalCartItems = 0; $scope.cartItems.forEach(function(product) { $scope.totalCartItems += product.quantity ; }); $('.prismaStoreCart .cartItemsCount').text($scope.totalCartItems); }) $scope.checkForGetProductSize = function (product) { if($scope.shopDetails && ((product.product.category == "JEWEL" && $scope.shopDetails.askFingerSize) || (product.product.category == "WATCH" && $scope.shopDetails.askWristSize))){ if(product.product.category == "JEWEL" && product.product.jewel && product.product.jewel.material && product.product.jewel.type){ $scope.showSizeBox = $scope.sizeBoxFor.jewel.material.indexOf(product.product.jewel.material) > -1 && $scope.sizeBoxFor.jewel.type.indexOf(product.product.jewel.type) > -1 ? true : false; } if(product.product.category == "WATCH" && product.product.watch && product.product.watch.strap && product.product.watch.strap.material){ $scope.showSizeBox = $scope.sizeBoxFor.watch.indexOf(product.product.watch.strap.material) > -1 ? true : false; }} }// Fetch product specifications start$scope.fetchSpecifications = function (product) {$scope.specifications = {name: product.product.nl.name, retailerProductNumber: product.shopProduct.articleNumber,ean: product.product.variants[0].ean,productNumberSupplier: product.product.variants[0].productNumber,category: product.product.category,articleGroup: '',brandName: (product.brand && product.brand.name) ? product.brand.name : ((product.product.brand && product.product.brand.name) ? product.product.brand.name : ''),weight: product.product.weight && product.product.weight > 0 ? product.product.weight : 0,diamonds: product.product.totalCaratWeight && product.product.totalCaratWeight > 0 ? product.product.totalCaratWeight : 0,brandAlias: product.brand && product.brand.alias && product.brand.alias !== "" ? product.brand.alias : '',diamond: product.product.diamonds ? product.product.diamonds : ''};// For article group startif (product.collections && product.collections && product.collections.privateLabelCollections && product.collections.privateLabelCollections.length === 1) {$scope.specifications['articleGroup'] = product.collections.privateLabelCollections[0].nl.name;} else if (product.collections && product.collections && product.collections.privateLabelCollections && product.collections.privateLabelCollections.length > 1) {for(let i = 0; i < product.collections.privateLabelCollections.length; i++) {if (product.collections.privateLabelCollections[i].uploader.shopId === $rootScope.storeId) {$scope.specifications['articleGroup'] = product.collections.privateLabelCollections[i].nl.name;break;}}}// For article group end// For gender startif (product.product.male === true && product.product.female === false && product.product.kids === false) {$scope.specifications['gender'] = 'Gents'} else if (product.product.male === false && product.product.female === true && product.product.kids === false) {$scope.specifications['gender'] = 'Ladies'} else if (product.product.male === true && product.product.female === true && product.product.kids === false) {$scope.specifications['gender'] = 'Unisex'} else if (product.product.male === true && product.product.female === false && product.product.kids === true) {$scope.specifications['gender'] = 'Boys'} else if (product.product.male === false && product.product.female === true && product.product.kids === true) {$scope.specifications['gender'] = 'Girls'} else if (product.product.male === true && product.product.female === true && product.product.kids === true) {$scope.specifications['gender'] = 'Kids'}// For gender end// Extra properties for category watch startif ($scope.specifications.category === "WATCH" && product.product.watch && Object.keys(product.product.watch).length > 0) {$scope.specifications['watchDetails'] = {antiAllergy: product.product.watch.isAntiAllergy ? true : false,date: product.product.watch.hasDateFunction ? true : false,caseSize: product.product.watch.case && product.product.watch.case.size ? product.product.watch.case.size : 0,strapColor: product.product.watch.strap && product.product.watch.strap.color ? product.product.watch.strap.color : '',indication: product.product.watch.indication ? product.product.watch.indication : '',//index: product.product.watch.dial.index ? product.product.watch.dial.index : '',//dialColor: product.product.watch.dial.color ? product.product.watch.dial.color : '',caseColor: product.product.watch.case && product.product.watch.case.color ? product.product.watch.case.color : '',waterproofLevel: product.product.watch.waterproofLevel ? product.product.watch.waterproofLevel : '',designItem: product.product.watch.case && product.product.watch.case.designItem ? product.product.watch.case.designItem : '',isNickelFree: product.product.watch.isNickelFree ? product.product.watch.isNickelFree : '',model: product.product.watch.strap && product.product.watch.strap.model ? product.product.watch.strap.model : '',strapmaterial: product.product.watch.strap && product.product.watch.strap.material ? product.product.watch.strap.material : '',studs: product.product.watch.strap && product.product.watch.strap.studs ? product.product.watch.strap.studs : ''}}// Extra properties for category watch end// Extra properties for category strap startif ($scope.specifications.category === "STRAP" && product.product.strap && Object.keys(product.product.strap).length > 0) {$scope.specifications['strapDetails'] = {color: product.product.strap.color ? product.product.strap.color : '',strapmaterial: product.product.strap.material ? product.product.strap.material : '',model: product.product.strap.model ? product.product.strap.model : '',studs: product.product.strap.studs ? product.product.strap.studs : ''}}// Extra properties for category strap end// Extra properties for category Jewel startif($scope.specifications.category === "JEWEL" && product.product.jewel) {$scope.specifications['jewelDetails'] = {material: product.product.jewel.material ? product.product.jewel.material : '',gloss: product.product.jewel.gloss ? product.product.jewel.gloss : '',color: product.product.jewel.color ? product.product.jewel.color : '',height: product.product.jewel.height ? product.product.jewel.height : '',width: product.product.jewel.width ? product.product.jewel.width : '',depth: product.product.jewel.depth ? product.product.jewel.depth : '',diameter: product.product.jewel.diameter ? product.product.jewel.diameter : '',weight: product.product.jewel.weight ? product.product.jewel.weight : '',size: product.product.variants[0].size ? product.product.variants[0].size: '',type: product.product.jewel.type ? product.product.jewel.type : ''}}// Extra properties for category Jewel end};// Fetch product specifications end // Fetch multi shop and drop shippers details $scope.fetchMultiShopDetails = function (id) { var urlParamList = { multishop : [], dropshipper : [] } // urlParamList.multishop = $scope.shopDetails.multiShops ? $scope.shopDetails.multiShops : []; if($scope.shopDetails.multiShops && $scope.shopDetails.multiShops.length > 0){ for(let i = 0; i < $scope.shopDetails.multiShops.length; i++){ if($scope.shopDetails.multiShops[i] && $scope.shopDetails.multiShops[i]._id){ urlParamList.multishop.push({ _id : $scope.shopDetails.multiShops[i]._id }); } if($scope.multiShopId != ''){ urlParamList.multishop.push({ _id : $scope.multiShopId }); } } } if($scope.shopDetails.dropShippers && $scope.shopDetails.dropShippers.length > 0){ for(let i = 0; i < $scope.shopDetails.dropShippers.length; i++){ if($scope.shopDetails.dropShippers[i] && $scope.shopDetails.dropShippers[i].brandId && $scope.shopDetails.dropShippers[i].companyId){ urlParamList.dropshipper.push({ brandId : $scope.shopDetails.dropShippers[i].brandId, companyId : $scope.shopDetails.dropShippers[i].companyId }); } } } var urlParam = $rootScope.apiBasepath + "/api/v2/shop/multi-shop-product/" + id + "/" + $rootScope.storeId + "?paramList=" + JSON.stringify(urlParamList);$http({method: "GET",url: urlParam, headers : $rootScope.corsHeaders}).then(function (response) {if (response.status === 204) {hulla.send('Product not found', 'danger');setTimeout(() => {window.location.href = '404';}, 2000);} else { if (response && response.data){ loadDatePicker(); if(typeof(moment) != 'undefined'){ // $scope.dateTime = moment(new Date()).add('5', 'minutes').format('DD-MM-YYYY HH:mm'); } $scope.multiShopProductDetails = response.data; if($scope.product && $scope.product._id && ($scope.multiShopId == '' || ($scope.multiShopId != '' && $scope.multiShopId != $scope.shopDetails._id))){ var productData = { shopDetails : { id: $scope.shopDetails._id, name: $scope.shopDetails.name, nameSlug: $scope.shopDetails.nameSlug, address: $scope.shopDetails.address } }; productData = Object.assign(productData, $scope.product) var shop = $scope.multiShopProductDetails.some(s1 => s1.shopDetails && s1.shopDetails.id == $rootScope.storeId); if(!shop){ $scope.multiShopProductDetails.unshift(productData); } } // $scope.multiShopProductDetails.forEach(function(shop) { // if(shop.shopDetails && shop.shopProduct.hasStock && shop.shopProduct.stock > shop.shopProduct.reservedQuantity){ // $scope.showCartOnShopSelect = false; // // $scope.selectedShopId = shop.shopDetails.id; // } // }); }}}).catch(function (err) { $scope.loading = false;// hulla.send('Internal server error', 'danger');}); };// This is API for fetch product details$scope.fetchProductByProductId = function (id) { var urlParam = $rootScope.apiBasepath + "/api/shop/own-shop-product-by-shopId/" + id + "/"; if($scope.multiShopId != ''){ urlParam += $scope.multiShopId; } else { urlParam += $rootScope.storeId; } if($scope.dropShipperCompanyId != ''){ urlParam = $rootScope.apiBasepath + "/api/shop/own-shop-product-by-drop-shipper/" + id + "/" + $scope.dropShipperCompanyId; urlParam += $scope.retailerCompanyId != '' ? '?isFrom="retailer"&sessionId=' + localStorage.getItem('SessionId') : '' } // var urlParam = $rootScope.apiBasepath + "/api/shop/own-shop-product-by-shopId/" + id + "/" + $rootScope.storeId;$http({method: "GET",url: urlParam, headers : $rootScope.corsHeaders}).then(function (response) { debugger;if (response.status === 204 || typeof(response.data.shopProduct) == 'undefined') { // debugger; // console.log("Here3");hulla.send('Product not found', 'danger');setTimeout(() => {window.location.href = '404';}, 1000);} else { $rootScope.selectedLanguage = localStorage.getItem('selectedLanguage') ? localStorage.getItem('selectedLanguage') : 'nl'; var languageList = ['de','en','es','nl','fr']; $rootScope.selectedLanguage = languageList.includes($rootScope.selectedLanguage.toLowerCase()) ? $rootScope.selectedLanguage.toLowerCase() : 'nl';setTimeout(() => {loadMainJs();loadTranslations();loadDatePicker();}, 2000); $scope.loading = false; if($scope.cartItems && $scope.cartItems.length > 0){ var cart = $scope.cartItems.filter(c => c.product == id); $scope.productExistInCart = cart.length > 0 ? cart[0].quantity : 0; } $scope.product = response.data;$scope.fetchSpecifications($scope.product);// Fetch review for this product$scope.fetchReviews($scope.product._id);if($scope.shopDetails && $scope.shopDetails._id){ var productData = { shopDetails : { id: $scope.shopDetails._id, name: $scope.shopDetails.name, nameSlug: $scope.shopDetails.nameSlug, address: $scope.shopDetails.address } }; productData = Object.assign(productData, $scope.product); var shop = $scope.multiShopProductDetails.some(s1 => s1.shopDetails && s1.shopDetails.id == $rootScope.storeId); if(!shop){ $scope.multiShopProductDetails.unshift(productData); } $scope.checkForGetProductSize($scope.product);} if($scope.product.shopProduct.hasStock && ($scope.product.shopProduct.stock > $scope.product.shopProduct.reservedQuantity)){ $scope.showCartOnShopSelect = false; $scope.selectedShopId = $rootScope.storeId; }// Fetch variant collection and it's productsif ($scope.product && $scope.product.collections && $scope.product.collections.variantsCollection && $scope.product.collections.variantsCollection.length) {// Storing variant collection into scope$scope.variantCollection = $scope.product.collections.variantsCollection[0];// Removing null/'null' variantBase from api response and store into scopeif ($scope.variantCollection && $scope.variantCollection.variantBase) {for (let i = 0; i < $scope.variantCollection.variantBase.length; i++) {// Below condition i put because i am getting this two type of records that's why. This is not wrong condition.if ($scope.variantCollection.variantBase[i] !== null && $scope.variantCollection.variantBase[i] !== "null") {$scope.variantBase.push($scope.variantCollection.variantBase[i]);}}}// Need to call api for the fetch all the products which contains this variants collection$scope.fetchVariantProducts();}}}).catch(function (err) { $scope.loading = false;// hulla.send('Internal server error', 'danger');});}// Fetch variant collection and products$scope.fetchVariantProducts = function () {const variantCollectionId = $scope.variantCollection._id;const shopfilter = {"inStock": true,"show": true};const productFilter = {"collection": [variantCollectionId]}; var shopId = $rootScope.storeId; if($scope.multiShopId != ''){ shopId = $scope.multiShopId; }$http({method: "GET",url: $rootScope.apiBasepath + "/api/shop/stock-and-price-products-from-shop?shopId=" + shopId + "&shopFilter=" + JSON.stringify(shopfilter) + "&productFilter=" + JSON.stringify(productFilter), headers : $rootScope.corsHeaders}).then(function (response) {// Here i am checking length > 1 because whatever page for product that product is also fetched into this response that's whyif (response.data && response.data.products && response.data.products.length && (response.data.products.length > 1 || $scope.checkProductCategoryAndType('JEWEL','all'))) {$scope.variantProducts = response.data.products;if ($scope.variantBase && $scope.variantBase.length > 0) {for (let i = 0; i < $scope.variantBase.length; i++) { if($scope.variantBase[i] == 'product.size'){ $scope.variantProducts.sort((a,b) => { let a_value = a['product']['size']; let b_value = b['product']['size']; return (a_value > b_value) ? 1 : ((b_value > a_value) ? -1 : 0); }); }}} else { $scope.variantProducts.sort((a,b) => { let a_value = a['product']['size']; let b_value = b['product']['size']; return (a_value > b_value) ? 1 : ((b_value > a_value) ? -1 : 0); });}}for (let i = 0; i < $scope.variantProducts.length; i++) {if ($scope.variantProducts[i]._id.toString() === $scope.product._id.toString()) {$scope.variantIndex = i.toString();break;}continue;}}).catch(function (err) { // $scope// hulla.send('Internal server error.', 'danger');});}$scope.changeVariant = function (index) { $scope.ajaxLoadProduct = true; $scope.variantIndex = index; $scope.product = []; setTimeout(()=>{ $scope.product = $scope.variantProducts[index]; $scope.ajaxLoadProduct = false; $scope.fetchSpecifications($scope.product); $scope.fetchReviews($scope.product._id); setTimeout(() => { loadMainJs(); loadTranslations(); loadDatePicker(); }, 2000); },500)// console.log('|||||||||||||');// console.log($scope.product.product.images);// console.log('|||||||||||||');// Fetch this new variant product reviews}; $scope.getFeaturedProducts = function() { var url = $rootScope.apiBasepath + "/api/get-featured-products-from-shop/" + $rootScope.storeId; // This is API for fetch featured product $http({ method: "GET", url: url, headers : $rootScope.corsHeaders }) .then(function (response) { $scope.featuredProducts = response.data.data; }, function (err) { // hulla.send('Internal server error.', 'danger'); console.log("error==>", err); }); }// Translate html string to actual HTML content$scope.trustAsHtml = function (html) {// return $sce.trustAsHtml("Details
\nKast
\n- Kast maat: 33 mm
\n- Kast dikte: 9 mm
\n- Kast materiaal: edelstaal
\n- Kast kleur: rose goud
\n- Kastvorm: rond
\n- Glas type: mineraal
\n- Waterdicht: 5 ATM/BAR
\n- Voorkant: sier diamanten
\n
\n
\nWijzerplaat
\n- Wijzerplaat: zilver met rose gouden romeinse cijfers
\n
\n
\n
\nBand
\n- Maat aansluiting band 16 mm
\n- Band: echt leer bruin
\n- Sluiting band: gespsluiting
\n
\n
\nUurwerk
\n- Functies: analoog zonder datum
\n- Uurwerk: Miyota (1L45)
\n- Energiebron uurwerk: quartz
\n
\nOverig
\n- EAN: 4005420909007");return $sce.trustAsHtml(html)}// Add to cart function$scope.addToCart = (productId) => { const selectedLanguage = localStorage.getItem('selectedLanguage'); if($scope.cartItems.length > 0){ var cart = $scope.cartItems.filter(c => c.product == productId); if(cart.length > 0){ hulla.send(productExistCart[selectedLanguage], 'danger'); return; } } $scope.ajaxLoadProduct = true;const cartSuccessMsg = {en: { message: 'New item added into cart.' },nl: { message: 'Nieuw item toegevoegd aan winkelwagen.' },de: { message: 'Neuer Artikel in den Warenkorb gelegt.' },fr: { message: 'Nouvel article ajouté au panier.' },es: { message: 'Nuevo artículo agregado al carrito.' } }const token = localStorage.getItem('customer');var urlParam = $rootScope.apiBasepath + "/api/customer/cart/" + $rootScope.storeId;var productSize = Number($("#product-size").val());var reqData = {method: "POST",url: urlParam,data: {product: productId,quantity: Number($("#product-quantity-1").val()), sessionId : localStorage.getItem('SessionId'), // shopId : $scope.selectedShopId}, headers : $rootScope.corsHeaders};if(productSize && productSize > 0){ reqData.data['productSize'] = productSize;} if($scope.selectedShopId != $rootScope.storeId || ( $scope.multiShopId != "" && $scope.multiShopId != $rootScope.storeId) || $scope.dropShipperCompanyId != ''){ // urlParam += $scope.selectedShopId; var companyDetails = {}; $scope.multiShopProductDetails.forEach(function(company) { if(company.companyDetails && company.companyDetails.id && $scope.dropShipperCompanyId == company.companyDetails.id){ companyDetails = company.companyDetails; } }); reqData = { method: "POST", url: urlParam, data: { product: productId, quantity: Number($("#product-quantity-1").val()), sessionId : localStorage.getItem('SessionId'), isFrom : ($scope.dropShipperCompanyId == '') ? 'shop' : 'shipper', details : { _id : ($scope.dropShipperCompanyId == '') ? $scope.selectedShop.id : companyDetails.id, name : ($scope.dropShipperCompanyId == '') ? $scope.selectedShop.name : companyDetails.name, nameSlug : ($scope.dropShipperCompanyId == '') ? $scope.selectedShop.nameSlug : companyDetails.nameSlug } }, headers : $rootScope.corsHeaders }; if(productSize && productSize > 0){ reqData.data['productSize'] = productSize; } }if (token && token !== "") {reqData['headers'] = Object.assign($rootScope.corsHeaders, {"x-authorization": token ? token : ''});}$http(reqData).then(function (response) { $scope.cartItems.push({ product : reqData.data.product, quantity : reqData.data.quantity }); $scope.ajaxLoadProduct = false;hulla.send(cartSuccessMsg[selectedLanguage].message, 'success');var setCount = $('.prismaStoreCart .cartItemsCount').text(); updateCartTotal(parseInt(setCount) + reqData.data.quantity);}, function (err) { $scope.ajaxLoadProduct = false;console.log("error==>", err);// hulla.send(err.data.message, 'danger');})}// Add to cart $scope.addToRetailerCart = function (product) { const selectedLanguage = localStorage.getItem('selectedLanguage'); $scope.ajaxLoadProduct = true;const cartSuccessMsg = {en: { message: 'New item added into cart.' },nl: { message: 'Nieuw item toegevoegd aan winkelwagen.' },de: { message: 'Neuer Artikel in den Warenkorb gelegt.' },fr: { message: 'Nouvel article ajouté au panier.' },es: { message: 'Nuevo artículo agregado al carrito.' } } $http({ method: "POST", url: $rootScope.apiBasepath + "/api/v2/retailer/cart/"+ $scope.retailerCompanyId, data: { product: product._id, shopId: $rootScope.storeId, quantity: Number($("#product-retailer-quantity-1").val()), sessionId : localStorage.getItem('SessionId') }, headers : $rootScope.corsHeaders }) .then(function (response) { $scope.ajaxLoadProduct = false; hulla.send(cartSuccessMsg[selectedLanguage].message, 'success'); }, function (err) { $scope.ajaxLoadProduct = false; console.log("error==>", err); }); }; // get shop details $scope.getShopDetails = function(){ const storeId = $scope.multiShopId != '' ? $scope.multiShopId : $rootScope.storeId; $http({ method: "GET", url: $rootScope.apiBasepath + "/api/v2/website/shop/" + storeId + "/details", headers : $rootScope.corsHeaders }) .then(function (response) { $scope.shopDetails = response.data.shop; if(storeId != $rootScope.storeId){ $scope.selectedShop = response.data.shop; $scope.selectedShop.id = storeId; $scope.selectedShopId = storeId; } if($scope.product && $scope.product._id){ var productData = { shopDetails : { id: $scope.shopDetails._id, name: $scope.shopDetails.name, nameSlug: $scope.shopDetails.nameSlug, address: $scope.shopDetails.address } }; productData = Object.assign(productData, $scope.product); var shop = $scope.multiShopProductDetails.some(s1 => s1.shopDetails && s1.shopDetails.id == $rootScope.storeId); if(!shop){ $scope.multiShopProductDetails.unshift(productData); } $scope.checkForGetProductSize($scope.product); } if($scope.productId != "" && (($scope.shopDetails.multiShops && $scope.shopDetails.multiShops.length > 0) || ($scope.shopDetails.dropShippers && $scope.shopDetails.dropShippers.length > 0))){ $scope.fetchMultiShopDetails($scope.productId); } if ($scope.shopDetails && !$scope.shopDetails.isPublished && $scope.multiShopId == '') { window.location.href = "https://prismanote.com/home"; } // Set shop details into localStorage localStorage.removeItem("gjs-css"); localStorage.removeItem("gjs-styles"); localStorage.removeItem("gjs-components"); localStorage.removeItem("gjs-html"); localStorage.setItem('shopDetails', JSON.stringify($scope.shopDetails)); localStorage.setItem('websiteName', websiteName); }, function (err) { // hulla.send('Internal server error.', 'danger'); console.log("error==>", err); }); }$scope.fetchReviews = function(productId) {$http({method: "GET",url: $rootScope.apiBasepath + "/api/product/review/" + productId, headers : $rootScope.corsHeaders}) .then(function (response) {$scope.reviews = response && response.data && response.data.result && response.data.result.reviews && response.data.result.reviews.length ? response.data.result.reviews : []; }, function (err) {hulla.send("Something went wrong.", 'danger'); });};$scope.submitReview = function (reviewDescription, rating) {if (reviewDescription === "" || reviewDescription.trim() === "") { hulla.send("Please add review description", 'danger'); } else if (rating === 0) { hulla.send("Please select rating", 'danger'); } else {const req = {method: "POST",url: $rootScope.apiBasepath + "/api/product/review",data: {rating: rating,reviewText: reviewDescription,shopId: $rootScope.storeId,productId: $scope.product._id},headers: Object.assign($rootScope.corsHeaders, {"x-authorization": token ? token : ''})}; $http(req) .then(function (response) { $scope.rating = 0; $scope.reviewDescription = "";hulla.send("Review add successfully", 'success');// Fetch updated reviews for this product$scope.fetchReviews($scope.product._id);; }, function (err) {console.log("err ==>", err); hulla.send("Something went wrong.", 'danger'); }); } }; $scope.openDetailTab = function(openTab){ $('.product-single-tabs .tab-pane.active').removeClass('active'); $('.product-single-tabs .tab-pane.show').removeClass('show'); $('#'+openTab).addClass('show'); $('#'+openTab).addClass('active'); } // $scope.showTranslation = function(key){ // if(typeof(fetchSpecificTranslation) != 'undefined'){ // return fetchSpecificTranslation(key); // } // } $scope.toggleMutiShoplist = function(){ $scope.showMultiShopList = !$scope.showMultiShopList; } $scope.reserveProduct = function(){ $scope.selectedShop = {}; $scope.multiShopProductDetails.forEach(function(shop) { if(shop.shopDetails && shop.shopDetails.id && $scope.selectedShopId == shop.shopDetails.id){ $scope.selectedShop = shop.shopDetails; } }); var changeDate = ''; if(typeof(moment) != 'undefined' && $scope.dateTime != ''){ // $scope.dateTime = moment(new Date()).add('5', 'minutes').format('DD-MM-YYYY HH:mm'); var atTranslation = { 'de':' um ', 'en':' at ', 'es':' a las ', 'fr':' à ', 'nl':' om ' } var at = atTranslation[$rootScope.selectedLanguage]; changeDate = $scope.dateTime.split(" ").join(at); } $scope.userDetails.productName = $scope.product.product.variants[0].productNumber; $scope.userDetails.shopId = $scope.selectedShopId; $scope.userDetails.language = localStorage.getItem('selectedLanguage'); var brandName = $scope.product && $scope.product.brand && $scope.product.brand.alias && $scope.product.brand.alias != '' ? $scope.product.brand.alias : ($scope.product && $scope.product.brand ? $scope.product.brand.name : '') ; var address = $scope.selectedShop.address && $scope.selectedShop.address.street ? $scope.selectedShop.address.street : ''; address += $scope.selectedShop.address && $scope.selectedShop.address.houseNumber ? ' ( ' +$scope.selectedShop.address.houseNumber : ''; address += ($scope.selectedShop.address && $scope.selectedShop.address.houseNumberSuffix && $scope.selectedShop.address.houseNumberSuffix != '') ? $scope.selectedShop.address.houseNumberSuffix + ' ) ' : ' ) '; address += $scope.selectedShop.address && $scope.selectedShop.address.city ? 'in ' +$scope.selectedShop.address.city : ''; $scope.userDetails.productId = $scope.product._id; $scope.userDetails.price = $("#productSellPrice").html().replace('€ ', ''); switch($rootScope.selectedLanguage){ case "de": $scope.userDetails.description = `Schönen Tag, Ich möchte dieses Produkt (${brandName} ${$scope.product.product.variants[0].productNumber}) ${changeDate != '' ? (' am ' +changeDate + 'sehen') : 'reservieren'}. Möchten Sie mich per Telefon / E-Mail kontaktieren, um diese Reservierung zu bestätigen? Ort:${$scope.selectedShop.name ? $scope.selectedShop.name : ''}${$scope.selectedShop.address && $scope.selectedShop.address.street ? $scope.selectedShop.address.street : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumber ? $scope.selectedShop.address.houseNumber : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumberSuffix && $scope.selectedShop.address.houseNumberSuffix != '' ? '('+$scope.selectedShop.address.houseNumberSuffix+')' : ''}${$scope.selectedShop.address && $scope.selectedShop.address.city ? $scope.selectedShop.address.city : ''}`; break; case "en": $scope.userDetails.description = `Good day, I would like to ${changeDate != '' ? 'view' : 'reserve'} this product (${brandName} ${$scope.product.product.variants[0].productNumber})${changeDate!= ''? ' on '+changeDate : ''}. Would you like to contact me by phone / email to confirm this reservation?Location:${$scope.selectedShop.name ? $scope.selectedShop.name : ''}${$scope.selectedShop.address && $scope.selectedShop.address.street ? $scope.selectedShop.address.street : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumber ? $scope.selectedShop.address.houseNumber : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumberSuffix && $scope.selectedShop.address.houseNumberSuffix != '' ? '('+$scope.selectedShop.address.houseNumberSuffix+')' : ''}${$scope.selectedShop.address && $scope.selectedShop.address.city ? $scope.selectedShop.address.city : ''}`; break; case "es": $scope.userDetails.description = `Buen día, Me gustaría ${changeDate!=''? 'ver' : 'reservar'} este producto (${brandName} ${$scope.product.product.variants[0].productNumber})${changeDate!=''? ' el '+changeDate : ''}. ¿Le gustaría contactarme por teléfono / correo electrónico para confirmar esta reserva?Ubicación:${$scope.selectedShop.name ? $scope.selectedShop.name : ''}${$scope.selectedShop.address && $scope.selectedShop.address.street ? $scope.selectedShop.address.street : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumber ? $scope.selectedShop.address.houseNumber : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumberSuffix && $scope.selectedShop.address.houseNumberSuffix != '' ? '('+$scope.selectedShop.address.houseNumberSuffix+')' : ''}${$scope.selectedShop.address && $scope.selectedShop.address.city ? $scope.selectedShop.address.city : ''}`; break; case "fr": $scope.userDetails.description = `Bonjour, Je voudrais ${changeDate!=''? 'voir' : 'réserver'} ce produit (${brandName} ${$scope.product.product.variants[0].productNumber})${changeDate !=''? ' le '+changeDate : ''}. Souhaitez-vous me contacter par téléphone / e-mail pour confirmer cette réservation?Emplacement:${$scope.selectedShop.name ? $scope.selectedShop.name : ''}${$scope.selectedShop.address && $scope.selectedShop.address.street ? $scope.selectedShop.address.street : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumber ? $scope.selectedShop.address.houseNumber : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumberSuffix && $scope.selectedShop.address.houseNumberSuffix != '' ? '('+$scope.selectedShop.address.houseNumberSuffix+')' : ''}${$scope.selectedShop.address && $scope.selectedShop.address.city ? $scope.selectedShop.address.city : ''}`; break; default: $scope.userDetails.description = `Goedendag, Graag wil ik dit product (${brandName} ${$scope.product.product.variants[0].productNumber}) ${changeDate != '' ? ('bekijken op ' + changeDate) : ('reserveren')}. Wilt u contact opnemen via telefoon/email om deze reservering te bevestigen? Locatie:${$scope.selectedShop.name ? $scope.selectedShop.name : ''}${$scope.selectedShop.address && $scope.selectedShop.address.street ? $scope.selectedShop.address.street : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumber ? $scope.selectedShop.address.houseNumber : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumberSuffix && $scope.selectedShop.address.houseNumberSuffix != '' ? '('+$scope.selectedShop.address.houseNumberSuffix+')' : ''}${$scope.selectedShop.address && $scope.selectedShop.address.city ? $scope.selectedShop.address.city : ''}`; } $scope.showReservationModal = true; $('#exampleModalCenter').modal('show'); } $scope.setSelectedShopId= function(shop){ $scope.showCartOnShopSelect = false; if(shop.shopDetails.id){ $scope.selectedShopId = shop.shopDetails.id; $scope.selectedShop = shop.shopDetails; } if(!shop.shopProduct.hasStock || !(shop.shopProduct.stock > shop.shopProduct.reservedQuantity)){ $scope.showCartOnShopSelect = true; } } $scope.changeDateTime = function(){ var brandName = $scope.product.brand && $scope.product.brand.alias && $scope.product.brand.alias != '' ? $scope.product.brand.alias : ($scope.product.brand && $scope.product.brand.name ? $scope.product.brand.name : ''); var address = $scope.selectedShop.address && $scope.selectedShop.address.street ? $scope.selectedShop.address.street : ''; address += $scope.selectedShop.address && $scope.selectedShop.address.houseNumber ? ' ( ' + $scope.selectedShop.address.houseNumber : ''; address += ($scope.selectedShop.address && $scope.selectedShop.address.houseNumberSuffix && $scope.selectedShop.address.houseNumberSuffix != '') ? $scope.selectedShop.address.houseNumberSuffix + ' ) ' : ' ) '; address += $scope.selectedShop.address && $scope.selectedShop.address.city ? 'in ' +$scope.selectedShop.address.city : ''; var atTranslation = { 'de':' um ', 'en':' at ', 'es':' a las ', 'fr':' à ', 'nl':' om ' } var at = atTranslation[$rootScope.selectedLanguage]; var changeDate = $scope.dateTime != '' ? $scope.dateTime.split(" ").join(at) : ''; switch($rootScope.selectedLanguage){ case "de": $scope.userDetails.description = `Schönen Tag, Ich möchte dieses Produkt (${brandName} ${$scope.product.product.variants[0].productNumber}) ${changeDate != '' ? (' am ' +changeDate + 'sehen') : 'reservieren'}. Möchten Sie mich per Telefon / E-Mail kontaktieren, um diese Reservierung zu bestätigen? Ort:${$scope.selectedShop.name ? $scope.selectedShop.name : ''}${$scope.selectedShop.address && $scope.selectedShop.address.street ? $scope.selectedShop.address.street : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumber ? $scope.selectedShop.address.houseNumber : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumberSuffix && $scope.selectedShop.address.houseNumberSuffix != '' ? '('+$scope.selectedShop.address.houseNumberSuffix+')' : ''}${$scope.selectedShop.address && $scope.selectedShop.address.city ? $scope.selectedShop.address.city : ''}`; break; case "en": $scope.userDetails.description = `Good day, I would like to ${changeDate != '' ? 'view' : 'reserve'} this product (${brandName} ${$scope.product.product.variants[0].productNumber})${changeDate!= ''? ' on '+changeDate : ''}. Would you like to contact me by phone / email to confirm this reservation?Location:${$scope.selectedShop.name ? $scope.selectedShop.name : ''}${$scope.selectedShop.address && $scope.selectedShop.address.street ? $scope.selectedShop.address.street : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumber ? $scope.selectedShop.address.houseNumber : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumberSuffix && $scope.selectedShop.address.houseNumberSuffix != '' ? '('+$scope.selectedShop.address.houseNumberSuffix+')' : ''}${$scope.selectedShop.address && $scope.selectedShop.address.city ? $scope.selectedShop.address.city : ''}`; break; case "es": $scope.userDetails.description = `Buen día, Me gustaría ${changeDate!=''? 'ver' : 'reservar'} este producto (${brandName} ${$scope.product.product.variants[0].productNumber})${changeDate!=''? ' el '+changeDate : ''}. ¿Le gustaría contactarme por teléfono / correo electrónico para confirmar esta reserva?Ubicación:${$scope.selectedShop.name ? $scope.selectedShop.name : ''}${$scope.selectedShop.address && $scope.selectedShop.address.street ? $scope.selectedShop.address.street : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumber ? $scope.selectedShop.address.houseNumber : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumberSuffix && $scope.selectedShop.address.houseNumberSuffix != '' ? '('+$scope.selectedShop.address.houseNumberSuffix+')' : ''}${$scope.selectedShop.address && $scope.selectedShop.address.city ? $scope.selectedShop.address.city : ''}`; break; case "fr": $scope.userDetails.description = `Bonjour, Je voudrais ${changeDate!=''? 'voir' : 'réserver'} ce produit (${brandName} ${$scope.product.product.variants[0].productNumber})${changeDate !=''? ' le '+changeDate : ''}. Souhaitez-vous me contacter par téléphone / e-mail pour confirmer cette réservation?Emplacement:${$scope.selectedShop.name ? $scope.selectedShop.name : ''}${$scope.selectedShop.address && $scope.selectedShop.address.street ? $scope.selectedShop.address.street : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumber ? $scope.selectedShop.address.houseNumber : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumberSuffix && $scope.selectedShop.address.houseNumberSuffix != '' ? '('+$scope.selectedShop.address.houseNumberSuffix+')' : ''}${$scope.selectedShop.address && $scope.selectedShop.address.city ? $scope.selectedShop.address.city : ''}`; break; default: $scope.userDetails.description = `Goedendag, Graag wil ik dit product (${brandName} ${$scope.product.product.variants[0].productNumber}) ${changeDate != '' ? ('bekijken op ' + changeDate) : ('reserveren')}. Wilt u contact opnemen via telefoon/email om deze reservering te bevestigen? Locatie:${$scope.selectedShop.name ? $scope.selectedShop.name : ''}${$scope.selectedShop.address && $scope.selectedShop.address.street ? $scope.selectedShop.address.street : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumber ? $scope.selectedShop.address.houseNumber : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumberSuffix && $scope.selectedShop.address.houseNumberSuffix != '' ? '('+$scope.selectedShop.address.houseNumberSuffix+')' : ''}${$scope.selectedShop.address && $scope.selectedShop.address.city ? $scope.selectedShop.address.city : ''}`; }// $scope.userDetails.description = `Goedendag, // Graag wil ik dit product ${brandName} ${$scope.product.product.variants[0].productNumber} bekijken op ${$scope.dateTime}. Kan dit in jullie winkel: ${$scope.selectedShop.name ? $scope.selectedShop.name : ''} in ${$scope.selectedShop.address && $scope.selectedShop.address.street ? $scope.selectedShop.address.street : ''} / ${$scope.selectedShop.address && $scope.selectedShop.address.houseNumber ? $scope.selectedShop.address.houseNumber : ''} / ${($scope.selectedShop.address && $scope.selectedShop.address.houseNumberSuffix && $scope.selectedShop.address.houseNumberSuffix != '') ? $scope.selectedShop.address.houseNumberSuffix + ' / ' : ''} ${$scope.selectedShop.address && $scope.selectedShop.address.city ? $scope.selectedShop.address.city : ''} ?// Neem a.u.b. nog even contact met me op via telefoon/email om deze afspraak te bevestigen! Met groet! `; } $scope.sendMessageToShop = function(){ // Post API url http://localhost:3000/api/customer/transactionsEnquery $('#exampleModalCenter').modal('hide'); $scope.userDetails.phoneNumber = $('#userPhoneNumber')[0] && $('#userPhoneNumber')[0].value ? $('#userPhoneNumber')[0].value : $scope.userDetails.phoneNumber.toString(); var url = "/api/customer/create-reservation-transaction/" + $scope.selectedShopId ; const req = {method: "POST",url: $rootScope.apiBasepath + url,data: $scope.userDetails,headers: Object.assign($rootScope.corsHeaders, {"x-authorization": token ? token : ''})}; $http(req) .then(function (response) { var message = ""; if(response.data && response.data.message){ message = response.data.message }hulla.send(message, 'success');// Fetch updated reviews for this product// $scope.fetchReviews($scope.product._id);; }, function (err) {console.log("err ==>", err); hulla.send("Something went wrong.", 'danger'); }); } $scope.disableCartBtn = function(){ if($scope.dropShipperCompanyId != ''){ return false } if($scope.selectedShopId != '' && $scope.selectedShopId != $scope.storeId){ var shop = $scope.multiShopProductDetails.filter(s1 => s1.shopDetails && s1.shopDetails.id == $rootScope.storeId); if(!$scope.product.shopProduct.hasStock || (shop.product.shopProduct.stock > shop.product.shopProduct.reservedQuantity && $scope.productExistInCart <= shop.product.shopProduct.stock && ((quantity + $scope.productExistInCart) <= shop.product.shopProduct.stock))){ return false; } } var quantity = Number($("#product-quantity-1").val()); if(!$scope.product.shopProduct.hasStock || ($scope.product.shopProduct.stock > $scope.product.shopProduct.reservedQuantity && $scope.productExistInCart <= $scope.product.shopProduct.stock && ((quantity + $scope.productExistInCart) <= $scope.product.shopProduct.stock))){ return false; }else{ return true; } } $scope.setSellingPriceForCompanyProduct = function(product){ var priceIncVAT = product.product.suggestedRetailPrice * (1 + (product.product.suggestedRetailPriceVat / 100)); var displayPrice = product.shopProduct.price * ( 1 + ( product.shopProduct.priceVat / 100 ) ); if ((displayPrice * 1.5) > priceIncVAT){ priceIncVAT = displayPrice * 2.5 } return(( priceIncVAT ) -(product.shopProduct.discountOnPercentage ?( ( priceIncVAT * product.shopProduct.discount ) / 100 ) :product.shopProduct.discount)).toFixed(2); } $scope.checkProductCategoryAndType = function (category, type) { if($scope.product && $scope.product.product && $scope.product.product.jewel && $scope.product.product.jewel.type){ var ringTypes= ["RING", "SEAL_RING", "COMBINATION_RING", "RING_WITH_PEARL","RING_WITH_GEM"]; var necklaceTypes= ["CHOKER", "NECKLACE", "TENNIS_NECKLACE"]; var braceletTypes= ["BRACELET", "TENNIS_BRACELET", "SLAVE_BRACELET"]; var jewelType = $scope.product.product.jewel.type; if($scope.product.product.category == category && type == 'RING'){ return ringTypes.includes(jewelType); }else if($scope.product.product.category == category && type == 'NECKLACE'){ return necklaceTypes.includes(jewelType); }else if($scope.product.product.category == category && type == 'BRACELET'){ return braceletTypes.includes(jewelType); } else if(type == 'all' && $scope.product.product.category == category && (ringTypes.includes(jewelType) || braceletTypes.includes(jewelType) || necklaceTypes.includes(jewelType))){ return true; } } return false; } $scope.getvalueForJewelVariant = function(product, isFor){ var ringTypes= ["RING", "SEAL_RING", "COMBINATION_RING", "RING_WITH_PEARL","RING_WITH_GEM"]; var necklaceTypes= ["CHOKER", "NECKLACE", "TENNIS_NECKLACE"]; var braceletTypes= ["BRACELET", "TENNIS_BRACELET", "SLAVE_BRACELET"]; var jewelType = product.jewel.type; var option = { key: 0, value: 0}; if(braceletTypes.includes(jewelType)){ option = $scope.braceletSizeList.filter(o => o.key == product.size || o.value == product.size); }else if(necklaceTypes.includes(jewelType)){ option = $scope.necklaceSizeList.filter(o => o.key == product.size || o.value == product.size); }else if(ringTypes.includes(jewelType)){ option = $scope.getJewelRingSize.filter(o => o.key == product.size || o.value == product.size); } return isFor== 'key' ? option[0].key : option[0].value; } $scope.checkJewelType = function(product){ var ringTypes= ["RING", "SEAL_RING", "COMBINATION_RING", "RING_WITH_PEARL","RING_WITH_GEM"]; var necklaceTypes= ["CHOKER", "NECKLACE", "TENNIS_NECKLACE"]; var braceletTypes= ["BRACELET", "TENNIS_BRACELET", "SLAVE_BRACELET"]; var jewelType = product.jewel.type; var size = product.size; if(braceletTypes.includes(jewelType) && size && size != 0){ return 'BRACELET'; }else if(necklaceTypes.includes(jewelType) && size && size != 0){ return 'NECKLACE'; }else if(ringTypes.includes(jewelType) && size && size != 0){ return 'RING'; } } $scope.setDefaultDate = function(){ if(typeof(moment) != 'undefined'){ $scope.dateTime = moment(new Date()).format('DD-MM-YYYY HH:mm'); } } $scope.setSellPointCheckColor = function(){ var color = $("#addCartBtn").css("background-color"); return { 'color' : color}; } $scope.showUniqueSellPointHeader = function(){ return $('.unique-sell-point').length > 0; } $scope.gotoPreviousPage = function(){ setCookie('isBackFromDetails', '1'); window.location.href = document.referrer; }});app.controller("shopController", function ($scope, $rootScope, $http, $q) {});app.filter('titlecase', function() {return function(input) {if (!input || typeof input !== 'string') {return '';}return input.toLowerCase().split(' ').map(value => {return value.charAt(0).toUpperCase() + value.substring(1);}).join(' ');}});

Gentleman Powermatic 80 | T127.407.11.051.00 (2)

Gentleman Powermatic 80 | T127.407.11.051.00 (3)

Gentleman Powermatic 80 | T127.407.11.051.00 (4)

Gentleman Powermatic 80 | T127.407.11.051.00 (5)

{[{product.product[selectedLanguage].name}]}

{[{ product.sellingPrice.toFixed(2) }]} € {[{ ( product.sellingPrice - (product.shopProduct.discountOnPercentage ? ((product.sellingPrice * product.shopProduct.discount) / 100) : product.shopProduct.discount) ).toFixed(2) }]}

€ {[{ ( product.shopProduct.price + ( ( product.shopProduct.price * product.shopProduct.priceVat ) /100 ) ).toFixed(2) }]} € {[{ ( ( product.shopProduct.price * ( 1 + ( product.shopProduct.priceVat / 100 ) ) ) - ( product.shopProduct.discountOnPercentage ? ( ( ( product.shopProduct.price * ( 1 + ( product.shopProduct.priceVat / 100 ) ) ) * product.shopProduct.discount ) / 100 ) : product.shopProduct.discount ) ).toFixed(2) }]}

€ {[{ ( product.product.suggestedRetailPrice + ( ( product.product.suggestedRetailPrice * product.product.suggestedRetailPriceVat ) /100 ) ).toFixed(2) }]} € {[{ setSellingPriceForCompanyProduct(product) }]}

€ {[{ ( product.shopProduct.price ).toFixed(2) }]} € {[{ ( ( product.shopProduct.price ) - ( product.shopProduct.discountOnPercentage ? ( ( ( product.shopProduct.price ) * product.shopProduct.discount ) / 100 ) : product.shopProduct.discount ) ).toFixed(2) }]}

{[{ showTranslation['FINGER_SIZE'] }]} : {[{ showTranslation['WRIST_SIZE'] }]} :

{[{ showTranslation['NOT_IN_STOCK_AVAILABLE_IN_FEW_DAYS'] }]}

{[{ shop.shopDetails.name }]}

{[{ shop.shopDetails.address.street }]} {[{ shop.shopDetails.address.houseNumber }]} {[{ shop.shopDetails.address.houseNumberSuffix }]}

{[{ shop.shopDetails.address.city }]}

{[{ (shop.shopProduct.stock > shop.shopProduct.reservedQuantity) ? showTranslation["IN_STOCK"] : showTranslation["NOT_IN_STOCK"]}]}

{[{ showTranslation['WHAT_YOU_CAN_EXPECT'] }]}

{[{shopDetails.uniqueSellingPoints.point_1[selectedLanguage]}]}

{[{shopDetails.uniqueSellingPoints.point_2[selectedLanguage]}]}

{[{shopDetails.uniqueSellingPoints.point_3[selectedLanguage]}]}

{[{shopDetails.uniqueSellingPoints.point_4[selectedLanguage]}]}

  • {[{ showTranslation['PRODUCT_SPECIFICATIONS'] }]}
  • {[{ showTranslation['DESCRIPTION'] }]}
  • {[{ showTranslation['DELIVERY_AND_RETURNS'] }]}

{[{ showTranslation['Product-specifications'] }]}

{[{ showTranslation['NAME'] }]} {[{ (specifications.brandAlias !== "") ? specifications.name.contains(specifications.productNumberSupplier) ? specifications.name.replace(specifications.productNumberSupplier,'') : specifications.name : specifications.name }]}
{[{ showTranslation['Shop-product-number'] }]} {[{specifications.retailerProductNumber}]}
{[{ showTranslation['Brand'] }]} {[{ (specifications.brandAlias !== "") ? specifications.brandAlias : specifications.brandName }]}
EAN {[{specifications.ean}]}
{[{ showTranslation['Supplier-product-number'] }]} {[{specifications.productNumberSupplier}]}
{[{ showTranslation['CATEGORY'] }]} {[{ showTranslation[specifications.category] }]}
{[{ showTranslation['DIAMONDS'] }]} {[{specifications.diamonds}]} CARAT
{[{ showTranslation['Target-group-gender'] }]} {[{ showTranslation[specifications.gender.toUpperCase()] }]}
{[{ showTranslation['Anti-allergies'] }]} {[{ specifications.watchDetails.antiAllergy ? showTranslation['YES'] : showTranslation['NO'] }]}
{[{ showTranslation['DATE'] }]} {[{specifications.watchDetails.date ? showTranslation['YES'] : showTranslation['NO'] }]}
{[{ showTranslation['Cabinet-size'] }]} {[{specifications.watchDetails.caseSize}]}
{[{ showTranslation['Band-color'] }]} {[{ showTranslation[specifications.watchDetails.strapColor] }]}
{[{ showTranslation['indication'] }]} {[{ showTranslation[specifications.watchDetails.indication] }]}
{[{ showTranslation['INDEX'] }]} {[{ showTranslation[specifications.watchDetails.index] }]}
{[{ showTranslation['DIAL_COLOR'] }]} {[{ showTranslation[specifications.watchDetails.dialColor] }]}
{[{ showTranslation['CASE_COLOR'] }]} {[{ showTranslation[specifications.watchDetails.caseColor] }]}
{[{ showTranslation['WATERPROOF_LEVEL'] }]} {[{specifications.watchDetails.waterproofLevel }]} ATM
{[{ showTranslation['specialitem'] }]} {[{ showTranslation[item] }]}
{[{ showTranslation['NICKEL_FREE'] }]} {[{specifications.watchDetails.isNickelFree ? showTranslation['YES'] : showTranslation['NO'] }]}
{[{ showTranslation['MODEL'] }]} {[{ showTranslation[specifications.watchDetails.model] }]}
{[{ showTranslation['strapmaterial'] }]} {[{ showTranslation[specifications.watchDetails.strapmaterial] }]}
{[{ showTranslation['STUDS'] }]} {[{specifications.watchDetails.studs == 'true' ? showTranslation['YES'] : showTranslation['NO'] }]}
{[{ showTranslation['strapmaterial'] }]} {[{ showTranslation[specifications.strapDetails.strapmaterial] }]}
{[{ showTranslation['MODEL'] }]} {[{ showTranslation[specifications.strapDetails.model] }]}
{[{ showTranslation['STUDS'] }]} {[{ showTranslation[specifications.strapDetails.studs] }]}
{[{ showTranslation['Band-color'] }]} {[{ showTranslation[specifications.strapDetails.color] }]}
{[{ showTranslation['COLLECTIONS'] }]} {[{specifications.articleGroup}]}
{[{ showTranslation['MATERIAL'] }]} {[{ showTranslation[specifications.jewelDetails.material]}]}
{[{ showTranslation['GLOSS'] }]} {[{specifications.jewelDetails.gloss == true ? showTranslation['YES'] : showTranslation['NO']}]}
{[{ showTranslation['COLOR'] }]} {[{ showTranslation[specifications.jewelDetails.color] }]}
{[{ showTranslation['HEIGHT'] }]} {[{specifications.jewelDetails.height}]} MM
{[{ showTranslation['WIDTH'] }]} {[{specifications.jewelDetails.width}]} MM
{[{ showTranslation['DEPTH'] }]} {[{specifications.jewelDetails.depth}]} MM
{[{ showTranslation['DIAMETER'] }]} {[{specifications.jewelDetails.diameter}]}
{[{ showTranslation['WEIGHT'] }]} {[{specifications.jewelDetails.weight}]} G
{[{ showTranslation['Ringsize'] }]} {[{specifications.jewelDetails.size}]}
{[{ showTranslation['SIZE'] }]} {[{specifications.jewelDetails.size}]} MM
{[{ showTranslation['specialitem'] }]} {[{item.quantity}]} , {[{item.caratWeight}]} , {[{item.gemColor.code}]} , {[{item.gemCut}]} , {[{item.gemKind}]} , {[{item.gemPurity.code}]}

{[{ review.reviewText }]}

{[{ review.customerId.firstName }]} {[{ review.customerId.lastName }]}

{[{ showTranslation['How-do-you-rate-this-product'] }]}

{[{ showTranslation['Review-title-page'] }]}

{[{ showTranslation['review-note-for-user-in-products-details-page'] }]} {[{ showTranslation['CLICK_HERE'] }]}

{[{ showTranslation['Featured-products'] }]}

Quick view - {[{singleProduct.discountOnPercentage ? '':'€'}]}{[{singleProduct.discount}]}{[{singleProduct.discountOnPercentage ? '%':''}]} {[{ showTranslation['In-stock'] }]} {[{ showTranslation['Bestseller'] }]} {[{ showTranslation['Sale'] }]}

{[{featuredProducts.productsdetail[$index].nl.name}]}

{[{ ( (singleProduct.price * 1.21 ) + (singleProduct.discountOnPercentage ? (((singleProduct.price * 1.21) * singleProduct.discount) / 100) : singleProduct.discount) ).toFixed(2) }]} € {[{((singleProduct.price * 1.21) - singleProduct.discount).toFixed(2)}]}

{[{ showTranslations['BUTTON_ADD_TO_CART'] }]}

{[{ showTranslation['RESERVE_MODAL'] }]}

Gentleman Powermatic 80 | T127.407.11.051.00 (2024)
Top Articles
Latest Posts
Article information

Author: Rev. Porsche Oberbrunner

Last Updated:

Views: 6655

Rating: 4.2 / 5 (73 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Rev. Porsche Oberbrunner

Birthday: 1994-06-25

Address: Suite 153 582 Lubowitz Walks, Port Alfredoborough, IN 72879-2838

Phone: +128413562823324

Job: IT Strategist

Hobby: Video gaming, Basketball, Web surfing, Book restoration, Jogging, Shooting, Fishing

Introduction: My name is Rev. Porsche Oberbrunner, I am a zany, graceful, talented, witty, determined, shiny, enchanting person who loves writing and wants to share my knowledge and understanding with you.