Damska odzież Self Portrait | Moliera 2 (2023)

Zgadzam się na otrzymywanie od Moliera2 komunikacji marketingowej drogą elektroniczną dotyczącej tej spółki i jej partnerów.

Zgadzam się na otrzymywanie od Moliera2 komunikacji marketingowej drogą telefoniczną dotyczącej tej spółki i jej partnerów.

' + '

' + '

' + '

' + '

' + '

' + '

' + '

' + '

' ); } ; function moveMenu() { if (typeof window.viewport !== 'undefined' && typeof window.viewport === 'function') { var width = window.viewport().width; if (!wrapped && width < 768) { $submenu.detach().appendTo($target); wrapped = true; } else if (wrapped && width >= 768) { $submenu.detach().appendTo($submenu_parent); wrapped = false; } } } function handleResize() { if ($submenu.length > 0 && $wrapper.length > 0 && $target.length > 0) { moveMenu(); } else { return; } } //init (function () { $submenu_parent = $(config['pages-sub-menu']).parent(); wrapped = false; renderMenuWrapper(); $submenu = $(config['pages-sub-menu']); $wrapper = $(config['wrapper']); $target = $(config['target']); $(window).on('resize', handleResize); handleResize(); })();})();$(document).on('ready pjax:complete', function () { var menu = $('.sub-menu-feature-designer'), subMenu = menu.find('li'), arr = makeArray(subMenu), step = parseInt(arr.length / 3), max = arr.length, leftCol = arr.slice(0, step + 1), centerCol = arr.slice(step + 1, step + step + 1), rightCol = arr.slice(step + step + 1, arr.length); if (subMenu.size() > 20) { if (menu.find('.leftCol').size() == 0) { div = $('

        • '); menu.find('ul').html(div); for (var i = 0; i <= leftCol.length; i++) { menu.find('ul .leftCol ul').append(leftCol[i]); } for (var l = 0; l <= centerCol.length; l++) { menu.find('ul .centerCol ul').append(centerCol[l]); } for (var l = 0; l <= rightCol.length; l++) { menu.find('ul .rightCol ul').append(rightCol[l]); } } } else { menu.find('.dropdown-menu').css('width', 'auto'); }});/* * Berryproject sp. z o.o. * * Jakub Radziwon * author: jr@berryproject.com */(function () { window.sendDataLayerWishlist = function (resp) { data = resp.data_product_ga; if (!data) { return; } if (data.size_id == null) { data.size_id = data.id + ''; } let ga4Item = { 'item_name': data.name, 'item_id': data.id + '', 'price': data.price, 'item_brand': data.brand, 'item_list_name': data.list, 'item_list_id': data.list, 'index': 0, 'item_variant': data.color, 'quantity': 1 + '', 'item_child_id': data.size_id, }; data.categories.forEach(function (category, index) { if (index === 0) { ga4Item['item_category'] = category; return; } ga4Item['item_category' + (index + 1)] = category; }); let dataDl = { 'event': 'ecommerce', 'action': 'add_to_wishlist', 'ecommerceGA4': { 'event': 'add_to_wishlist', 'ecommerce': { 'items': [ga4Item] }, }, 'google_tag_params': { 'ecomm_pagetype': 'add_to_wishlist', 'ecomm_prodid': data.id + '', //id produktu 'ecomm_totalvalue': data.price + '', // cena produktu 'ecomm_category': data.categories.join(' > ')// kategoria produktu }, 'nonInteractionHit': false }; dataLayer.push(dataDl); if (typeof SR === 'undefined') { return; } // Synerise events const synProduct = { 'sku': data.id, 'brand': data.brand, 'name': data.name, 'category': data.categories.join(' > '), 'categories': data.categories, 'regularPrice': data.base_price, 'salePrice': data.price, 'finalUnitPrice': data.price, 'color': data.color, 'gender': data.gender, 'sizeId': data.size_id, 'size': data.original_size_name, }; SR.event.trackCustomEvent('product.addToFavorite', synProduct, 'ProductAddToFavorite'); }; if (!$.cookie('cart_id')) { $.cookie('cart_id', Math.floor(Date.now() / 1000), {expires: 365, path: "/"}); } var product = { changeSize: changeSize, addToCart: addToCart, gaProductAddCart: gaProductAddCart, gaProductRemoveCart: gaProductRemoveCart, addToCartGift: addToCartGift, removeFromCart: removeFromCart, changeProductAmount: changeProductAmount, addToWishlist: addToWishlist, removeFromWishlist: removeFromWishlist, updateAmount: updateAmount, checkAgreements: checkAgreements, addInfoOrderDeliveryUps: addInfoOrderDeliveryUps, }; product.changeSize(); product.addToCart(); product.addToCartGift(); product.removeFromCart(); product.changeProductAmount(); product.addToWishlist(); product.removeFromWishlist(); product.updateAmount(); product.checkAgreements(); product.addInfoOrderDeliveryUps(); $(document).on('pjax:complete', function (e) { product.changeSize(); product.checkAgreements(); product.addInfoOrderDeliveryUps(); }); function gaProductAddCart(data, quantity = 1) { if (!data.id) { return; } let category = ""; if (data.categories) { category = data.categories.join(' > '); } let gaItem = { 'name': data.name, 'id': data.id + '', 'price': data.price, 'brand': data.brand, 'list': data.list, 'position': parseInt(data.position), 'category': category, 'quantity': parseInt(quantity), 'dimension14': data.size_id, 'variant': data.size_name, }; let ga4Item = { 'item_name': data.name, 'item_id': data.id + '', 'price': data.price, 'item_brand': data.brand, 'item_list_name': data.list, 'item_list_id': data.list, 'index': parseInt(data.position), 'item_variant': data.color, 'quantity': quantity + '', 'item_child_id': data.size_id, }; data.categories.forEach(function (category, index) { if (index === 0) { ga4Item['item_category'] = category; return; } ga4Item['item_category' + (index + 1)] = category; }); let jsonClick = { 'event': 'ecommerce', 'action': 'addToCart', 'ecommerce': { 'currencyCode': 'PLN', 'add': { 'products': [gaItem], } }, 'ecommerceGA4': { 'event': 'add_to_cart', 'ecommerce': { 'items': [ga4Item], } }, 'google_tag_params': { 'ecomm_pagetype': 'add_to_cart', 'ecomm_prodid': data.id + '', //product ids 'ecomm_totalvalue': data.price, // wartosc koszyka 'ecomm_category': category, }, 'nonInteractionHit': false, }; dataLayer.push(jsonClick); if (typeof SR === 'undefined') { return; } // Synerise events const synProduct = { 'sku': data.id, 'quantity': parseInt(quantity), 'brand': data.brand, 'name': data.name, 'category': category, 'categories': data.categories, 'regularPrice': data.base_price, 'salePrice': data.price, 'finalUnitPrice': data.price, 'color': data.color, 'gender': data.gender, 'sizeId': data.size_id, 'size': data.original_size_name, }; const synProductAdd = synProduct; if (typeof data.reco_id !== 'undefined') { synProductAdd.reco_id = data.reco_id; } SR.event.trackCustomEvent('product.addToCart', synProductAdd, 'ProductAddToCart'); window.cartStatus.products.push(synProduct); window.cartStatus.totalAmount = Math.round(parseFloat(window.cartStatus.totalAmount) + parseFloat(data.price)); window.cartStatus.totalQuantity += synProduct.quantity; window.cartStatus.totalDiscount += (synProduct.regularPrice - synProduct.finalUnitPrice) + data.kkDiscount; window.cartStatus.totalDiscountKk += data.kkDiscount; SR.event.trackCustomEvent('cart.status', window.cartStatus); } function gaProductRemoveCart(data, quantity = 1) { if (!data.id) { return; } let category = ""; if (data.categories) { category = data.categories.join(' > '); } let gaItem = { 'name': data.name, 'id': data.id + '', 'price': data.price, 'brand': data.brand, 'list': data.list, 'position': parseInt(data.position), 'category': category, 'quantity': parseInt(quantity), 'dimension14': data.size_id, 'variant': data.size_name, }; let ga4Item = { 'item_name': data.name, 'item_id': data.id + '', 'price': data.price, 'item_brand': data.brand, 'item_list_name': data.list, 'item_list_id': data.list, 'index': parseInt(data.position), 'item_variant': data.color, 'quantity': quantity + '', 'item_child_id': data.size_id, }; data.categories.forEach(function (category, index) { if (index === 0) { ga4Item['item_category'] = category; return; } ga4Item['item_category' + (index + 1)] = category; }); let jsonClick = { 'event': 'ecommerce', 'action': 'removeFromCart', 'ecommerce': { 'currencyCode': 'PLN', 'remove': { 'products': [gaItem], } }, 'ecommerceGA4': { 'event': 'remove_from_cart', 'ecommerce': { 'items': [ga4Item], } }, 'nonInteractionHit': false, }; dataLayer.push(jsonClick); if (typeof SR === 'undefined') { return; } // Synerise events const synProduct = { 'sku': data.id, 'quantity': parseInt(quantity), 'brand': data.brand, 'name': data.name, 'category': category, 'categories': data.categories, 'regularPrice': data.base_price, 'salePrice': data.price, 'finalUnitPrice': data.price, 'color': data.color, 'gender': data.gender, 'sizeId': data.size_id, 'size': data.original_size_name, }; SR.event.trackCustomEvent('product.removeFromCart', synProduct, 'ProductRemoveFromCart'); window.cartStatus.products = window.cartStatus.products.filter(function (cartProduct) { return cartProduct.sizeId !== synProduct.sizeId; }); window.cartStatus.totalAmount = Math.round(parseFloat(window.cartStatus.totalAmount) - parseFloat(data.price)); window.cartStatus.totalQuantity -= synProduct.quantity; window.cartStatus.totalDiscount -= (synProduct.regularPrice - synProduct.finalUnitPrice) + data.kkDiscount; window.cartStatus.totalDiscountKk -= data.kkDiscount; SR.event.trackCustomEvent('cart.status', window.cartStatus); } function changeSize() { $(document).on('click', '.product-other-sizes-list li', function (e) { e.preventDefault(); var id = $(this).attr('data-id'); var that = this; if ($(this).attr('data-sell_price') > 0) { if ($(this).attr('data-sell_price') == $(this).attr('data-base_price')) { $(this).parents('.product-view').find('.product-price-regular').show(); $(this).parents('.product-view').find('.product-price-sale').hide(); $(this).parents('.product-view').find('.product-price-sell-price').html($(this).attr('data-formatted_sell_price') + ' ' + window.translate('zł')); } else { if ($('.product-price-sale').length > 0) { $(this).parents('.product-view').find('.product-price-regular').hide(); $(this).parents('.product-view').find('.product-price-sale').show(); $(this).parents('.product-view').find('.product-price-sell-price').html($(this).attr('data-formatted_sell_price') + ' ' + window.translate('zł')); $(this).parents('.product-view').find('.product-price-base-price').html($(this).attr('data-formatted_base_price') + ' ' + window.translate('zł')); $(this).parents('.product-view').find('.product-price-discount').html('-' + $(this).attr('data-promotion_percent') + '%'); } } $('#cartproduct-sell_price').val($(this).attr('data-sell_price')); $('#cartproduct-base_price').val($(this).attr('data-base_price')); } const productOtherSizeDisabled = e.target.closest('li'); if (productOtherSizeDisabled && productOtherSizeDisabled.className.includes('product-other-size-disabled')) { return false; } $('.product-size-' + id).val($(this).attr('sid')); }); if ($('.lowest-size-id').length > 0) { $('.product-other-sizes-list li.ul-li-size-data-id-' + $('.lowest-size-id').attr('data-id')).trigger('click'); } } function addToCart() { $(document).on('pjax:complete click', '.product-other-sizes-list li', function (e) { const {productid, sizeid} = e.target.dataset; const productDisabled = e.target.closest('.product-other-sizes-list li'); const productSize = document.querySelector(`.product-size.product-size-${productid}`); let productSizeValue = ''; if (productSize && productSize.value !== '') productSizeValue = productSize.value; if (!productSizeValue && (productDisabled && productDisabled.className.includes('product-other-size-disabled'))) { [...document.querySelectorAll('.addToCartPopup .popup.product-add-to-cart-btn.add-to-cart')].forEach(e => e.dataset.dismiss = ''); return false; } ; [...document.querySelectorAll('.addToCartPopup .popup.product-add-to-cart-btn.add-to-cart')].forEach(e => e.dataset.dismiss = 'modal'); }); $(document).on('pjax:complete ready', function (e) { if ($('.product-view').length == 1 && $('.product-view').data('id')) { $.ajax('/product/check-express-payment?id=' + $('.product-view').data('id')).done(function (e) { if (e.html) { $('.add-to-cart-container').html(e.html); if ($('.add-to-cart-container').length > 0) { $('.product-add-to-wishlist-btn').hide(); } } }); } }); $(document).on("click", ".add-to-cart", function (e) { e.preventDefault(); var id = $(this).attr('data-id'); var selector = '.product-view-' + $(this).attr('data-id') + ' '; var size_id = $(selector + ".product-size-" + id).val(); if ($(selector + ' .giftcard_type-container').length == 1) { if ($(selector + ' .giftcard_type').is(':checked') == false) { $(selector + ' .giftcard_type-container .help-block-error').html('Wybierz Kartę Elektroniczną lub Eko-kartę'); return false; } } $(selector + '.addToCartPopup').removeClass('error'); if (size_id == '') {// $(selector + '.addToCartPopup .success').css('display', 'none');// $(selector + '.addToCartPopup .error').css('display', 'block');// $(selector + '.addToCartPopup .error').html(window.translate('Wybierz rozmiar.'));//// $(selector + '.addToCartPopup').modal('show');// $(selector + '.addToCartPopup').addClass('error'); const productOtherSizesList = document.querySelector(`.product-other-sizes-list[data-id="${id}"]`); productOtherSizesList.style.display = 'block';// const form = e.target.closest('form');// const uSe = form.querySelector('.universal-size');// alert(uSe); return false; } $(selector + '.cart-product-form-key-' + id).val(id + '_' + size_id); $(selector + '.cart-product-form-additional_data-' + id).val('{"size_id": ' + size_id + '}'); data = $(selector + '.cart-product-form-' + id).serialize(); var thatButton = this; $.post("/cart/add-product", data).success(function (resp) { resp = JSON.parse(resp); if (resp.success) { $(selector + '.addToCartPopup').find('.error').hide(); $(selector + '.addToCartPopup').find('.success').show(); var giftCardType = $(selector + ' input[name=giftcard_type]:checked'); if (giftCardType.length > 0) { var giftCardTypeText = 'Karta Prezentowa (eco-karta)'; if($(selector + '.addToCartPopup').find('#get-eco-cart')){ $(selector + '.addToCartPopup').find('#get-eco-cart').html('Pamiętaj, że kupując Kartę Prezentową, musi być ona
          jedynym produktem w koszyku.'); } if (giftCardType[0].value == "virtual") { giftCardTypeText = 'Karta Prezentowa (elektroniczna)'; if($(selector + '.addToCartPopup').find('#get-eco-cart')) { $(selector + '.addToCartPopup').find('#get-eco-cart').html(''); } } $(selector + '.addToCartPopup').find('.product-name').html(giftCardTypeText); }// $(selector + '.addToCartPopup').find('.product-size').find('span').html($(selector +'.product-other-sizes-value').text()); let elSizeId = $(selector); elSizeId = elSizeId[0].dataset.id; const productOtherSizesValue = document.querySelector(`.product-other-sizes-value[data-id="${elSizeId}"]`); $(selector + '.addToCartPopup').find('.product-size').find('span').html(productOtherSizesValue.innerText); if (typeof sareX_core != 'undefined') { var execute_params = {'_email': false, '_cartadd': { 'country': 'PL', 'language': 'pl', 'cart_id': $.cookie("cart_id"), 'product_id': id, 'price': $('#cartproduct-sell_price').val(), 'currency': 'pln', 'quantity': 1} }; sareX_core.execute(10, execute_params); } if (Boolean(glami)) { var glamiCartProduct = { item_ids: [$(selector + '[name="CartProduct[id]"').val()], product_names: [$(selector + '[name="CartProduct[name]"').val()], value: $('selector+[name="CartProduct[sell_price]"').val(), // product price currency: 'CZK' // product price currency }; glami('track', 'AddToCart', glamiCartProduct); } var brand = $(selector + '.designer-name a').text().trim(); if (brand == '') { brand = $(selector + '.product-list-item-feature-designer').text().trim(); } var ga_data = { 'id': $(selector + '[name="CartProduct[id]"').val(), 'name': $(selector + '[name="CartProduct[name]"').val(), 'brand': brand, 'price': $(selector + '[name="CartProduct[sell_price]"').val(), 'quantity': 1 }; if ($(selector + 'li[sid="' + size_id + '"]').attr('data-size')) { ga_data.variant = $(selector + 'li[sid="' + size_id + '"]').attr('data-size').trim(); } dataLayer.push({ "event": "autoEvents", "eventCategory": "UX", "eventAction": "click", "eventLabel": "add to cart" }); if ($('.ga-product-view-item-' + id).length > 0) { let data_dl = $('.ga-product-view-item-' + id).data('product-ga'); if (data_dl.id) { data_dl.size_id = size_id; data_dl.size_name = $(selector + 'li[sid="' + size_id + '"]').attr('data-size').trim(); data_dl.original_size_name = $(selector + 'li[sid="' + size_id + '"]').attr('data-original-size'); product.gaProductAddCart(data_dl, 1) } } if ($(thatButton).hasClass('express-payment')) { dataLayer.push({ "event": "autoEvents", "eventCategory": "UX", "eventAction": "click", "eventLabel": "express-payment" }); location.href = "/order/login-register"; return; } if ($(thatButton).parents('#order_index_wishlist_carousel').length > 0) { const productView = $('.ga-product-list-item.product-view-' + id); if ($(productView).length > 0) { let data_dl = $(productView).data('product'); if (data_dl.id) { data_dl.size_id = size_id; data_dl.size_name = $(selector + 'li[sid="' + size_id + '"]').attr('data-size').trim(); data_dl.original_size_name = $(selector + 'li[sid="' + size_id + '"]').attr('data-original-size'); data_dl.reco_id = 'j3aE5QmeOsbd'; product.gaProductAddCart(data_dl, 1) } } $('.addToCartPopup').modal('hide'); document.location.reload(); return; } } else { $(selector + '.addToCartPopup').find('.success').hide(); $(selector + '.addToCartPopup').find('.error').show(); if (resp.message == "Product already in your cart") { if (id == 1835620) { $(selector + '.addToCartPopup').find('.modal-header-title.error').html('

          ' + window.translate('WYBIERZ INNĄ WARTOŚĆ KARTY') + '

          '); $(selector + '.addToCartPopup').find('.modal-body .error').html( '

          ' + '

          Aby zakupić drugą Kartę Prezentową o tej samej wartości, złóż kolejne zamówienie.

          ' + '

          ' + '

          ' ); } else { $(selector + '.addToCartPopup').find('.modal-header-title.error').html('

          ' + window.translate('Produkt jest już w koszyku.') + '

          '); } } else if (resp.message == "Too large amount of product") { $(selector + '.addToCartPopup').find('.modal-header-title.error').html('

          ' + window.translate('Brak rozmiaru w magazynie.') + '

          '); } else if ((resp.message == "GiftCart real already in your cart")){ $(selector + '.addToCartPopup').find('.modal-header-title.error').html('

          ' + window.translate('Uwaga!
          W Twoim koszyku znajduje się
          Karta Prezentowa Fizyczna, której zakup
          jest osobnym zamówieniem.
          Dodanie karty elektronicznej
          do koszyka jest niemożliwe.') + '

          '); }else if ((resp.message == "GiftCart virtual already in your cart")){ $(selector + '.addToCartPopup').find('.modal-header-title.error').html('

          ' + window.translate('Uwaga!
          W Twoim koszyku znajduje się
          Karta Prezentowa Elektroniczna, której zakup
          jest osobnym zamówieniem.
          Dodanie karty fizycznej
          do koszyka jest niemożliwe.') + '

          '); }else if ((resp.message == "GiftCart real already in your cart, can not add product")){ $(selector + '.addToCartPopup').find('.modal-header-title.error').html('

          ' + window.translate('Uwaga!
          W Twoim koszyku znajduje się
          Karta Prezentowa Fizyczna, której zakup
          jest osobnym zamówieniem.
          Dodanie kolejnego produktu
          do koszyka jest niemożliwe.') + '

          '); } else if(resp.message == "Other Products in cart, gift cart"){ $(selector + '.addToCartPopup').find('.modal-header-title.error').html('

          ' + '

          ' + window.translate('Uwaga!
          Koszyk zawiera inny produkt niż karta prezentowa, aby dodać kartę prezentową usuń produkty z koszyka.
          Karta Prezentowa, musi być jedynym produktem w koszyku.') + '

          '); } else { // TO DO SPROBOWAĆ ODTWORZYĆ "// Get the value of the input and remove whitespace" console.log('add-to-cart-error'); console.log(resp); $(selector + '.addToCartPopup').find('.modal-header-title.error').html('

          ' + window.translate('Niestety nie posiadamy w magazynie tyle sztuk tego produktu. Prosimy wybrać inną liczbę.') + '

          '); $(selector + '.addToCartPopup').find('.success').show(); $(selector + '.addToCartPopup').find('.error').hide(); } } window.refreshPartials($.Event({'type': 'ajax'})); $(selector + '.addToCartPopup').modal('show'); }); }); } function addToCartGift() { $(document).on("click", ".add-to-cart-gift", function (e) { e.preventDefault(); var id = $(this).attr('data-id'); var size_id = $(".product-size-" + id).val(); $('.cart-product-form-key-' + id).val('gift_' + id + '_' + size_id); $('.cart-product-form-additional_data-' + id).val('{"size_id": ' + size_id + '}'); data = $('.cart-product-form-' + id).serialize(); $.post("/cart/add-product", data).success(function (resp) { resp = JSON.parse(resp); if (resp.success) { location.href = "/order/index?gift_added=1"; } else { $('.shopping-cart #aggreament-alert').show(); $('.shopping-cart #aggreament-alert li:last-child').show(); $('html, body').stop().animate({ scrollTop: $('#aggreament-alert').offset().top - 60 }, 500, 'easeInOutExpo'); } }); }); } function removeFromCart() { let data_id; let product_id; let amount; let jsonWishList; const addButton = document.querySelector('.add.order.wl'); const errorText = document.querySelector('#modal-product-list .modal-dialog .modal-content .modal-body small.error'); jQuery(document).on('click', '.remove-actions.remove-column .remove-button, .remove-from-cart .remove-button', function (e) { e.preventDefault(); data_id = $(this).attr("data-id"); product_id = $(this).attr("data-product-id"); amount = $(this).attr("data-amount"); jsonWishList = document.querySelector('.json_wishlist'); const that = $(this); if (jsonWishList.innerText === 'null') { jsonWishList = []; } else { jsonWishList = JSON.parse(jsonWishList.innerText); jsonWishList = jsonWishList.filter(f => f.product_id === product_id); } if (jsonWishList.length) { addButton.dataset.dismiss = ''; } else { addButton.dataset.dismiss = 'modal'; } errorText.style.display = 'none'; addButton.style.borderColor = '#740020'; addButton.style.color = '#740020'; if (data_id.startsWith('gift_') || data_id.startsWith('1835620')) { addButton.style.display = 'none'; } else { addButton.style.display = 'block'; } if (!location.host.includes('cz')) { try { const trEl = e.target.closest(`tr[data-key="${data_id}"]`) || e.target.closest(`.row > .col-xs-12`); const isOneSize = trEl.querySelector('.description-column .size-name b').innerText === 'ONE SIZE'; const pText = document.querySelector('#modal-product-list .modal-dialog .modal-content .modal-body p'); pText.innerText = isOneSize ? Window.translate('Pamiętaj o limitowanej ilości produktu.') : Window.translate('Pamiętaj o limitowanej ilości każdego z rozmiarów.'); } catch (error) { } } $('#modal-product-list').modal('show'); return false; }); jQuery(document).on('click', '.add.order.wl, .remove.order.wl', function (e) { var that = this; if (e.target.className === 'add order wl' && jsonWishList.length) { errorText.style.display = 'inline'; addButton.style.borderColor = '#9f9f9f'; addButton.style.color = '#9f9f9f'; return false; } console.log('//////////////////') console.log(data_id) console.log('//////////////////') jQuery.post("/cart/remove-product", {"CartProduct[key]": data_id}).success(function (data) { if (e.target.className === 'add order wl') { let url = "/user-product-wishlist/create?product_id=" + product_id + '&product_size_id=' + data_id.replace(/.*_/, ''); $.ajax(url, {dataType: 'json'}).success(function (resp) { //$.pjax.reload('#pjax-content'); if (resp.success) { if (resp.added) { $(that).find('img').attr('src', 'https://static.moliera2.com/gfx/product/on-wishlist.png'); window.sendDataLayerWishlist(resp); } if (resp.removed) { $(that).find('img').attr('src', 'https://static.moliera2.com/gfx/product/not-on-wishlist.png'); } $.ajax("/partials/refresh-wishlist", {dataType: 'json'}).success(function (response) { try { data = jQuery.parseJSON(response); } catch (error) { data = response; // expected output: ReferenceError: nonExistentFunction is not defined // Note - error messages will vary depending on browser } $.each(data.partials, function (key, value) { if (value.html !== undefined) { $(key).html(value.html); } if (value.value !== undefined) { $(key).val(value.value); } }); $.each(data.partials, function (key, value) { if (value.html !== undefined) { $(key).html(value.html); } if (value.value !== undefined) { $(key).val(value.value); } }); }); } // location.reload() });// return false; } if (typeof sareX_core != 'undefined') { var execute_params = { '_email': false, '_cartdel': { 'country': 'PL', 'language': 'pl', 'cart_id': $.cookie("cart_id"), 'product_id': product_id, 'price': $('#cart-product-sell_price-' + data_id).val(), 'currency': 'pln', 'quantity': 0 } }; sareX_core.execute(10, execute_params); } if ($('.ga-product-view-item-' + product_id).length > 0) { let data_dl = $('.ga-product-view-item-' + product_id).data('product-ga'); if (data_dl.id) { product.gaProductRemoveCart(data_dl, amount); } } $.pjax.reload({container: '#pjax-content', timeout: 3000, push: false}); }); return false; }); } function changeProductAmount() { jQuery(document).on('click', '.cart-table .amount-button', function (e) { var data_id = $(this).attr("data-id"); var amount = $('#amount-input-' + data_id).val(); var product_id = $(this).attr("data-product-id"); var old_amount = $(this).attr("data-old-amount"); jQuery.post("/cart/change-product-amount", { "CartProduct[key]": data_id, "CartProduct[amount]": amount }).success(function (data) { if ($('.ga-product-view-item-' + product_id).length > 0) { let data_dl = $('.ga-product-view-item-' + product_id).data('product-ga'); if (data_dl.id) { if (amount - old_amount > 0) { product.gaProductAddCart(data_dl, amount - old_amount); } else { product.gaProductRemoveCart(data_dl, -1 * (amount - old_amount)); } } } if (typeof sareX_core != 'undefined') { var execute_params = { '_email': false, '_cartquantity': { 'country': 'PL', 'language': 'pl', 'cart_id': $.cookie("cart_id"), 'product_id': product_id, 'price': $('#cart-product-sell_price-' + data_id).val(), 'currency': 'pln', 'quantity': amount } }; sareX_core.execute(10, execute_params); } $.pjax.reload({container: '#pjax-content', timeout: 3000, push: false}); }); }); } let tempProductSize = ''; let tempProductId = ''; let tempProductSizeId = ''; function addToWishlist() { var showup = false; $(document).on('click', '#modal-product-list .product-other-sizes-prompt', function (e) { $(this).next('.product-other-sizes-list').slideToggle(300); showup = true; }); $(document).on('click', '#modal-product-list .product-other-sizes-list li', function (e) { const element = document.querySelector('#modal-product-list .product-other-sizes-prompt'); element.click(); const productDisabled = e.target.closest('li').className.includes('product-other-size-disabled'); if (!productDisabled) { document.querySelector('#modal-product-list .product-other-sizes-prompt .product-other-sizes-value').innerHTML = e.target.closest('li').innerHTML; } const addButton = document.querySelector('#modal-product-list .popup.product-add-to-cart-btn.add-to-cart'); const noProduct = e.target.closest('.product-other-sizes-list li'); if (noProduct && noProduct.className.includes('product-other-size-disabled')) { return false; } addButton.dataset.dismiss = 'modal'; }); $(document).on('click', '.product-other-sizes-list li', function (e) { e.preventDefault(); const productDisabled = e.target.closest('.product-other-sizes-list li'); if (productDisabled && productDisabled.className.includes('product-other-size-disabled')) { return false; } const product_id = $(this).attr('data-id'); const product_size_id = $(this).attr('sid'); tempProductId = product_id; tempProductSizeId = product_size_id; }); $(document).on('click', '.add-to-wishlist,.wishlist-button,.wishlist-button-edit', function (e) { e.preventDefault(); var id = $(this).attr('data-id'); var that = this; const wishlistButtonImg = e.target.closest(`.wishlist-button.wishlist-button-${id} img`); const wishlistButtonSmall = e.target.closest(`.product-add-to-wishlist-small-btn.wishlist-button.wishlist-button-${id}`); const wishlistButtonBig = e.target.closest(`.product-add-to-wishlist-btn.wishlist-button.wishlist-button-${id}`); if ( (wishlistButtonImg && wishlistButtonImg.src.includes('/on-wishlist.png')) || (wishlistButtonSmall && $(wishlistButtonSmall).css('background-image').includes('-on')) || (wishlistButtonBig && $(wishlistButtonBig).css('background-image').includes('-on')) ) { const confirmWishList = confirm(window.location.host.includes('cz') ? 'Opravdu chcete produkt odebrat z oblíbených?' : 'Czy na pewno chcesz usunąć produkt z ulubionych?'); if (!confirmWishList) { return false; } if ($(this).hasClass('wishlist-button-shared')) { doAjaxCp(id); return false; } } const containerProductView = document.querySelector('.container-product-view'); const containerSpecial = e.target.closest('.container-special'); const isProductView = !containerSpecial && containerProductView && ( (wishlistButtonImg && wishlistButtonImg.src.includes('/not-on-wishlist.png')) || (wishlistButtonSmall && !$(wishlistButtonSmall).css('background-image').includes('-on')) || (wishlistButtonBig && !$(wishlistButtonBig).css('background-image').includes('-on')) ); const wishlistItem = e.target.closest('.wishlist .wishlist-item'); const universalSize = document.querySelector('.product-other-sizes-value'); const isUniversalSize = universalSize && universalSize.innerText === 'rozmiar uniwersalny'; let productListIitemDataLabel = document.querySelector(`.product-list-item-data[data-id="${id}"] .product-list-item-label`); if (!productListIitemDataLabel) { productListIitemDataLabel = document.querySelector('.container-product-view .product-label'); } isProductListIitemDataLabel = productListIitemDataLabel && productListIitemDataLabel.innerText === 'WKRÓTCE'; if (!isProductListIitemDataLabel) { isProductListIitemDataLabel = productListIitemDataLabel && productListIitemDataLabel.innerText === 'SPRZEDANE'; } if (!isProductListIitemDataLabel) { productListIitemDataLabel = document.querySelector(`.product-list-item-data[data-id="${id}"] + div + .product-list-item-feature-soldout`); isProductListIitemDataLabel = productListIitemDataLabel && productListIitemDataLabel.innerText === 'SPRZEDANE'; } if (!isProductListIitemDataLabel) { productListIitemDataLabel = document.querySelector(`.product-list-item-data[data-id="${id}"] + a .product-list-item-feature-soldout`); isProductListIitemDataLabel = productListIitemDataLabel && productListIitemDataLabel.innerText === 'SPRZEDANE'; } if (!isProductListIitemDataLabel && !isUniversalSize && (isProductView || wishlistItem)) { tempProductSize = document.querySelector(`.product-size.product-size-${id}`).value; var selector = '.product-view-' + $(this).attr('data-id') + ' '; var size_id = $(selector + ".product-size-" + id).val(); // $(selector + '.addToCartPopup').removeClass('error'); $(selector + '.addToCartPopup .success').css('display', 'none'); $(selector + '.addToCartPopup').addClass('wishlist-size-popup'); $(selector + '.addToCartPopup .modal-header .error').css('display', 'block'); // $(selector + '.addToCartPopup .error').html(window.translate(window.location.host.includes('cz') ? 'přidat k oblíbeným.' : 'Dodaj do ulubionych.')); let ht = $(`.product-other-sizes-select[data-productid="${id}"]`).parent().html(); if (ht) { ht = '

          ' + ht; } else { ht = ''; } ht += `

          `; $(selector + '.addToCartPopup').find('.modal-header .error').html( '

          ' + window.translate(window.location.host.includes('cz') ? 'Přidat k oblíbeným' : 'DODAJ DO ULUBIONYCH') + ht + '

          '); if (!size_id) { const productOtherSizesList = document.querySelector(`.addToCartPopup .product-other-sizes-list[data-id="${id}"]`); if (productOtherSizesList) productOtherSizesList.style.display = 'block'; } $(selector + '.addToCartPopup').first().modal('show'); // $(selector + '.addToCartPopup').addClass('error'); return false; } const productListButton = document.querySelector(`.list.product-list .wishlist-button.wishlist-button-${id} img`); const productList = productListButton && productListButton.closest('.list.product-list'); const productOtherSizesSelect = document.querySelector(`.product-other-sizes-select[data-productid="${id}"]`); const modalProductList = document.querySelector('#modal-product-list'); const modalContent = modalProductList && modalProductList.querySelector('.modal-content'); const universalSizeProductList = document.querySelector(`.product-other-sizes-list[data-id="${id}"]`); const isUniversalSizeProductList = universalSizeProductList && universalSizeProductList.innerText.trim() === 'rozmiar uniwersalny'; if (!isProductListIitemDataLabel && !isUniversalSizeProductList && (productListButton && productListButton.src.includes('/not-on-wishlist.png'))) { $.ajax("/product/list-product-wishlist?product_id=" + id, {dataType: 'json'}).success(function (resp) { if (resp) { tempProductId = ''; tempProductSizeId = ''; modalContent.innerHTML = `

          ${window.location.host.includes('cz') ? 'Přidat k oblíbeným' : 'DODAJ DO ULUBIONYCH'}

          ${resp.html}

          `; if (resp.html.search('data-size="rozmiar uniwersalny') > 0) { const universalSizeEl = document.querySelector('#modal-product-list .product-other-sizes-list ul li div'); tempProductSizeId = universalSizeEl.dataset.sizeid; doAjaxCp(id + '&product_size_id=' + tempProductSizeId); return false; } const element = document.querySelector('#modal-product-list .product-other-sizes-prompt'); element && element.click(); $('#modal-product-list').modal('show'); return false; } }); return false; } if (wishlistItem) { return false; } function doAjaxCp(product) { $.ajax("/user-product-wishlist/create?product_id=" + product, {dataType: 'json'}).success(function (resp) { //$.pjax.reload('#pjax-content'); if (resp.success) { if (resp.added) { window.sendDataLayerWishlist(resp); $(that).find('img').attr('src', 'https://static.moliera2.com/gfx/product/on-wishlist.png'); var index; if ((index = product.indexOf('&')) != -1) { product = product.substr(0, index); } $('.wishlist-button-' + product + ' img').attr('src', 'https://static.moliera2.com/gfx/product/on-wishlist.png'); $('.product-add-to-wishlist-small-btn.wishlist-button-' + product).css('background-image', "url('https://static.moliera2.com/gfx/product/view/add-to-wishlist-small-on.svg')"); $('.product-add-to-wishlist-btn.wishlist-button-' + product).css('background-image', "url('https://static.moliera2.com/gfx/product/view/add-to-wishlist-on.svg')"); } if (resp.removed) { syneRemoveFromWishlist(resp); $(that).find('img').attr('src', 'https://static.moliera2.com/gfx/product/not-on-wishlist.png'); $('.wishlist-button-' + product + ' img').attr('src', 'https://static.moliera2.com/gfx/product/not-on-wishlist.png'); $('.product-add-to-wishlist-small-btn.wishlist-button-' + product).css('background-image', "url('https://static.moliera2.com/gfx/product/view/add-to-wishlist-small.svg')"); $('.product-add-to-wishlist-btn.wishlist-button-' + product).css('background-image', "url('https://static.moliera2.com/gfx/product/view/add-to-wishlist.svg')"); } $.ajax("/partials/refresh-wishlist", {dataType: 'json'}).success(function (response) { try { data = jQuery.parseJSON(response); } catch (error) { data = response; // expected output: ReferenceError: nonExistentFunction is not defined // Note - error messages will vary depending on browser } $.each(data.partials, function (key, value) { if (value.html !== undefined) { $(key).html(value.html); } if (value.value !== undefined) { $(key).val(value.value); } }); $.each(data.partials, function (key, value) { if (value.html !== undefined) { $(key).html(value.html); } if (value.value !== undefined) { $(key).val(value.value); } }); }); } // location.reload() }); } doAjaxCp(id); return false; }); $(document).on("click", ".addToCartPopup .add-to-cart,#modal-product-list .add-to-cart", function (e) { var that = this; const modalProductList = document.querySelector('#modal-product-list'); const element = document.querySelector('#modal-product-list .product-other-sizes-prompt'); element && element.click(); if (!tempProductId && !tempProductSizeId) return false; if (modalProductList) { let url = "/user-product-wishlist/create?product_id=" + tempProductId + '&product_size_id=' + tempProductSizeId; $.ajax(url, {dataType: 'json'}).success(function (resp) { //$.pjax.reload('#pjax-content'); if (resp.success) { if (resp.added) { window.sendDataLayerWishlist(resp); $(that).find('img').attr('src', 'https://static.moliera2.com/gfx/product/on-wishlist.png'); } if (resp.removed) { $(that).find('img').attr('src', 'https://static.moliera2.com/gfx/product/not-on-wishlist.png'); } $.ajax("/partials/refresh-wishlist", {dataType: 'json'}).success(function (response) { try { data = jQuery.parseJSON(response); } catch (error) { data = response; // expected output: ReferenceError: nonExistentFunction is not defined // Note - error messages will vary depending on browser } $.each(data.partials, function (key, value) { if (value.html !== undefined) { $(key).html(value.html); } if (value.value !== undefined) { $(key).val(value.value); } }); $.each(data.partials, function (key, value) { if (value.html !== undefined) { $(key).html(value.html); } if (value.value !== undefined) { $(key).val(value.value); } }); }); } // location.reload() }); return false; } const modal = e.target.closest('.addToCartPopup'); const productOtherSizesValue = modal.querySelector('.product-other-sizes-value'); const id = productOtherSizesValue.dataset.id; const sizeId = document.querySelector(`.product-size.product-size-${id}`).value; if (!e.target.dataset.dismiss) { const productOtherSizesList = modal.querySelector(`.product-other-sizes-list[data-id="${id}"]`); productOtherSizesList.style.display = 'block'; return false; } let url = "/user-product-wishlist/create?product_id=" + id; if (sizeId) url = url + `&product_size_id=${sizeId}`; let againFetch = false; if ($(this).hasClass('edit-item')) { againFetch = true; } const fetchWishList = (url, id, sizeId) => $.ajax(url, {dataType: 'json'}).success(function (resp) { //$.pjax.reload('#pjax-content'); if (resp.success) { const wishListEl = document.querySelector('.wishlist'); if (wishListEl && againFetch) { const sleep = milliseconds => new Promise(resolve => setTimeout(resolve, milliseconds)); sleep(1000).then(() => { fetchWishList(url, id, sizeId); againFetch = false; const productSizeInput = document.querySelector(`.product-size.product-size-${id}`).value; const productSizeElement = document.querySelector(`.product-other-sizes-list[data-id="${id}"] > ul > li > div[data-sizeid="${productSizeInput}"]`); document.querySelector(`.get_your_size[data-productid="${id}"]`).innerHTML = `${window.location.host.includes('cz') ? 'Vybraná velikost' : 'Wybrany rozmiar'}: ${productSizeElement.closest('li').dataset.size}`; return false; }); return false; } if (resp.added) { window.sendDataLayerWishlist(resp); if ($(that).find('img')) $(that).find('img').attr('src', 'https://static.moliera2.com/gfx/product/on-wishlist.png'); } if (resp.removed) { if ($(that).find('img')) $(that).find('img').attr('src', 'https://static.moliera2.com/gfx/product/not-on-wishlist.png'); } $.ajax("/partials/refresh-wishlist", {dataType: 'json'}).success(function (response) { try { data = jQuery.parseJSON(response); } catch (error) { data = response; // expected output: ReferenceError: nonExistentFunction is not defined // Note - error messages will vary depending on browser } $.each(data.partials, function (key, value) { if (value.html !== undefined) { $(key).html(value.html); } if (value.value !== undefined) { $(key).val(value.value); } }); $.each(data.partials, function (key, value) { if (value.html !== undefined) { $(key).html(value.html); } if (value.value !== undefined) { $(key).val(value.value); } }); }); } // location.reload() }); fetchWishList(url, id, sizeId); return false; }); $(document).on("click", ".popupAnuluj,.container-product-view .add-to-cart", function (e) { const addToCartPopup = e.target.closest('.addToCartPopup'); if (addToCartPopup) { const id = addToCartPopup.querySelector('.product-other-sizes-prompt').dataset.id || ''; const sizeId = document.querySelector(`.product-size.product-size-${id}`); sizeId.value = tempProductSize; } }); $(document).on("click", ".wishlist .add-to-cart", function (e) { const id = e.target.closest('.product-view').dataset.id; const sizeId = document.querySelector(`.product-size.product-size-${id}`).value; if (!sizeId) { const isModal = e.target.closest('.addToCartPopup'); if (isModal) { const wishListButton = document.querySelector(`.wishlist-button-edit.wishlist-button-${id}`); wishListButton.click(); } else { alert(window.location.host.includes('cz') ? 'Nejprve vyberte velikost' : 'Najpierw wybierz rozmiar'); } } }); $(document).on("click", ".wishlist .addToCartPopup .add-to-cart", function (e) { const wishList = e.target.closest('.wishlist .item.wishlist-item'); const id = wishList.querySelector('.product-other-sizes-value').dataset.id; const selectors = [...document.querySelectorAll(`.product-other-sizes-select[data-productid="${id}"]`)]; selectors[0].innerHTML = selectors[1].innerHTML; }); $(document).on("click", ".product-other-size-disabled", function (e) { if (e.target.closest('#modal-product-list')) { $('#product-shipment-notification-modal').modal('show'); setTimeout(function () { [...document.querySelectorAll('.product-card-popup')].forEach((el, index) => { if (index === 0) el.style.zIndex = "24323423423423423423423423"; }); }, 100); } }); } function removeFromWishlist() { $(document).on("click", ".remove-from-wishlist", function (e) { e.preventDefault(); var product_id = $(this).attr('data-id'); const product_size_id = $(this).attr('data-size-id'); var that = this; const confirmWishList = confirm(window.location.host.includes('cz') ? 'Opravdu chcete produkt odebrat z oblíbených?' : 'Czy na pewno chcesz usunąć produkt z ulubionych?'); if (!confirmWishList) { return false; } $.ajax("/user-product-wishlist/delete?product_id=" + product_id + '&product_size_id=' + product_size_id, {dataType: 'json'}).success(function (resp) { if (resp.success) { syneRemoveFromWishlist(resp); } document.location.href = document.location.href; }); return false; }); } function syneRemoveFromWishlist(resp) { const data = resp.data_product_ga; if (typeof SR === 'undefined') { return; } // Synerise events const synProduct = { 'sku': data.id, 'brand': data.brand, 'name': data.name, 'category': data.categories.join(' > '), 'categories': data.categories, 'regularPrice': data.price, 'salePrice': data.price, 'finalUnitPrice': data.price, 'color': data.color, 'gender': data.gender, 'sizeId': data.size_id, 'size': data.original_size_name, }; SR.event.trackCustomEvent('product.removeFromFavourite', synProduct, 'ProductRemoveFromFavorite'); } function updateAmount() { jQuery(document).on('change', '.cartproduct-amount', function (e) { var data_id = $(this).attr("data-id"); var old_amount = $(this).attr("data-old-amount"); var product_id = $(this).attr("data-product-id"); var amount = $(this).val(); jQuery.post("/cart/change-product-amount", { "CartProduct[key]": data_id, "CartProduct[amount]": amount }).success(function (data) { console.log('0.ga-product-view-item-' + product_id); if ($('.ga-product-view-item-' + product_id).length > 0) { let data_dl = $('.ga-product-view-item-' + product_id).data('product-ga'); if (data_dl.id) { if (amount - old_amount > 0) { product.gaProductAddCart(data_dl, amount - old_amount); } else { product.gaProductRemoveCart(data_dl, -1 * (amount - old_amount)); } } } $.pjax.reload({container: '#pjax-content', timeout: 3000, push: false}); }); }); $(document).on('click', '.amount_more', function (e) { var data_id = $(this).parent().find('input[name=amount]').attr("data-id"); var item = $('#amount-input-' + data_id); item.attr('value', parseInt(item.val()) + 1); var amount = item.val(); var product_id = $(this).attr("data-product-id"); var old_amount = $(this).attr("data-old-amount"); jQuery.post("/cart/change-product-amount", { "CartProduct[key]": data_id, "CartProduct[amount]": amount }).success(function (data) { data = JSON.parse(data); if (data.message == 'Too large amount of product') { item.attr('value', parseInt(item.val()) - 1); $('.cart-error-amount').modal('show'); } else { if ($('.ga-product-view-item-' + product_id).length > 0) { let data_dl = $('.ga-product-view-item-' + product_id).data('product-ga'); if (data_dl.id) { if (amount - old_amount > 0) { product.gaProductAddCart(data_dl, amount - old_amount); } else { product.gaProductRemoveCart(data_dl, -1 * (amount - old_amount)); } } } $.pjax.reload({container: '#pjax-content', timeout: 3000, push: false}); } }); }); } function checkAgreements() { var obj = $('#apply'), formD = $('#delivery-form label'), formP = $('#payment-form label'); $(document).off('click', '.shopping-cart .next-step.next-step-agreement'); $(document).on('click', '.shopping-cart .next-step.next-step-agreement', function (e) { if (!formD.find('input:checked').length) { $('#aggreament-alert ul li:nth-child(2)').show(); } if (!formP.find('input:checked').length) { $('#aggreament-alert ul li:last-child').show(); } if (!obj.prop('checked')) { $('#aggreament-alert ul li:first-child').show(); } else { $('#aggreament-alert ul li:first-child').hide(); } if (!obj.prop('checked') || !formD.find('input:checked').length || !formP.find('input:checked').length) { e.preventDefault(); $('#aggreament-alert').show(); $('html, body').stop().animate({ scrollTop: $('#aggreament-alert').offset().top - 40 }, 500, 'easeInOutExpo'); } }); } function addInfoOrderDeliveryUps() { if ($('body').find('#order-deliverytemp').size() > 0) { if (!$('.container').hasClass('m2')) { var info = window.translate('ubezpieczenie gratis!'); var data_content = window.translate('Dbając o gwarancję bezpieczeństwa przesyłek naszych Klientów, każda wysyłka jest ubezpieczona (wartość ubezpieczenia do {wartosc_ubezp}). W przypadku zaginięcia bądź uszkodzenia zostanie zwrócona równowartość zamówienia (wyjątek stanowi biżuteria, której maksymalna wartość ubezpieczenia to {wartosc_ubezp_1}).', { 'wartosc_ubezp': '50 000 zł', 'wartosc_ubezp_1': '1 500 zł' }); $('#order-deliverytemp').find('label:first-child') .append(' - ' + info + 'Damska odzież Self Portrait | Moliera 2 (1)'); } $('.delivery-info-pop').popover(); } } $(document).on('click', '#user-firm', function () { if ($(this).prop('checked')) { $('#user-update-form').yiiActiveForm('add', { "id": "user-company_name", "name": "company_name", "container": ".field-user-company_name", "input": "#user-company_name", "validate": function (attribute, value, messages, deferred, $form) { yii.validation.required(value, messages, {"message": window.translate("Nazwa firmy nie może pozostać bez wartości.")}); yii.validation.string(value, messages, { "message": window.translate("Nazwa firmy musi być tekstem."), "max": 255, "tooLong": window.translate("Nazwa firmy powinien zawierać nie więcej niż 255 znaku."), "skipOnEmpty": 1 }); } }); $('#user-update-form').yiiActiveForm('add', { "id": "user-company_street", "name": "company_street", "container": ".field-user-company_street", "input": "#user-company_street", "validate": function (attribute, value, messages, deferred, $form) { yii.validation.required(value, messages, {"message": window.translate("Ulica nie może pozostać bez wartości.")}); yii.validation.string(value, messages, { "message": window.translate("Ulica musi być tekstem."), "max": 255, "tooLong": window.translate("Ulica powinien zawierać nie więcej niż 255 znaku."), "skipOnEmpty": 1 }); } }); $('#user-update-form').yiiActiveForm('add', { "id": "user-company_home_number", "name": "company_home_number", "container": ".field-user-company_home_number", "input": "#user-company_home_number", "validate": function (attribute, value, messages, deferred, $form) { yii.validation.required(value, messages, {"message": window.translate("Numer domu nie może pozostać bez wartości.")}); yii.validation.string(value, messages, { "message": window.translate("Numer domu musi być tekstem."), "max": 255, "tooLong": window.translate("Numer domu powinien zawierać nie więcej niż 255 znaku."), "skipOnEmpty": 1 }); } }); $('#user-update-form').yiiActiveForm('add', { "id": "user-company_home_number", "name": "company_home_number", "container": ".field-user-company_home_number", "input": "#user-company_home_number", "validate": function (attribute, value, messages, deferred, $form) { yii.validation.string(value, messages, { "message": window.translate("Numer lokalu firmy musi być tekstem."), "max": 255, "tooLong": window.translate("Numer lokalu powinien zawierać nie więcej niż 255 znaku."), "skipOnEmpty": 1 }); } }); $('#user-update-form').yiiActiveForm('add', { "id": "user-company_postal_code", "name": "company_postal_code", "container": ".field-user-company_postal_code", "input": "#user-company_postal_code", "validate": function (attribute, value, messages, deferred, $form) { yii.validation.required(value, messages, {"message": window.translate("Kod pocztowy nie może pozostać bez wartości.")}); yii.validation.string(value, messages, { "message": window.translate("Kod pocztowy musi być tekstem."), "max": 255, "tooLong": window.translate("Kod pocztowy powinien zawierać nie więcej niż 255 znaku."), "skipOnEmpty": 1 }); } }); $('#user-update-form').yiiActiveForm('add', { "id": "user-company_city", "name": "company_city", "container": ".field-user-company_postal_code", "input": "#user-company_city", "validate": function (attribute, value, messages, deferred, $form) { yii.validation.required(value, messages, {"message": window.translate("Miasto nie może pozostać bez wartości.")}); yii.validation.string(value, messages, { "message": window.translate("Miasto musi być tekstem."), "max": 255, "tooLong": window.translate("Miasto powinien zawierać nie więcej niż 255 znaku."), "skipOnEmpty": 1 }); } }); $('#user-update-form').yiiActiveForm('add', { "id": "user-company_vat_id", "name": "company_vat_id", "container": ".field-user-company_vat_id", "input": "#user-company_vat_id", "validate": function (attribute, value, messages, deferred, $form) { yii.validation.required(value, messages, {"message": window.translate("NIP nie może pozostać bez wartości.")}); yii.validation.string(value, messages, { "message": window.translate("NIP musi być tekstem."), "max": 255, "tooLong": window.translate("NIP powinien zawierać nie więcej niż 255 znaku."), "skipOnEmpty": 1 }); } }); } else { $('#user-update-form').yiiActiveForm('updateAttribute', 'user-company_name', 'n'); $('#user-update-form').yiiActiveForm('updateAttribute', 'user-company_street', ''); $('#user-update-form').yiiActiveForm('updateAttribute', 'user-company_home_number', ''); $('#user-update-form').yiiActiveForm('updateAttribute', 'user-company_flat_number', ''); $('#user-update-form').yiiActiveForm('updateAttribute', 'user-company_postal_code', ''); $('#user-update-form').yiiActiveForm('updateAttribute', 'user-company_city', ''); $('#user-update-form').yiiActiveForm('updateAttribute', 'user-company_vat_id', ''); $('.firm-box').find('input').each(function (i, el) { $(el).val(''); if ($(el).parent().hasClass('has-success')) { $(el).parent().removeClass('has-success'); } if ($(el).parent().hasClass('has-error')) { $(el).parent().removeClass('has-error'); } }); } }); $(document).on('ready pjax:complete', function () { if ($('.cost-list li').length == 5) { $('#frame_3.frame').css('marginTop', '215px'); } if ($('.cost-list li').length == 7) { $('#frame_3.frame').css('marginTop', '275px'); } if ($('.frame-delivery-time').length) { if ($('#products-grid tbody tr').length == 2) { $('.frame-delivery-time-2').css('display', 'block'); } else if ($('#products-grid tbody tr').length > 2) { $('.frame-delivery-time-3').css('display', 'block'); } } }); setTimeout(loadWishlistSizes, 2000); setTimeout(hideWishlistLoader, 3000); $(document).on('click', 'form.cart-product-form a.open-klarna-modal', function (e) { e.preventDefault(); $(document).find('div#klarna-modal').modal('show'); return false; }); $(document).on('click', 'form.cart-product-form a.open-paypo-modal', function (e) { e.preventDefault(); $(document).find('div#paypo-modal').modal('show'); return false; });})();function loadWishlistSizes() { const divContainerUserWishlist = document.querySelector('.container-user-wishlist'); const isWishlistGuest = document.querySelector('.user-wishlist-guest'); if (!divContainerUserWishlist || isWishlistGuest) { return false; } (async function () { const response = await fetch('/product/products-wishlist'); const json = await response.json(); for (const product of json.ids) { const productValue = document.querySelector(`.product-size.product-size-${product.product_id}[data-id="${product.product_id}"]`); if (productValue !== null) { const productForm = productValue.closest(`form[id="cart-product-form-${product.product_id}"]`); const isUniversal = productForm.querySelector('.product-other-sizes-value').innerText.includes('uniwersalny'); if (isUniversal) continue; productValue.value = product.product_size_id; } const productSelectorOption = document.querySelector(`.product-other-sizes-select[data-productid="${product.product_id}"]`); if (!productSelectorOption) return false; const productSelected = productSelectorOption.querySelector(`.product-other-sizes-list ul li[sid="${product.product_size_id}"]`); if (!productSelected) return false; const productSizeDisplay = document.querySelector(`.get_your_size[data-productid="${product.product_id}"] strong`); productSizeDisplay.innerHTML = productSelected.dataset.size; const productSelectorChoose = document.querySelector(`.product-other-sizes-value[data-id="${product.product_id}"]`); productSelectorChoose.innerHTML = productSelected.innerHTML; } })();}function hideWishlistLoader() { const loadProdWl = [...document.querySelectorAll('.load-prod-wl')]; const displayProdWl = [...document.querySelectorAll('.display-prod-wl')]; loadProdWl.forEach(el => el.style.display = 'none'); displayProdWl.forEach(el => el.style.display = 'inline');}/* * Berryproject sp. z o.o. * * Jakub Radziwon * author: jr@berryproject.com */var showup = false;$(document).on('click', '.product-other-btn', function (e) { $('.product-other-list').slideToggle(300); showup = true;});$(document).click(function (e) { if (!showup) $('.product-other-list').slideUp(400); else showup = false;});if (jQuery('#visualsearchform-photo').data('fileinput')) { jQuery('#visualsearchform-photo').fileinput('destroy'); }jQuery('#visualsearchform-photo').fileinput(fileinput_f3914de6);jQuery('#visualsearchform-photo').on('fileimageloaded', function() { $('#visual-search-form .file-preview-thumbnails').append('

          Ładowanie wyników ...

          '); $('#visual-search-form .btn-file-url').hide(); $('#visual-search-form').submit(); });jQuery('#visual-search-form').yiiActiveForm([{"id":"visualsearchform-photo","name":"photo","container":".field-visualsearchform-photo","input":"#visualsearchform-photo","validate":function (attribute, value, messages, deferred, $form) {yii.validation.string(value, messages, {"message":"Zrób zdjęcie musi być tekstem.","skipOnEmpty":1});}},{"id":"visualsearchform-url","name":"url","container":".field-visualsearchform-url","input":"#visualsearchform-url","validate":function (attribute, value, messages, deferred, $form) {yii.validation.string(value, messages, {"message":"Podaj link do zdjęcia musi być tekstem.","skipOnEmpty":1});}}], []);jQuery('#visual-search-popup').modal({"show":false}); $(document).off('click', '.klevu-search-form-wrapper .visual-search-button'); $(document).on('click', '.klevu-search-form-wrapper .visual-search-button', function (e) { $('#visual-search-popup').modal('show'); }); $(document).on('click', '#visual-search-popup .close', function (e) { $('#visual-search-popup').modal('hide'); }); $(document).on('click', '#visual-search-popup .btn-file-url',function(){ $('#visual-search-popup form').submit();});jQuery('#visual-search-mobile-form').yiiActiveForm([{"id":"visualsearchform-photomob","name":"photomob","container":".field-visualsearchform-photomob","input":"#visualsearchform-photomob","validate":function (attribute, value, messages, deferred, $form) {yii.validation.string(value, messages, {"message":"Zrób zdjęcie musi być tekstem.","skipOnEmpty":1});}},{"id":"visualsearchform-file","name":"file","container":".field-visualsearchform-file","input":"#visualsearchform-file","validate":function (attribute, value, messages, deferred, $form) {yii.validation.string(value, messages, {"message":"Dodaj plik musi być tekstem.","skipOnEmpty":1});}},{"id":"visualsearchform-url","name":"url","container":".field-visualsearchform-url","input":"#visualsearchform-url","validate":function (attribute, value, messages, deferred, $form) {yii.validation.string(value, messages, {"message":"Podaj link do zdjęcia musi być tekstem.","skipOnEmpty":1});}}], []);jQuery('#visual-search-popup-mobile').modal({"show":false}); $(document).off('click', '.klevu-search-form-wrapper-mobile .visual-search-button'); $(document).on('click', '.klevu-search-form-wrapper-mobile .visual-search-button', function (e) { $('#visual-search-popup-mobile').modal('show'); }); $(document).on('click', '#visual-search-popup-mobile .close', function (e) { $('#visual-search-popup-mobile').modal('hide'); }); $(document).on('click', '#visual-search-popup-mobile .btn-file-url',function(){ $(document).off('click', '#visual-search-popup-mobile .btn-file-url'); $(document).off('change', '#visual-search-popup-mobile #visualsearchform-photomob,#visual-search-popup-mobile #visualsearchform-file'); $('#visual-search-popup-mobile').addClass('loading'); $('#visual-search-popup-mobile form').submit();});$(document).on('change', '#visual-search-popup-mobile #visualsearchform-photomob,#visual-search-popup-mobile #visualsearchform-file',function(){ $('#visual-search-popup-mobile').addClass('loading'); $(document).off('click', '#visual-search-popup-mobile .btn-file-url'); $(document).off('change', '#visual-search-popup-mobile #visualsearchform-photomob,#visual-search-popup-mobile #visualsearchform-file'); $('#visual-search-popup-mobile form').submit();}); $(document).on('click', '.visualsearchform-photo-btn',function(){ $('#visual-search-popup-mobile #visualsearchform-photomob').trigger('click');}); $(document).on('click', '.visualsearchform-file-btn',function(){ $('#visual-search-popup-mobile #visualsearchform-file').trigger('click');}); });

          Wyszukaj produkt obrazem

          Prześlij zdjęcie, a my znajdziemy dla Ciebie
          podobne produkty w naszym sklepie.


          Wyszukaj produkt obrazem

          Prześlij zdjęcie, a my znajdziemy dla Ciebie
          podobne produkty w naszym sklepie.



          Top Articles
          Latest Posts
          Article information

          Author: Greg O'Connell

          Last Updated: 04/13/2023

          Views: 6673

          Rating: 4.1 / 5 (62 voted)

          Reviews: 93% of readers found this page helpful

          Author information

          Name: Greg O'Connell

          Birthday: 1992-01-10

          Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519

          Phone: +2614651609714

          Job: Education Developer

          Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding

          Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.