Envio Grátis para Portugal Continental (acima de 39€) - Trocas até 15/01

Carrinho sem produtos disponiveis

Subtotal

€ 0

Compre mais € 39 para ter portes grátis. (Portugal Continental)

Valor de Entrega Calculado Durante Checkout

Concluir compra

Impostos incluídos para Portugal

Logo Pianegonda

Pianegonda

  • Funcionalidade

  • Coleção

  • Diâmetro

  • Género

  • Mecanismo

  • Marca

  • Resistência Água

  • Cor do Mostrador

  • Tipo de Bracelete

  • Outlet / Promoções

  • Tipo de Caixa

  • Material

  • Tamanho

  • Tipo

  • Preço

Mais Informações

Deseja obter mais informações sobre a marca? Solicite-nos um catálogo ou agende uma visita a uma das nossas lojas para conhecer os diferentes produtos.

'; entry.prod_stock += '

'+svg+'Em Stock

' } entry.prod_discount = ''; if(entry.discount_percentage) { style=""; if((entry.is_highlighted.pt || entry.no_credit || entry.is_new_collection)){ style="right: 30px!important;left:auto!important"; } entry.prod_discount += '

-'+entry.discount_percentage+'

'; } entry.image_main = ''; entry.image_hover = ''; if(entry.images_webp) { let imagesWebp = JSON.parse(entry.images_webp); entry.image_main = imagesWebp[0]; if (typeof imagesWebp[1] !== 'undefined') { entry.image_hover = imagesWebp[1]; } } else { entry.image_main = entry.images ? entry.images.medium : ''; } return entry; }) }, transformData: function(item) { return item; } }), instantsearch.widgets.rangeSlider({ container: '#range-price', attribute: 'price_number' }), instantsearch.widgets.pagination({ container: '#pagination', templates: { next: 'Seguinte', previous: 'Anterior', }, scrollTo: 'header' }), instantsearch.widgets.configure({ page: 0, hitsPerPage: 60, disjunctiveFacets: ["brand.pt", "brand.en", "cat", "features.pt", "features.en", "collection.en", "collection.pt", "box_size.pt", "box_size.en", "genre.pt", "genre.en", "watch_movement.pt", "watch_movement.en", "is_auto", "price_number", "type_of_glass.pt", "type_of_glass.en", "water_resistant.pt", "water_resistant.en", "watch_band.pt", "watch_band.en", "is_outlet.pt", "is_outlet.en", "box.pt", "box.en", "material.pt", "material.en", "size", "stock", "type.pt", "type.en"], filters: query_filters, clickAnalytics: true, }), instantsearch.widgets.sortBy({ container: '#sort-by-dropdown', autoHideContainer: false, items: filterItems }) ] ); let contprice = 1; let tooltipAux = 0; $.each(algoliaFiltersConfig, function(index, value) { if(value['type'] != 'rangeSlider') { let options = JSON.stringify(value['options']); options = options.replace("{lang}", "pt").replace('"[', '[').replace(']"', ']'); eval("search.addWidget(instantsearch.widgets." + value['type'] + "(" + options + "));"); } }); search.addWidget(instantsearch.widgets.stats({ container: '.products-info-filter.products-info-filter-mobile .total .count,.products-info-filter.products-info-filter-desktop .total .count', autoHideContainer: false, transformData: function transformData(data) { return data; }, templates: { text(data) { let count = ''; let countMobile = ''; if (data.hasManyResults) { count += data.nbHits; countMobile += 'Ver '+data.nbHits+' resultados'; } else if (data.hasOneResult) { count += `1`; countMobile += 'Ver 1 resultado'; } else { count += '0'; countMobile += 'sem resultados'; } $('.products-info-filter-mobile .total .count').text(count); $('.countMobile').text(countMobile); return count; }, } })); $('.filters-btn').click(function() { $('.filters--drawer--v2').addClass('active'); }) $('.close-filter').click(function() { $('.filters--drawer--v2').removeClass('active'); $('.filters-btn').click(); }) $('#filter-clear').click(function() { search.helper.clearRefinements().setQuery('').search(); }) search.on('render', () => { const filterElements = document.querySelectorAll('.ais-RefinementList-checkbox'); const emptyCategoryFilters = document.querySelectorAll('.ais-RefinementList--noRefinement'); $('.products-info-filter .filters .list').html(''); let filters = ''; // Contar os itens selecionados em cada categoria filterElements.forEach((element) => { let categoryItemsSelected = $(element).closest('.filter-category--list').find('input:checked').length; let parentElement = $(element).closest('.filter-list--category'); let label = $(element).closest('.ais-RefinementList-label').find('.ais-RefinementList-labelText').text(); if($(element).is(':checked')) { const uniqueId = 'mask_' + Math.random().toString(36).substr(2, 9); filters += '
' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + label + '
'; } if (categoryItemsSelected > 0) { parentElement.find('.filter-category--title').addClass('active'); parentElement.find('.category-active--count').html('('+categoryItemsSelected+')'); } else { parentElement.find('.filter-category--title').removeClass('active'); parentElement.find('.category-active--count').html(''); } }); emptyCategoryFilters.forEach((element) => { let parentElement = $(element).closest('.filter-list--category'); parentElement.remove(); }); if(filters){ $('.products-info-filter .filters').addClass('enabled'); }else{ $('.products-info-filter .filters').removeClass('enabled'); } $('.products-info-filter .filters .list').html(filters); }); if (blockSearch === 0) { search.start(); // search_modal.start(); } $('body').on('click', '.filter-category--btn', function () { var item = $(this).closest('.filter-list--category'); if (item.hasClass('opened')) { item.removeClass('opened'); item.find('.filter-category--submenu').slideUp(); } else { $('.filter-list--category').removeClass('opened'); $('.filter-category--submenu').slideUp(); item.addClass('opened'); item.find('.filter-category--submenu').slideDown(); } }); document.getElementById("select-brand").parentElement.parentElement.remove(); document.getElementById("select-is_outlet").parentElement.parentElement.remove(); if(cat == 'bijuteria' || cat == 'prata' || cat == 'joalharia' || cat == 'ourivesaria' || cat == 'aliancas') { document.getElementById("select-features").parentElement.parentElement.remove(); document.getElementById("select-box_size").parentElement.parentElement.remove(); document.getElementById("select-watch_movement").parentElement.parentElement.remove(); document.getElementById("select-water_resistant").parentElement.parentElement.remove(); document.getElementById("select-type_of_glass").parentElement.parentElement.remove(); document.getElementById("select-watch_band").parentElement.parentElement.remove(); document.getElementById("select-box").parentElement.parentElement.remove(); } else if (cat == 'acessorios' || cat == 'outlet' || cat == 'novidades') { document.getElementById("select-features").parentElement.parentElement.remove(); document.getElementById("select-box_size").parentElement.parentElement.remove(); document.getElementById("select-watch_movement").parentElement.parentElement.remove(); document.getElementById("select-water_resistant").parentElement.parentElement.remove(); document.getElementById("select-type_of_glass").parentElement.parentElement.remove(); document.getElementById("select-watch_band").parentElement.parentElement.remove(); document.getElementById("select-box").parentElement.parentElement.remove(); document.getElementById("select-size").parentElement.parentElement.remove(); document.getElementById("select-material").parentElement.parentElement.remove(); } else if (cat == 'relogios') { document.getElementById("select-material").parentElement.parentElement.remove(); document.getElementById("select-size").parentElement.parentElement.remove(); document.getElementById("select-type").parentElement.parentElement.remove(); } aa('init', { appId: 'BS5V290SQP', apiKey: '9eedd0cb6962fa72524e5c306cae50eb', }); $('.close-cart').on('click', function () { $('.cart-wrapper').removeClass('cart-open'); $('body').removeClass('no-scroll'); }); $(document).mouseup(function (e) { /* close menu */ if (!$('.main-header .toggle-menu').is(e.target) && $('.main-header .toggle-menu').has(e.target).length === 0 && !$('.header-menu').is(e.target) && $('.header-menu').has(e.target).length === 0 && $('.header-menu').hasClass('menu-open')) { $('.main-header .toggle-menu').trigger('click'); } /* close cart */ if (!$('.top-header .cart-btn').is(e.target) && $('.top-header .cart-btn').has(e.target).length === 0 && !$('.cart-wrapper').is(e.target) && $('.cart-wrapper').has(e.target).length === 0 && $('.cart-wrapper').hasClass('cart-open')) { $('.top-header .cart-btn').trigger('click'); } if (!$('.top-header .cart-btn-v2').is(e.target) && $('.top-header .cart-btn-v2').has(e.target).length === 0 && !$('.cart-wrapper').is(e.target) && $('.cart-wrapper').has(e.target).length === 0 && $('.cart-wrapper').hasClass('cart-open')) { $('.top-header .cart-btn-v2').trigger('click'); } }); jQuery('#core-customer--signup').yiiActiveForm([{"id":"signupform-name","name":"name","container":".field-signupform-name","input":"#signupform-name","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"“Nome*” não pode ficar em branco."});value = yii.validation.trim($form, attribute, [], value);yii.validation.string(value, messages, {"message":"“Nome*” deve ser uma string.","min":2,"tooShort":"“Nome*” deve conter pelo menos 2 caracteres.","max":255,"tooLong":"“Nome*” deve conter no máximo 255 caracteres.","skipOnEmpty":1});}},{"id":"signupform-last_name","name":"last_name","container":".field-signupform-last_name","input":"#signupform-last_name","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"“Apelido*” não pode ficar em branco."});value = yii.validation.trim($form, attribute, [], value);yii.validation.string(value, messages, {"message":"“Apelido*” deve ser uma string.","min":2,"tooShort":"“Apelido*” deve conter pelo menos 2 caracteres.","max":255,"tooLong":"“Apelido*” deve conter no máximo 255 caracteres.","skipOnEmpty":1});}},{"id":"signupform-gender","name":"gender","container":".field-signupform-gender","input":"#signupform-gender","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"Tem de escolher uma das opções."});}},{"id":"signupform-day","name":"day","container":".field-signup-day","input":"#signup-day","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"“Dia” não pode ficar em branco."});yii.validation.number(value, messages, {"pattern":/^\s*[+-]?\d+\s*$/,"message":"“Dia” deve ser um número inteiro.","skipOnEmpty":1});}},{"id":"signupform-month","name":"month","container":".field-signup-month","input":"#signup-month","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"“Mês” não pode ficar em branco."});yii.validation.number(value, messages, {"pattern":/^\s*[+-]?\d+\s*$/,"message":"“Mês” deve ser um número inteiro.","skipOnEmpty":1});}},{"id":"signupform-year","name":"year","container":".field-signup-year","input":"#signup-year","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"“Ano” não pode ficar em branco."});yii.validation.number(value, messages, {"pattern":/^\s*[+-]?\d+\s*$/,"message":"“Ano” deve ser um número inteiro.","skipOnEmpty":1});}},{"id":"signupform-nif","name":"nif","container":".field-signupform-nif","input":"#signupform-nif","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.string(value, messages, {"message":"“Número de Contribuinte” deve ser uma string.","max":24,"tooLong":"“Número de Contribuinte” deve conter no máximo 24 caracteres.","skipOnEmpty":1});}},{"id":"signupform-email","name":"email","container":".field-signupform-email","input":"#signupform-email","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"“Email*” não pode ficar em branco."});value = yii.validation.trim($form, attribute, [], value);yii.validation.email(value, messages, {"pattern":/^[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/,"fullPattern":/^[^@]*<[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?>$/,"allowName":false,"message":"“Email*” não é um endereço de e-mail válido.","enableIDN":false,"skipOnEmpty":1});}},{"id":"signupform-phone","name":"phone","container":".field-signupform-phone","input":"#signupform-phone","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"“Telefone / Telemóvel*” não pode ficar em branco."});value = yii.validation.trim($form, attribute, [], value);yii.validation.string(value, messages, {"message":"“Telefone / Telemóvel*” deve ser uma string.","max":15,"tooLong":"“Telefone / Telemóvel*” deve conter no máximo 15 caracteres.","skipOnEmpty":1});}},{"id":"signupform-password","name":"password","container":".field-signupform-password","input":"#signupform-password","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"“Password*” não pode ficar em branco."});yii.validation.string(value, messages, {"message":"“Password*” deve ser uma string.","min":6,"tooShort":"“Password*” deve conter pelo menos 6 caracteres.","skipOnEmpty":1});}},{"id":"signupform-confirmpassword","name":"confirmPassword","container":".field-signupform-confirmpassword","input":"#signupform-confirmpassword","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"“Confirmar Password*” não pode ficar em branco."});yii.validation.compare(value, messages, {"operator":"==","type":"string","compareAttribute":"signupform-password","compareAttributeName":"SignupForm[password]","skipOnEmpty":1,"message":"Os campos de password devem corresponder."}, $form);}},{"id":"signupform-hasreadtc","name":"hasReadTc","container":".field-signupform-hasreadtc","input":"#signupform-hasreadtc","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"Deve aceitar os termos e condições do site.","requiredValue":1});}}], []); jQuery('#w0').authchoice(); jQuery('#core-customer--login').yiiActiveForm([{"id":"loginform-email","name":"email","container":".field-loginform-email","input":"#loginform-email","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"“Email” não pode ficar em branco."});yii.validation.email(value, messages, {"pattern":/^[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/,"fullPattern":/^[^@]*<[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?>$/,"allowName":false,"message":"“Email” não é um endereço de e-mail válido.","enableIDN":false,"skipOnEmpty":1});}},{"id":"loginform-password","name":"password","container":".field-loginform-password","input":"#loginform-password","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"“Password” não pode ficar em branco."});}},{"id":"loginform-rememberme","name":"rememberMe","container":".field-loginform-rememberme","input":"#loginform-rememberme","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.boolean(value, messages, {"trueValue":"1","falseValue":"0","message":"“Remember me” deve ser “1” ou “0”.","skipOnEmpty":1});}}], []); jQuery('#core-customer--recover').yiiActiveForm([{"id":"passwordresetrequestform-email","name":"email","container":".field-input-email-signup--prf","input":"#input-email-signup--prf","error":".help-block.help-block-error","validate":function (attribute, value, messages, deferred, $form) {value = yii.validation.trim($form, attribute, [], value);yii.validation.required(value, messages, {"message":"“Email” não pode ficar em branco."});yii.validation.email(value, messages, {"pattern":/^[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/,"fullPattern":/^[^@]*<[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?>$/,"allowName":false,"message":"“Email” não é um endereço de e-mail válido.","enableIDN":false,"skipOnEmpty":1});}}], []); function validateDate(day, month, year) { var date = new Date(year, month - 1, day); return date.getFullYear() === year && date.getMonth() + 1 === month && date.getDate() === day; } $('#signup-day, #signup-month, #signup-year').change(function() { let day = parseInt($('#signup-day').val()); let month = parseInt($('#signup-month').val()); let year = parseInt($('#signup-year').val()); if (!isNaN(day) && !isNaN(month) && !isNaN(year)) { if (!validateDate(day, month, year)) { toastr['error']('Por favor, insira uma data válida.'); } } }); $('#core-customer--signup').submit(function(e) { let day = parseInt($('#signup-day').val()); let month = parseInt($('#signup-month').val()); let year = parseInt($('#signup-year').val()); if (!isNaN(day) && !isNaN(month) && !isNaN(year)) { if (!validateDate(day, month, year)) { e.preventDefault(); toastr['error']('Por favor, insira uma data válida.'); } } }); $('.toggle-password').click(function() { $(this).toggleClass('active'); var input = $(this).closest('.input-group').find('input'); if (input.attr('type') === 'password') { input.attr('type', 'text'); $(this).find('i').removeClass('fa-eye').addClass('fa-eye-slash'); } else { input.attr('type', 'password'); $(this).find('i').removeClass('fa-eye-slash').addClass('fa-eye'); } }); $(".registration-modal-btn").on('click', function (event) { event.preventDefault(); grecaptcha.ready(function() { grecaptcha.execute('6LcbsYocAAAAANsCFyKP0sEoHPdN3S0CxNqj5Nnf', {action: 'validate_captcha'}).then(function(token) { // add token to form $('#g-recaptcha-response-signup').val(token); $("#core-customer--signup").submit(); }) }) }) /* VERIFY EMAIL TIMER BTN */ const verifyEmailBtElm = document.querySelector( ".verify-email-modal .verify-email-btn-wrapper" ); if (verifyEmailBtElm) { verifyEmailBtElm.addEventListener("click", () => { verifyEmailBtElm.classList.add('disabled'); setTimeout(() => { verifyEmailBtElm.classList.remove('disabled'); }, 60000); }); } $('#recovery-pass-form-btn').on('click', function (e) { e.preventDefault(); $.post($('#core-customer--recover').attr("action"), $('#core-customer--recover').serialize()) .done(function (result) { $('#recovered').fadeIn(); $("#recovery-pass-form-btn").hide(); toastr['success']('Email Enviado!'); }) .fail(function (error){ console.log(error); }); }); $('#login-no-password-btn').on('click', function (e) { e.preventDefault(); toastr.options = { "preventDuplicates": true, "preventOpenDuplicates": true }; let base_url = 'https://www.marcolino.pt/'; let email = $("#loginform-email").val(); if (email.trim() === '') { toastr['error']('Preencha o campo email.'); return false; } $.ajax({ url: base_url + 'site/generate-login-as-customer?email='+email, type: 'get', success: function(response) { location.reload(); }, error: function(e) { console.log(e); return false; } }); }); $('#core-customer--login').on('submit', function (e) { e.preventDefault(); toastr.options = { "preventDuplicates": true, "preventOpenDuplicates": true }; $.post('/customer/login?lang=pt', $(this).serialize(), function (response) { let status; let message; if (response.status === 'success') { status = 'success'; if (typeof response.message !== 'undefined') { message = response.message; } else { message = 'Succesfull Login'; } } else { status = 'error'; if (typeof response.message !== 'undefined') { message = response.message; } else { message = 'Login Failed, wrong email/password'; } } toastr[status](message); if (response.status === 'success') { location.reload(); } }); }); /* Facebook Pixel Registration event */ $("body").on('click', '.registration-modal-btn', function () { fbq('track', 'CompleteRegistration'); }) /* VERIFY EMAIL TIMER BTN */ const waitTime = 60; // Time in seconds. const urlParams = new URLSearchParams(window.location.search); const verifyEmail = urlParams.get('verify-email'); const email = urlParams.get('email'); const name = urlParams.get('name'); if (verifyEmail) { $(".verify-email-modal").addClass('modal-open'); $(".verify-email-input").html(decodeURIComponent(email)); $(".verify-name-input").html(name); const verifyEmailBtElm = document.querySelector(".verify-email-modal .verify-email-btn-wrapper"); const countdownMessage = document.querySelector(".verify-email-desabled-message .description-text"); if (verifyEmailBtElm && countdownMessage) { verifyEmailBtElm.addEventListener("click", () => { let timeLeft = 60; verifyEmailBtElm.classList.add('disabled'); $.ajax({ url: '/customer/resend-email', type: 'POST', data: { email: decodeURIComponent(email), name: name }, success: function(response) { console.log('Email resent successfully', response); }, error: function(xhr, status, error) { console.error('Error resending email:', error); } }); // Update the countdown every second const interval = setInterval(() => { timeLeft--; if('pt' == 'pt') { countdownMessage.innerHTML = 'aguarde ' +timeLeft+' segundos até ao próximo reenvio'; } else { countdownMessage.innerHTML = 'please wait for ' +timeLeft+' seconds until the next resend'; } if (timeLeft <= 0) { clearInterval(interval); verifyEmailBtElm.classList.remove('disabled'); } }, 1000); if('pt' == 'pt') { countdownMessage.innerHTML = 'aguarde 1 minuto até ao próximo reenvio'; } else { countdownMessage.innerHTML = 'please wait for 1 minute until the next resend'; } setTimeout(() => { clearInterval(interval); // Clear interval to stop the countdown verifyEmailBtElm.classList.remove('disabled'); }, waitTime * 1000); }); const closeModalButton = document.querySelector('#close-modal'); if (closeModalButton) { closeModalButton.addEventListener('click', () => { window.location.href = '/pt' ; }); } } } /* Facebook Pixel Search event */ $("body").on('click', '.search-form--btn', function () { fbq('track', 'Search'); }) jQuery('#newsletterSubscription').yiiActiveForm([{"id":"newsletter-email","name":"email","container":".field-newsletter-email","input":"#newsletter-email","error":".form-control-feedback-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"“Email” não pode ficar em branco."});yii.validation.string(value, messages, {"message":"“Email” deve ser uma string.","skipOnEmpty":1});}}], []); function checkForm(formId) { var form = $("#" + formId), data = form.data("yiiActiveForm"); $.each(data.attributes, function () { this.status = 3; }); form.yiiActiveForm("validate"); if (form.find('.has-error').length == 0) { return true; } return false; } $('.newsletter-btn').on('click', function (e) { let newsletterFooter = $(this).closest('form'); checkForm(newsletterFooter.attr('id')); if ($.trim(newsletterFooter.find('.newsletter-input').val()).length) { if (checkForm(newsletterFooter.attr('id'))) { if ($('#newsletter-checkbox').is(':checked')) { $.post( newsletterFooter.attr("action"), newsletterFooter.serialize() ).done(function (response) { /*if (response.status == 'success') { var info = $('.newsletter-info .inf'); info.html(response.message); $('#newsletter-form').trigger("reset"); } else { var info = $('.newsletter-info .inf'); info.html(response.message); }*/ toastr[response.status](response.message); }).fail(function () { console.log("server error"); }); return false; } else { $('.form-control-feedback-error').text('Por favor aceite a Política de Privacidade em baixo'); } } } }); $('.main-footer--title').on('click', function (e) { $(this).parent().toggleClass('active'); }); $('.loginForm').on('submit', function (e) { e.preventDefault(); $.post($(this).attr("action"), $(this).serialize(), function (response) { let status; let message; if (response.status === 'success') { status = 'success'; if (typeof response.message !== 'undefined') { message = response.message; } else { message = 'Succesfull Login'; } } else { status = 'error'; if (typeof response.message !== 'undefined') { message = response.message; } else { message = 'Login Failed, wrong email/password'; } } toastr[status](message); if (status == 'success') { window.setTimeout(function() { location.reload(); }, 1000); } }); }); if ("0" == 0) { $("#cookies-modal").addClass("modal-open"); } $("#cookiesShowHideBtn").click(function() { $("#cookieRolexWrapper").collapse('toggle'); $("#cookiesShowHideBtn i").toggleClass("fa-angle-down"); $("#cookiesShowHideBtn i").toggleClass("fa-angle-up"); }) $("#cookies-btn").click(function () { let siteCookies = 1; let rolexCookies = $("#rolexCookiesInput").is(":checked") ? 1 : 0; $(this).removeClass("gold"); $(".cookies-modal-wrapper").addClass("modal-loading"); $("#cookies-modal").removeClass("modal-open"); if(rolexCookies && "brands" == "rolex"){ if (("brands" == 'rolex') && "prod" == 'dev') { let scriptEle = document.createElement("script"); scriptEle.setAttribute("src", "//assets.adobedtm.com/7e3b3fa0902e/7ba12da1470f/launch-73c56043319a-staging.min.js"); document.body.appendChild(scriptEle); } if (("brands" == 'rolex') && "prod" == 'prod') { let scriptEle = document.createElement("script"); scriptEle.setAttribute("src", "//assets.adobedtm.com/7e3b3fa0902e/7ba12da1470f/launch-5de25e657d80.min.js"); document.body.appendChild(scriptEle); } // _satellite.setDebug(true); // _satellite.setVar("Analyticsconsent", "true"); // _satellite.setVar("pageView"); if("item" == "contacts") { var digitalDataLayer = {environment: { environmentVersion: "V7", coBrandedVersion: "Bespoke", environmentName: "prod"}, page: { pageType: "store contact page"}}; } if("item" == "servicing-procedure") { var digitalDataLayer = {environment: { environmentVersion: "V7", coBrandedVersion: "Bespoke", environmentName: "prod"}, page: { pageType: "servicing procedure page"}}; } if("item" == "servicing") { var digitalDataLayer = {environment: { environmentVersion: "V7", coBrandedVersion: "Bespoke", environmentName: "prod"}, page: { pageType: "servicing your rolex page"}}; } if("item" == "showroom") { var digitalDataLayer = {environment: { environmentVersion: "V7", coBrandedVersion: "Bespoke", environmentName: "prod"}, page: { pageType: "showroom page"}}; } if("item" == "baselworld") { var digitalDataLayer = {environment: { environmentVersion: "V7", coBrandedVersion: "Bespoke", environmentName: "prod"}, page: { pageType: "new watches page"}}; } if("item" == "history") { var digitalDataLayer = {environment: { environmentVersion: "V7", coBrandedVersion: "Bespoke", environmentName: "prod"}, page: { pageType: "history page"}}; } if("item" == "index") { var digitalDataLayer = {environment: { environmentVersion: "V7", coBrandedVersion: "Bespoke", environmentName: "prod"}, page: { pageType: "home page"}}; } if("item" == "festive-selection") { var digitalDataLayer = {environment: { environmentVersion: "V7", coBrandedVersion: "Bespoke", environmentName: "prod"}, page: { pageType: "festive page"}}; } if("item" == "collection") { //next validation is needed to verify if collection has param item to define if is a specific collection or male, female, gold agroupment, that is considered family page. if not is a collection page if("1"){ var digitalDataLayer = {environment: { environmentVersion: "V7", coBrandedVersion: "Bespoke", environmentName: "prod"}, page: { pageType: "family page"}}; }else{ var digitalDataLayer = {environment: { environmentVersion: "V7", coBrandedVersion: "Bespoke", environmentName: "prod"}, page: { pageType: "collection page"}}; } } if("item" == "world-rolex") { //next validation is needed to verify if collection has param item to define if is a specific collection or male, female, gold agroupment, that is considered family page. if not is a collection page if("1"){ var digitalDataLayer = {environment: { environmentName: "prod"}, page: { pageType: "article page"}}; }else{ var digitalDataLayer = {environment: { environmentName: "prod"}, page: { pageType: "article hub page"}}; } } } $.ajax({ type: "POST", url: "/site/accept-cookies?lang=pt", context: document.body, data: { 'siteCookies': siteCookies, 'rolexCookies': rolexCookies } }).done(function() { if ($("#cookiesShowHideBtn").hasClass("fa-angle-up")) { $("#cookiesShowHideBtn").click(); } // show popup newsletter after 30 seconds setTimeout(() => { $(".modal-wrapper.popup-newsletter").addClass("modal-open"); }, 30000); }); }); $(".modal-btn--ok").click(function() { $('#form-modal').modal('hide'); submitForm = 1; formElem.submit(); }); let body = $('body'); let mainFormModal = $('#main-form--modal'); let headerMenu = $('.header-menu'); let openModal = false; /* MODAL JS */ $('body').on('click', ".modal-btn", function(e) { /* in case it's a link or a submit button */ e.preventDefault(); // $('.search-btn').toggleClass('search-border') let modalRel = $(this).attr('rel'); let modal = $('.modal-wrapper[rel="' + modalRel + '"]'); let data = {}; // Just for insurance modal if ($(this).data('id')) { if ($(this).data('id') == "objectInsurance") { $("#returnInsurance").hide(); $("#objectInsurance").show(); } else { $("#objectInsurance").hide(); $("#returnInsurance").show(); } } $.each($(this).data(), function(index, value) { data[index] = value; }); if (modal.length > 0) { // let openModal = true; openModal = !openModal; /* if it has an action, it's a form */ if (typeof data.action !== 'undefined') { $.post('/forms/render?lang=pt', data, function (response) { if (response.status === 'ok') { let content = modal.find('.form-content'); content.html(response.html); } else { openModal = false; } }); } if (openModal == true) { modal.addClass('modal-open'); body.addClass('no-scroll'); if (headerMenu.hasClass('menu-open')) { headerMenu.removeClass('menu-open'); body.removeClass('no-scroll'); // modal.removeClass('modal-open'); } if (data.action == 'login') { modal.find('li.tab-btn[tab=login]').trigger('click'); } else { modal.find('li.tab-btn[tab=register]').trigger('click'); } } else { modal.removeClass('modal-open'); body.removeClass('no-scroll'); } } }); $('.close-modal').on('click', function () { $('.modal-wrapper.modal-open').removeClass('modal-open'); mainFormModal.find('.form-content').empty(); $('body').removeClass('no-scroll'); }); mainFormModal.on('afterValidate', 'form', function (e) { if ($(this).find(".has-error").length !== 0) { return false; } }); mainFormModal.on('submit', 'form', function (e) { e.preventDefault(); mainFormModal.removeClass('modal-open'); $('body').removeClass('no-scroll'); $.post('/forms/handle?lang=pt', $(this).serialize(), function (response) { let status; let message; if (response.status === 'ok') { status = 'success'; if (typeof response.message !== 'undefined') { message = response.message; } else { message = 'Pedido submetido com sucesso. Entraremos em contacto consigo'; } } else { status = 'error'; if (typeof response.message !== 'undefined') { message = response.message; } else { message = 'Houve um problema ao submeter o formulário'; } } toastr[status](message); }); }); $('body').on('click', '.core-add--to-wishlist', function(event) { event.preventDefault(); let product = $(this).attr('data-id'); let submitData = {product: product}; $.getJSON("/products/add-to-wishlist?lang=pt", submitData, function(response) { if(response.success) { $('.core-add--to-wishlist[data-id=' + product + ']').toggleClass('active'); /* Facebook pixel add to wishlist event */ if ($('.core-add--to-wishlist[data-id=' + product + ']').hasClass('active') && 1) { fbq('track', 'AddToWishlist'); } if ('dashboard' === 'item') { location.reload(); } else { $(".wishlist-link-counter").text("("+response.totalWishlist+")"); } } }); }); /* === STEPS NAVIGATION === */ const handleIdNavigation = (idStep) => { const activeStep = document.querySelector(".form-content-active"); const nextStep = document.querySelector(".form-content[data-step='" + idStep + "']"); const activeStepBullet = document.querySelector(".form-step.active"); const nextStepBullet = document.querySelector(".form-step[data-step='" + idStep + "']"); const elmResume = document.querySelector(".modal-form-resume"); if(activeStep && nextStep && activeStepBullet && idStep){ if (idStep == 3) { elmResume.classList.add("show"); } else { elmResume.classList.remove("show"); } activeStep.classList.remove("form-content-active"); activeStep.classList.add("d-none"); nextStep.classList.add("form-content-active"); nextStep.classList.remove("d-none"); activeStepBullet.classList.remove("active"); nextStepBullet.classList.add("active"); } } const validateFields = (idStep) => { let formData = {}; var isValid = true; switch (idStep) { case "2": let step1 = $('#step-1').serialize(); decodeURIComponent(step1).split('&').forEach(function (pair) { pair = pair.split('='); formData[pair[0]] = pair[1] || ''; }); let requiredFields = document.querySelectorAll('#step-1 [required]'); requiredFields.forEach(function (field) { let fieldName = field.name; if (!formData[fieldName]) { isValid = false; field.style.cssText = 'border:1px solid rgb(165, 0, 0)!important;'; } else { field.style.border = ''; } }); return isValid; break; case "3": if(validateFields("2")) { let checkboxes = document.querySelectorAll('.btn-checkbox'); let checkboxesChoices = document.querySelectorAll('.btn-checkbox-choice'); let typeChecked = Array.from(checkboxes).some(function (checkbox) { return checkbox.checked; }); let choicesChecked = Array.from(checkboxesChoices).some(function (checkbox) { return checkbox.checked; }); if(!typeChecked) { isValid = false; let errorSelection = document.querySelector(".error-selection"); if(errorSelection == null) { let warningMessage = document.createElement('div'); warningMessage.className = 'help-block help-block-error error-selection'; warningMessage.textContent = 'Tem de escolher uma das opções.'; warningMessage.style = 'color: #a50000;display:block;text-align:center;margin-bottom:10px'; let formButtonsSelectionDiv = document.querySelector(".form-buttons-selection"); formButtonsSelectionDiv.parentNode.insertBefore(warningMessage, formButtonsSelectionDiv); } } else { let errorSelection = document.querySelector(".error-selection"); if(errorSelection != null) { errorSelection.remove() } } if(!choicesChecked) { isValid = false; let errorOptions = document.querySelector(".error-options"); if(errorOptions == null) { let warningMessageChoice = document.createElement('div'); warningMessageChoice.className = 'help-block help-block-error error-options'; warningMessageChoice.textContent = 'Tem de escolher uma das opções.'; warningMessageChoice.style = 'color: #a50000;display:block;text-align:center;margin-bottom:10px'; let formButtonsSelectionDivChoice = document.querySelector(".form-checkbox-options"); formButtonsSelectionDivChoice.parentNode.insertBefore(warningMessageChoice, formButtonsSelectionDivChoice); } }else { let errorOptions = document.querySelector(".error-options"); if(errorOptions != null) { errorOptions.remove() } } return isValid; } else { return false; } break; default: return true; break; } } const elmNavNextButton = document.querySelectorAll(".next-step"); if(elmNavNextButton && elmNavNextButton.length > 0){ elmNavNextButton.forEach((node) =>{ node.addEventListener("click",(e)=>{ e.preventDefault(); let idStep = node.getAttribute("data-step"); if(idStep){ let isValid = validateFields(idStep); if(isValid) { handleIdNavigation(idStep); } } scrollToTop(); }) }); } const elmNavPrevButton = document.querySelectorAll(".back-step"); if(elmNavPrevButton && elmNavPrevButton.length > 0){ elmNavPrevButton.forEach((node) =>{ node.addEventListener("click",(e)=>{ e.preventDefault(); let idStep = node.getAttribute("data-step"); if(idStep){ handleIdNavigation(idStep); } scrollToTop(); }) }) } const elmNavBullets = document.querySelectorAll('.form-steps-wrapper .form-step'); if(elmNavBullets && elmNavBullets.length > 0){ elmNavBullets.forEach((node) =>{ node.addEventListener("click",(e)=>{ e.preventDefault(); let idStep = node.getAttribute("data-step"); if(idStep){ let isValid = validateFields(idStep); if(isValid) { handleIdNavigation(idStep); } } scrollToTop(); }) }) } /* === UPLOAD FILE === */ const elmWarrantyCheck = document.querySelectorAll(".warranty-upload"); //console.log(elmWarrantyCheck) if(elmWarrantyCheck){ elmWarrantyCheck.forEach((node)=>{ node.addEventListener("click", (e)=>{ node.closest(".file-upload-wrapper").classList.toggle("active"); }) }) } const elmWarrantyButtonUpload = document.querySelector(".open-warranty-file"); const elmWarrantyFileUpload = document.querySelector(".warranty-file"); if(elmWarrantyButtonUpload && elmWarrantyFileUpload){ elmWarrantyButtonUpload.addEventListener("click",()=>{ elmWarrantyFileUpload.click(); }) } const btnProblem = document.querySelectorAll(".btn-problem"); if (btnProblem && btnProblem.length > 0) { btnProblem.forEach((node) => { node.addEventListener("click", (e) => { e.preventDefault(); btnProblem.forEach((btn) => { if (btn !== node) { const btnCheckbox = btn.querySelector(".btn-checkbox"); if (btnCheckbox) { btnCheckbox.removeAttribute("checked"); } btn.classList.remove("btn-selected"); btn.classList.remove("grey"); btn.classList.add("grey-clear"); } }); const btnCheckbox = node.querySelector(".btn-checkbox"); if (btnCheckbox) { btnCheckbox.setAttribute("checked", "true"); } node.classList.add("btn-selected"); node.classList.remove("grey-clear"); node.classList.add("grey"); }); }); } const scrollToTop = () => { const modal = document.querySelector('.modal-wrapper.repairs-modal'); if (modal) { modal.scrollTo({ top: 0, behavior: 'smooth' }); } }; jQuery('#newsletterSubscriptionPopup').yiiActiveForm([{"id":"newsletter-name","name":"name","container":".field-newsletter-name","input":"#newsletter-name","error":".form-control-feedback-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.string(value, messages, {"message":"“Name” deve ser uma string.","skipOnEmpty":1});}},{"id":"newsletter-email","name":"email","container":".field-newsletter-email","input":"#newsletter-email","error":".form-control-feedback-error","validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"“Email” não pode ficar em branco."});yii.validation.string(value, messages, {"message":"“Email” deve ser uma string.","skipOnEmpty":1});}}], []); function checkForm(formId) { var form = $("#" + formId), data = form.data("yiiActiveForm"); $.each(data.attributes, function () { this.status = 3; }); form.yiiActiveForm("validate"); if (form.find('.has-error').length == 0) { return true; } return false; } $('.newsletter-btn-popup').on('click', function (e) { let newsletterFooter = $(this).closest('form'); checkForm(newsletterFooter.attr('id')); if ($.trim(newsletterFooter.find('.newsletter-input-popup').val()).length) { if (checkForm(newsletterFooter.attr('id'))) { $.post( newsletterFooter.attr("action"), newsletterFooter.serialize() ).done(function (response) { /*if (response.status == 'success') { var info = $('.newsletter-info .inf'); info.html(response.message); $('#newsletter-form').trigger("reset"); } else { var info = $('.newsletter-info .inf'); info.html(response.message); }*/ // toastr[response.status](response.message); $("#popup-newletter-message").html(response.message); $("#popup-newletter-message").show(); if (response.status == 'success' || response.status == 'warning'){ if(response.status == 'success') { $("#popup-newsletter-form").hide(); $("#popup-newsletter-title").html("Obrigado"); $("#popup-newsletter-description").html("Irá receber um email com ofertas exclusivas
"); } setTimeout(() => { $(".modal-wrapper.popup-newsletter").removeClass("modal-open"); }, 3000); } }).fail(function () { console.log("server error"); }); return false; } } }); $('.close-modal').on('click', function (e) { $.ajax({ type: "POST", url: '/site/set-cookie-newsletter-subscription-popup-waiting24hours' }).success(function(data) { console.log(data); }).fail(function(jqXHR, textStatus, errorThrown) { alert('Error: ' + errorThrown); }); // $.cookie('newsletterSubscriptionPopupWaiting24hours', 1, { // expires: 1, // path: '/' // }); }); });-->