diff --git a/features/ui/frontend/cart/adding_product_to_cart.feature b/features/ui/frontend/cart/adding_product_to_cart.feature index 0f7dcb2839..36c0ddb5d2 100644 --- a/features/ui/frontend/cart/adding_product_to_cart.feature +++ b/features/ui/frontend/cart/adding_product_to_cart.feature @@ -11,7 +11,7 @@ Feature: Adding a product to the cart Then I should be on the cart summary page And I should be notified that the product has been successfully added And there should be one item in my cart - And this item should have name "TSHIRT" + And this item should have name "TShirt" And I should see "TShirt" with unit price "€100.00" in my cart Scenario: Adding a product to the cart as a logged in customer @@ -23,5 +23,5 @@ Feature: Adding a product to the cart Then I should be on the cart summary page And I should be notified that the product has been successfully added And there should be one item in my cart - And this item should have name "RACING CAR" + And this item should have name "Racing Car" And I should see "Racing Car" with unit price "€1,000.00" in my cart diff --git a/features/ui/frontend/cart/adding_product_to_cart_with_maximum_qty.feature b/features/ui/frontend/cart/adding_product_to_cart_with_maximum_qty.feature index 61e4205fca..0cd8f0c3c2 100644 --- a/features/ui/frontend/cart/adding_product_to_cart_with_maximum_qty.feature +++ b/features/ui/frontend/cart/adding_product_to_cart_with_maximum_qty.feature @@ -13,19 +13,19 @@ Feature: Adding a product to the cart with maximum Quantity to Order Then I should be on the cart summary page And I should be notified that the product has been successfully added And there should be one item in my cart - And this item should have name "TSHIRT" + And this item should have name "TShirt" And I should see "TShirt" with unit price "€100.00" in my cart Scenario: Adding product to cart with less than minimum quantity to order Given the product "TShirt" has a maximum order quantity of "100" When I add 101 of this product to the cart Then I should be on the cart summary page - And I should be notified that I can only order a maximum of 100 of TSHIRT + And I should be notified that I can only order a maximum of 100 of TShirt Scenario: Adding product to cart with less than minimum quantity to order with smaller quantities Given the product "TShirt" has a maximum order quantity of "2" When I add 3 of this product to the cart Then I should be on the cart summary page - And I should be notified that I can only order a maximum of 2 of TSHIRT + And I should be notified that I can only order a maximum of 2 of TShirt diff --git a/features/ui/frontend/cart/adding_product_to_cart_with_minimum_qty.feature b/features/ui/frontend/cart/adding_product_to_cart_with_minimum_qty.feature index 60e8047205..9920c7548d 100644 --- a/features/ui/frontend/cart/adding_product_to_cart_with_minimum_qty.feature +++ b/features/ui/frontend/cart/adding_product_to_cart_with_minimum_qty.feature @@ -13,19 +13,19 @@ Feature: Adding a product to the cart with minimum Quantity to Order Then I should be on the cart summary page And I should be notified that the product has been successfully added And there should be one item in my cart - And this item should have name "TSHIRT" + And this item should have name "TShirt" And I should see "TShirt" with unit price "€100.00" in my cart Scenario: Adding product to cart with less than minimum quantity to order Given the product "TShirt" has a minimum order quantity of "100" When I add 99 of this product to the cart Then I should be on the cart summary page - And I should be notified that I need to order at least 100 of TSHIRT + And I should be notified that I need to order at least 100 of TShirt Scenario: Adding product to cart with less than minimum quantity to order with smaller quantities Given the product "TShirt" has a minimum order quantity of "2" When I add 1 of this product to the cart Then I should be on the cart summary page - And I should be notified that I need to order at least 2 of TSHIRT + And I should be notified that I need to order at least 2 of TShirt diff --git a/features/ui/frontend/cart/adding_product_to_cart_with_out_of_stock_product.feature b/features/ui/frontend/cart/adding_product_to_cart_with_out_of_stock_product.feature index 9d30a3ad8c..f6775de7b7 100644 --- a/features/ui/frontend/cart/adding_product_to_cart_with_out_of_stock_product.feature +++ b/features/ui/frontend/cart/adding_product_to_cart_with_out_of_stock_product.feature @@ -15,13 +15,13 @@ Feature: Adding a product to the cart with a Product that is tracked and out-of- Then I should be on the cart summary page And I should be notified that the product has been successfully added And there should be one item in my cart - And this item should have name "TSHIRT" + And this item should have name "TShirt" And I should see "TShirt" with unit price "€100.00" in my cart Scenario: Adding product to cart with more than stocked quantity When I add 3 of this product to the cart Then I should be on the cart summary page - And I should be notified that TSHIRT does not have sufficient stock + And I should be notified that TShirt does not have sufficient stock Scenario: Adding product, with on-hold stock, to cart with more than stocked quantity Given the product has 2 on hold @@ -31,5 +31,5 @@ Feature: Adding a product to the cart with a Product that is tracked and out-of- Given the product has 1 on hold When I add 2 of this product to the cart Then I should be on the cart summary page - And I should be notified that TSHIRT does not have sufficient stock + And I should be notified that TShirt does not have sufficient stock diff --git a/features/ui/frontend/cart/automatic_cart_price_rule.feature b/features/ui/frontend/cart/automatic_cart_price_rule.feature index 81e34465b0..d26e0849e7 100644 --- a/features/ui/frontend/cart/automatic_cart_price_rule.feature +++ b/features/ui/frontend/cart/automatic_cart_price_rule.feature @@ -15,7 +15,7 @@ Feature: Getting an automatic cart price rule Then I should be on the cart summary page And I should be notified that the product has been successfully added And there should be one item in my cart - And this item should have name "TSHIRT" + And this item should have name "TShirt" And I should see "TShirt" with unit price "€100.00" in my cart And my cart's total should be "€80.00" @@ -25,6 +25,6 @@ Feature: Getting an automatic cart price rule Then I should be on the cart summary page And I should be notified that the product has been successfully added And there should be one item in my cart - And this item should have name "TSHIRT" + And this item should have name "TShirt" And I should see "TShirt" with unit price "€100.00" in my cart And my cart's total should be "€70.00" diff --git a/features/ui/frontend/cart/keep_cart_after_login.feature b/features/ui/frontend/cart/keep_cart_after_login.feature index 733b657736..13cc7d9992 100644 --- a/features/ui/frontend/cart/keep_cart_after_login.feature +++ b/features/ui/frontend/cart/keep_cart_after_login.feature @@ -13,11 +13,11 @@ Feature: Maintaining cart after login When I log in as "elon@musk.com" with "cybertruck" password And I see the summary of my cart Then there should be one item in my cart - And this item should have name "TSHIRT" + And this item should have name "TShirt" Scenario: Having cart maintained after registration Given I add this product to the cart When I register with email "elon@spacex.com" and password "bigbigbooster" And I see the summary of my cart Then there should be one item in my cart - And this item should have name "TSHIRT" + And this item should have name "TShirt" diff --git a/features/ui/frontend/category/view_category.feature b/features/ui/frontend/category/view_category.feature index 0432e0c904..c202894d2a 100644 --- a/features/ui/frontend/category/view_category.feature +++ b/features/ui/frontend/category/view_category.feature @@ -56,13 +56,13 @@ Feature: Viewing a product details When I switch to category "Coats" on main menu Then I should see 3 products in the category list And I change order to "Name Descending" - And I should see products in order "WINTER COAT,RAIN COAT,JACKET" in list + And I should see products in order "Winter Coat,Rain Coat,Jacket" in list And I change order to "Name Ascending" - And I should see products in order "JACKET,RAIN COAT,WINTER COAT" in list + And I should see products in order "Jacket,Rain Coat,Winter Coat" in list When I switch to category "Shoes" on left menu And I change order to "Name Descending" - And I should see products in order "SHOE 2,SHOE" in list + And I should see products in order "Shoe 2,Shoe" in list And I switch to view to "grid" - And I should see products in order "SHOE 2,SHOE" in grid + And I should see products in order "Shoe 2,Shoe" in grid And I change order to "Name Ascending" - And I should see products in order "SHOE,SHOE 2" in grid \ No newline at end of file + And I should see products in order "Shoe,Shoe 2" in grid \ No newline at end of file diff --git a/features/ui/frontend/payment/concurrency.feature b/features/ui/frontend/payment/concurrency.feature index 7deef6e057..20ff8faaeb 100644 --- a/features/ui/frontend/payment/concurrency.feature +++ b/features/ui/frontend/payment/concurrency.feature @@ -10,6 +10,7 @@ Feature: Create a new order And the site has a tax rule group "AT" And the tax rule group has a tax rule for country "Austria" with tax rate "AT" And the site has a product "T-Shirt" priced at 2000 + And the product is active and published and available for store "Austria" And the product has the tax rule group "AT" And the site has a customer "some-customer@something.com" And the customer "some-customer@something.com" has an address with country "Austria", "4600", "Wels", "Freiung", "9-11/N3" diff --git a/src/CoreShop/Behat/Context/Ui/Frontend/CartContext.php b/src/CoreShop/Behat/Context/Ui/Frontend/CartContext.php index 8bae131390..67e1e80e96 100644 --- a/src/CoreShop/Behat/Context/Ui/Frontend/CartContext.php +++ b/src/CoreShop/Behat/Context/Ui/Frontend/CartContext.php @@ -159,7 +159,7 @@ public function shouldBeOnMyCartSummaryPage(): void */ public function iShouldBeNotifiedThatItHasBeenSuccessfullyAdded(): void { - $this->notificationChecker->checkNotification('ITEM ADDED', NotificationType::success()); + $this->notificationChecker->checkNotification('Item added', NotificationType::success()); } /** @@ -167,7 +167,7 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyAdded(): void */ public function iShouldBeNotifiedThatTheVoucherHasBeenApplied(): void { - $this->notificationChecker->checkNotification('VOUCHER HAS BEEN SUCCESSFULLY APPLIED', NotificationType::success()); + $this->notificationChecker->checkNotification('Voucher has been successfully applied', NotificationType::success()); } /** @@ -175,7 +175,7 @@ public function iShouldBeNotifiedThatTheVoucherHasBeenApplied(): void */ public function iShouldBeNotifiedThatTheVoucherIsInvalid(): void { - $this->notificationChecker->checkNotification('THIS VOUCHER IS INVALID', NotificationType::error()); + $this->notificationChecker->checkNotification('This voucher is invalid', NotificationType::error()); } /** @@ -184,7 +184,7 @@ public function iShouldBeNotifiedThatTheVoucherIsInvalid(): void public function iShouldBeNotifiedThatItNeedToOrderAtLeastOf(string $quantity, string $productName): void { $this->notificationChecker->checkNotification( - sprintf('YOU NEED TO ORDER AT LEAST %s UNITS OF %s.', $quantity, $productName), + sprintf('You need to order at least %s units of %s.', $quantity, $productName), NotificationType::error(), ); } @@ -195,7 +195,7 @@ public function iShouldBeNotifiedThatItNeedToOrderAtLeastOf(string $quantity, st public function iShouldBeNotifiedThatICanOnlyOrderAMaximumQuantityOf(string $quantity, string $productName): void { $this->notificationChecker->checkNotification( - sprintf('YOU CAN ORDER A MAXIMUM OF %s UNITS OF %s.', $quantity, $productName), + sprintf('You can order a maximum of %s units of %s.', $quantity, $productName), NotificationType::error(), ); } @@ -206,7 +206,7 @@ public function iShouldBeNotifiedThatICanOnlyOrderAMaximumQuantityOf(string $qua public function iShouldBeNotifiedThatDoesNotHaveSufficientStock(string $productName): void { $this->notificationChecker->checkNotification( - sprintf('%s DOES NOT HAVE SUFFICIENT STOCK.', $productName), + sprintf('%s does not have sufficient stock.', $productName), NotificationType::error(), ); } diff --git a/src/CoreShop/Behat/Element/Frontend/Account/RegisterElement.php b/src/CoreShop/Behat/Element/Frontend/Account/RegisterElement.php index 3f94b6e8e1..367392ad64 100644 --- a/src/CoreShop/Behat/Element/Frontend/Account/RegisterElement.php +++ b/src/CoreShop/Behat/Element/Frontend/Account/RegisterElement.php @@ -148,7 +148,7 @@ public function specifyAddressPhoneNumber(?string $phoneNumber): void public function acceptTermsOfService(): void { - $this->getElement('terms_of_service')->check(); + $this->getElement('terms_of_service')->click(); } protected function getDefinedElements(): array diff --git a/src/CoreShop/Behat/Page/Frontend/Checkout/CustomerPage.php b/src/CoreShop/Behat/Page/Frontend/Checkout/CustomerPage.php index 4339251125..b714c212e6 100644 --- a/src/CoreShop/Behat/Page/Frontend/Checkout/CustomerPage.php +++ b/src/CoreShop/Behat/Page/Frontend/Checkout/CustomerPage.php @@ -111,7 +111,7 @@ public function specifyGuestAddressCountry(?int $country): void public function acceptTermsOfService(): void { - $this->getElement('terms_of_service')->check(); + $this->getElement('terms_of_service')->click(); } public function submitGuestCheckout(): void diff --git a/src/CoreShop/Behat/Page/Frontend/Checkout/SummaryPage.php b/src/CoreShop/Behat/Page/Frontend/Checkout/SummaryPage.php index b6672d1dfa..6318d8831a 100644 --- a/src/CoreShop/Behat/Page/Frontend/Checkout/SummaryPage.php +++ b/src/CoreShop/Behat/Page/Frontend/Checkout/SummaryPage.php @@ -39,7 +39,7 @@ public function acceptTermsOfService(): void public function declineTermsOfService(): void { - $this->getElement('terms_of_service')->uncheck(); + $this->getElement('terms_of_service')->click(); } public function submitQuote(): void diff --git a/src/CoreShop/Bundle/FrontendBundle/Controller/CartController.php b/src/CoreShop/Bundle/FrontendBundle/Controller/CartController.php index 0481fe57f7..38bdebf80f 100644 --- a/src/CoreShop/Bundle/FrontendBundle/Controller/CartController.php +++ b/src/CoreShop/Bundle/FrontendBundle/Controller/CartController.php @@ -56,26 +56,24 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Validator\ConstraintViolationListInterface; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\Service\Attribute\SubscribedService; class CartController extends FrontendController { - #[Route('/coreshop_get_cart_items', name: 'coreshop_get_cart_items')] - public function widgetAction(Request $request, ShopperContextInterface $shopperContext): Response + public function widgetAction(Request $request): Response { $multiCartEnabled = $this->getParameter('coreshop.storage_list.multi_list.order'); $params = [ 'cart' => $this->getCart(), - 'multi_cart_enabled' => $this->getParameter('coreshop.storage_list.multi_list.order') + 'multi_cart_enabled' => $this->getParameter('coreshop.storage_list.multi_list.order'), ]; if ($multiCartEnabled) { $form = $this->container->get('form.factory')->createNamed('coreshop', CartListType::class, ['list' => $this->getCart()], [ - 'context' => $shopperContext->getContext(), + 'context' => $this->container->get(ShopperContextInterface::class)->getContext(), ]); $params['form'] = $form->createView(); @@ -270,7 +268,7 @@ public function addItemAction(Request $request): Response $addToCart->getCartItem()->getQuantity(), ); - $this->addFlash('coreshop_global_success', $this->container->get('translator')->trans('coreshop.ui.item_added')); + $this->addFlash('success', $this->container->get('translator')->trans('coreshop.ui.item_added')); if ($request->isXmlHttpRequest()) { return new JsonResponse([ @@ -282,7 +280,7 @@ public function addItemAction(Request $request): Response } foreach ($form->getErrors(true, true) as $error) { - $this->addFlash('coreshop_global_error', $error->getMessage()); + $this->addFlash('error', $error->getMessage()); } if ($request->isXmlHttpRequest()) { @@ -308,7 +306,6 @@ public function addItemAction(Request $request): Response [ 'form' => $form->createView(), 'product' => $product, - '_redirect' => $redirect, ], ); } diff --git a/src/CoreShop/Bundle/FrontendBundle/Controller/Extend/CartWidgetController.php b/src/CoreShop/Bundle/FrontendBundle/Controller/Extend/CartWidgetController.php index 37dd70a4e0..1eabcc2803 100644 --- a/src/CoreShop/Bundle/FrontendBundle/Controller/Extend/CartWidgetController.php +++ b/src/CoreShop/Bundle/FrontendBundle/Controller/Extend/CartWidgetController.php @@ -20,25 +20,25 @@ use CoreShop\Bundle\FrontendBundle\Controller\FrontendController; use CoreShop\Component\Core\Context\ShopperContextInterface; -use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\Routing\Attribute\Route; use Psr\Container\ContainerInterface; +use Symfony\Component\HttpFoundation\JsonResponse; class CartWidgetController extends FrontendController { private ShopperContextInterface $shopperContext; - public function __construct(ShopperContextInterface $shopperContext, ContainerInterface $container) - { + public function __construct( + ShopperContextInterface $shopperContext, + ContainerInterface $container, + ) { parent::__construct($container); $this->shopperContext = $shopperContext; } - public function cartNumberAction(): JsonResponse { $items = $this->shopperContext->getCart()->getItems(); + return new JsonResponse(count($items)); } - -} \ No newline at end of file +} diff --git a/src/CoreShop/Bundle/FrontendBundle/Resources/assets/js/app.ts b/src/CoreShop/Bundle/FrontendBundle/Resources/assets/js/app.ts index c22eaf9717..5c705f114e 100644 --- a/src/CoreShop/Bundle/FrontendBundle/Resources/assets/js/app.ts +++ b/src/CoreShop/Bundle/FrontendBundle/Resources/assets/js/app.ts @@ -11,12 +11,12 @@ import './scripts/shop.js'; import './scripts/variant.js'; import './scripts/map.js'; import {Carousel} from './scripts/carousel'; -import {CartInfo} from './scripts/cartInfo'; +//import {CartInfo} from './scripts/cartInfo'; document.addEventListener('DOMContentLoaded', function () { - const CartWidget = new CartInfo('/coreshop_get_cart_items', '.js-cart-widget'); + // const CartWidget = new CartInfo('/coreshop_get_cart_items', '.js-cart-widget'); const CarouselProducts = new Carousel(); - console.log(CartWidget); + //console.log(CartWidget); console.log(CarouselProducts); }) \ No newline at end of file diff --git a/src/CoreShop/Bundle/FrontendBundle/Resources/config/pimcore/routing.yml b/src/CoreShop/Bundle/FrontendBundle/Resources/config/pimcore/routing.yml index 3b82502031..4f0acd4744 100644 --- a/src/CoreShop/Bundle/FrontendBundle/Resources/config/pimcore/routing.yml +++ b/src/CoreShop/Bundle/FrontendBundle/Resources/config/pimcore/routing.yml @@ -4,8 +4,4 @@ coreshop_payment_after: defaults: _controller: CoreShop\Bundle\PayumBundle\Controller\PaymentController::afterCaptureAction -coreshop_get_cart_items: - path: /coreshop_get_cart_items - methods: [GET] - defaults: - _controller: CoreShop\Bundle\FrontendBundle\Controller\CartController::widgetAction + diff --git a/src/CoreShop/Bundle/FrontendBundle/Resources/public/build/app.js b/src/CoreShop/Bundle/FrontendBundle/Resources/public/build/app.js index 657f8ca4cc..84c4cdf5e0 100644 --- a/src/CoreShop/Bundle/FrontendBundle/Resources/public/build/app.js +++ b/src/CoreShop/Bundle/FrontendBundle/Resources/public/build/app.js @@ -1,2 +1,2 @@ /*! For license information please see app.js.LICENSE.txt */ -(()=>{var e={8434:()=>{window.coreshopQuantitySelector=function(e){!function(){const e=document.querySelectorAll("input.cs-unit-input"),t=document.querySelector("select.cs-unit-selector");t&&t.addEventListener("change",(function(){if(!this.dataset.csUnitIdentifier)return;const e=this.dataset.csUnitIdentifier,t=document.querySelector('input[data-cs-unit-identifier="'.concat(e,'"]')),i=1;t&&(t.step=i,t.dataset.csUnitPrecision=0,function(e,t,i){e.min=0,e.max=1e9,e.step=i,e.dataset.csUnitPrecision=t}(t,0,i.toString()))})),e&&e.forEach((function(e){!function(e,t,i){const n=document.createElement("div");n.classList.add("touchspin-container");const r=document.createElement("button");r.type="button",r.textContent="-",r.classList.add("touchspin-decrement");const s=document.createElement("button");s.type="button",s.textContent="+",s.classList.add("touchspin-increment"),e.parentNode.insertBefore(n,e),n.appendChild(r),n.appendChild(e),n.appendChild(s),r.addEventListener("click",(function(){let t=parseInt(e.value)||0;t-=parseInt(i),t>=0&&(e.value=t)})),s.addEventListener("click",(function(){let t=parseInt(e.value)||0;t+=parseInt(i),e.value=t})),e.addEventListener("input",(function(){let t=parseInt(e.value);isNaN(t)?e.value=0:e.value=t}))}(e,0,"1")}))}()}},5238:(e,t,i)=>{i(3921),window.coreshopVariantSelector=function(e){let t=null,i={},n=[];const r=function(){i.attributes.forEach((e=>{e.elements=t.querySelectorAll('[data-group="'.concat(e.group.id,'"]')),n.push(e)}))},s=function(){n.forEach(((e,t)=>{e.prevGroup=n[t-1]||null,e.nextGroup=n[t+1]||null,e.selected?x(e):v(e)}))},o=function(){n.forEach((e=>a(e)))},a=function(e){e.elements.forEach((t=>function(e,t){e.onchange=()=>l(t,e)}(t,e)))},l=function(e,i){window.variantReady=!1,t.dispatchEvent(f("change",{element:i})),i.value?c(e,i):d(e),window.variantReady=!0},c=function(e,i){e.selected=parseInt(i.value),t.dispatchEvent(f("select",{element:i})),e.nextGroup?(b(e.nextGroup),x(e.nextGroup)):(t.dispatchEvent(f("redirect",{element:i})),u())},d=function(e){delete e.selected,e.nextGroup&&b(e.nextGroup)},u=function(){const e=p(),t=h(e);null!=t&&t.url&&(window.location.href=t.url)},p=function(){return Object.fromEntries(n.filter((e=>e.selected)).map((e=>[e.group.id,e.selected])))},h=function(e){return Object.values(i.index).find((t=>JSON.stringify(t.attributes)===JSON.stringify(e)))},f=function(e){return new CustomEvent("variant_selector."+e,{bubbles:!0,cancelable:!1,detail:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}})},m=function(e){e.disabled=!0,e.checked=!1,"select"===e.tagName.toLowerCase()&&g(e)},g=function(e){e.querySelectorAll('option:not([value=""])').forEach((t=>e.removeChild(t)))},v=function(e){delete e.selected,e.elements.forEach(m)},b=function(e){for(;e;)v(e),e=e.nextGroup},y=function(e,t){return e.products.some((e=>function(e,t){return t.every((t=>{var n;return(null===(n=i.index[e.id].attributes)||void 0===n?void 0:n[t.group])===t.selected}))}(e,t)))},_=function(e){const t=[];let i=e.prevGroup;for(;i;)i.selected&&i.nextGroup&&t.push({group:i.group.id,selected:i.selected}),i=i.prevGroup;return t},w=function(e,t,i){"select"===e.tagName.toLowerCase()?t.forEach((t=>function(e,t,i){const n=new Option(t.attribute.name,t.attribute.id);n.id="attribute-"+t.attribute.id,i.selected===t.attribute.id&&(n.selected=!0),e.add(n),e.disabled=!1}(e,t,i))):t.forEach((t=>function(e,t,i){parseInt(e.dataset.group)===i.group.id&&parseInt(e.value)===t.attribute.id&&(e.disabled=!1,i.selected===t.attribute.id&&(e.checked=!0))}(e,t,i)))},x=function(e){const t=function(e,t){const i=_(t);return e.filter((e=>y(e,i)))}(e.attributes.slice(),e)||e.attributes;!function(e,t){e.elements.forEach((i=>w(i,t,e)))}(e,t)};e&&(t=e,i=JSON.parse(t.dataset.config),r(),s(),o())}},1432:(e,t,i)=>{i(2762),function(){"use strict";const e={init:function(e){const t={prototypePrefix:!1,containerSelector:!1,selectorAttr:!1,...e};document.querySelectorAll(this.selector).forEach((e=>{this.show(e,t,!1),e.addEventListener("change",(()=>{this.show(e,t,!0)}))}))},show:function(e,t,i){let n=e.value,r=e.id;if(t.selectorAttr){const i=Array.from(e.options).find((e=>e.value===n));i&&(n=i.getAttribute(t.selectorAttr))}t.prototypePrefix&&(r=t.prototypePrefix);const s=document.getElementById("".concat(r,"_").concat(n));let o=this.getContainer(t,s);o&&(s?!i&&o.innerHTML.trim()||(o.innerHTML=s.dataset.prototype):o.innerHTML="")},getContainer:function(e,t){if(e.containerSelector)return document.querySelector(e.containerSelector);{const e=t?t.dataset.container:null;return document.getElementById(e)}}};NodeList.prototype.handlePrototypes=function(t){if(e[t])return e[t].apply(this,Array.prototype.slice.call(arguments,1));if("object"!=typeof t&&t)throw new Error("Method "+t+" does not exist on handlePrototypes");return e.init.apply(this,arguments)},HTMLElement.prototype.handlePrototypes=function(t){return e.handlePrototypes.call([this],t)}}()},6876:()=>{document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("map-block");if(e){e.style.height=document.getElementById("map-wrapper").clientHeight+"px",window.addEventListener("load",(function(){const t={zoom:18,center:new google.maps.LatLng(48.1592513,14.02302510000004),disableDefaultUI:!0},i=new google.maps.Map(e,t);console.log(i)}))}}))},208:(e,t,i)=>{i(5440),i(2762),i(2953),i(8408);const n=window.shop||{};!function(e){e.init=function(){e.initChangeAddress(),e.initCartShipmentCalculator(),e.initQuantityValidator(),e.initCategorySelect(),function(e){const t={prototypePrefix:e.prototypePrefix||!1,containerSelector:e.containerSelector||!1,selectorAttr:e.selectorAttr||!1};function i(e,i){const s=n(e),o=t.prototypePrefix||e.id,a=document.getElementById("".concat(o,"_").concat(s)),l=r(a);!l||!i&&l.innerHTML.trim()||(l.innerHTML=a?a.dataset.prototype:"")}function n(e){return t.selectorAttr?e.querySelector('[value="'.concat(e.value,'"]')).getAttribute(t.selectorAttr):e.value}function r(e){return t.containerSelector?document.querySelector(t.containerSelector):e?document.querySelector(e.dataset.container):null}document.querySelectorAll("[data-".concat(t.prototypePrefix,"]")).forEach((function(e){i(e,!1),e.addEventListener("change",(function(){i(e,!0)}))}))}({prototypePrefix:"paymentProvider",containerSelector:".paymentSettings",selectorAttr:"data-factory"}),document.querySelectorAll(".copy-to-clipboard").forEach((function(e){e.addEventListener("click",(function(){!function(e){const t=e.dataset.target,i=document.getElementById(t);i&&(i.select(),i.setSelectionRange(0,99999),navigator.clipboard.writeText(i.value).then((()=>{console.log(e.dataset.copiedText)})))}(this)}))}))},e.initCategorySelect=function(){document.querySelectorAll(".site-reload").forEach((function(e){e.addEventListener("change",(function(){location.href=function(e,t,i){const n=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=-1!==e.indexOf("?")?"&":"?";return e.match(n)?e.replace(n,"$1"+t+"="+i+"$2"):e+r+t+"="+i}(window.location.href,this.name,this.value)}))}))},e.initQuantityValidator=function(){coreshopQuantitySelector({buttondown_class:"btn btn-secondary",buttonup_class:"btn btn-secondary"})},e.initCartShipmentCalculator=function(){document.addEventListener("submit",(function(e){const t=e.target.closest('form[name="coreshop_shipping_calculator"]');t&&function(e){event.preventDefault(),e.classList.add("loading"),e.querySelector('button[type="submit"]').setAttribute("disabled","disabled"),e.closest(".cart-shipment-calculation-box").querySelector(".cart-shipment-available-carriers").style.opacity=.2,fetch(e.action,{method:"POST",body:new URLSearchParams(new FormData(e))}).then((e=>e.text())).then((t=>function(e,t){e.classList.remove("loading"),e.closest(".cart-shipment-calculation-box").outerHTML=t}(e,t))).catch((t=>function(e,t){console.error("Error:",t),e.classList.remove("loading"),e.querySelector('button[type="submit"]').removeAttribute("disabled")}(e,t)))}(t)}))},e.initChangeAddress=function(){const e=document.querySelector(".checkout-step.step-address");if(!e)return;!function(e,t,i){e.addEventListener("change",(()=>function(e,t){const i=e.options[e.selectedIndex],n=JSON.parse(i.dataset.address).html;document.querySelector(".panel-invoice-address").innerHTML=n||"",function(e,t){e&&(e.disabled=t,t&&(e.checked=!1,e.dispatchEvent(new Event("change"))))}(t,"invoice"===i.dataset.addressType)}(e,i))),t.addEventListener("change",(()=>function(e){const t=e.options[e.selectedIndex],i=JSON.parse(t.dataset.address).html;document.querySelector(".panel-shipping-address").innerHTML=i||""}(t))),i&&i.addEventListener("change",(()=>function(e,t,i){const n=document.querySelector(".shipping-address-selector"),r=document.querySelector(".card-footer");e.checked?(n.style.display="none",i.value=t.value,i.dispatchEvent(new Event("change")),r&&r.classList.add("d-none")):(n.style.display="",r&&r.classList.remove("d-none"))}(i,e,t)))}(e.querySelector('select[name="coreshop[invoiceAddress]"]'),e.querySelector('select[name="coreshop[shippingAddress]"]'),e.querySelector('[name="coreshop[useInvoiceAsShipping]"]'))}}(n),document.addEventListener("DOMContentLoaded",(function(){n.init()}))},719:()=>{var e;e=window.variant||(window.variant={}),document.addEventListener("DOMContentLoaded",(function(){window.variantReady=!1,e.init(),window.variantReady=!0})),e.init=function(){const e=document.querySelector(".product-info__attributes");e&&(coreshopVariantSelector(e),e.addEventListener("variant_selector.select",(e=>{const t=document.querySelector(".product-info .product-details .options");if(t){const e=t.querySelectorAll('[type="submit"]');t.classList.add("disabled"),e.forEach((e=>{e.disabled=!0}))}})))}},9306:(e,t,i)=>{"use strict";var n=i(4901),r=i(6823),s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not a function")}},3506:(e,t,i)=>{"use strict";var n=i(3925),r=String,s=TypeError;e.exports=function(e){if(n(e))return e;throw new s("Can't set "+r(e)+" as a prototype")}},6469:(e,t,i)=>{"use strict";var n=i(8227),r=i(2360),s=i(4913).f,o=n("unscopables"),a=Array.prototype;void 0===a[o]&&s(a,o,{configurable:!0,value:r(null)}),e.exports=function(e){a[o][e]=!0}},7829:(e,t,i)=>{"use strict";var n=i(8183).charAt;e.exports=function(e,t,i){return t+(i?n(e,t).length:1)}},679:(e,t,i)=>{"use strict";var n=i(1625),r=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new r("Incorrect invocation")}},8551:(e,t,i)=>{"use strict";var n=i(34),r=String,s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(r(e)+" is not an object")}},9617:(e,t,i)=>{"use strict";var n=i(5397),r=i(5610),s=i(6198),o=function(e){return function(t,i,o){var a=n(t),l=s(a);if(0===l)return!e&&-1;var c,d=r(o,l);if(e&&i!=i){for(;l>d;)if((c=a[d++])!=c)return!0}else for(;l>d;d++)if((e||d in a)&&a[d]===i)return e||d||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},7680:(e,t,i)=>{"use strict";var n=i(9504);e.exports=n([].slice)},4488:(e,t,i)=>{"use strict";var n=i(7680),r=Math.floor,s=function(e,t){var i=e.length;if(i<8)for(var o,a,l=1;l0;)e[a]=e[--a];a!==l++&&(e[a]=o)}else for(var c=r(i/2),d=s(n(e,0,c),t),u=s(n(e,c),t),p=d.length,h=u.length,f=0,m=0;f
{"use strict";var n=i(9504),r=n({}.toString),s=n("".slice);e.exports=function(e){return s(r(e),8,-1)}},6955:(e,t,i)=>{"use strict";var n=i(2140),r=i(4901),s=i(2195),o=i(8227)("toStringTag"),a=Object,l="Arguments"===s(function(){return arguments}());e.exports=n?s:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=a(e),o))?i:l?s(t):"Object"===(n=s(t))&&r(t.callee)?"Arguments":n}},7740:(e,t,i)=>{"use strict";var n=i(9297),r=i(5031),s=i(7347),o=i(4913);e.exports=function(e,t,i){for(var a=r(t),l=o.f,c=s.f,d=0;d {"use strict";var n=i(9504),r=n({}.toString),s=n("".slice);e.exports=function(e){return s(r(e),8,-1)}},6955:(e,t,i)=>{"use strict";var n=i(2140),r=i(4901),s=i(2195),o=i(8227)("toStringTag"),a=Object,l="Arguments"===s(function(){return arguments}());e.exports=n?s:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=a(e),o))?i:l?s(t):"Object"===(n=s(t))&&r(t.callee)?"Arguments":n}},7740:(e,t,i)=>{"use strict";var n=i(9297),r=i(5031),s=i(7347),o=i(4913);e.exports=function(e,t,i){for(var a=r(t),l=o.f,c=s.f,d=0;d{p[t]=e-i})),h.forEach(((e,t)=>{h[t]=e+i}))}}if(Object.assign(e,{slides:d,snapGrid:p,slidesGrid:h,slidesSizesGrid:f}),i.centeredSlides&&i.cssMode&&!i.centeredSlidesBounds){Es(n,"--swiper-centered-offset-before",-p[0]+"px"),Es(n,"--swiper-centered-offset-after",e.size/2-f[f.length-1]/2+"px");const t=-e.snapGrid[0],i=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+i))}if(u!==c&&e.emit("slidesLengthChange"),p.length!==v&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==b&&e.emit("slidesGridLengthChange"),i.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(l||i.cssMode||"slide"!==i.effect&&"fade"!==i.effect)){const t=`${i.containerModifierClass}backface-hidden`,n=e.el.classList.contains(t);u<=i.maxBackfaceHiddenSlides?n||e.el.classList.add(t):n&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,i=[],n=t.virtual&&t.params.virtual.enabled;let r,s=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const o=e=>n?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{i.push(e)}));else for(r=0;r{p[t]=e-i})),h.forEach(((e,t)=>{h[t]=e+i}))}}if(Object.assign(e,{slides:d,snapGrid:p,slidesGrid:h,slidesSizesGrid:f}),i.centeredSlides&&i.cssMode&&!i.centeredSlidesBounds){Es(n,"--swiper-centered-offset-before",-p[0]+"px"),Es(n,"--swiper-centered-offset-after",e.size/2-f[f.length-1]/2+"px");const t=-e.snapGrid[0],i=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+i))}if(u!==c&&e.emit("slidesLengthChange"),p.length!==v&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==b&&e.emit("slidesGridLengthChange"),i.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(l||i.cssMode||"slide"!==i.effect&&"fade"!==i.effect)){const t=`${i.containerModifierClass}backface-hidden`,n=e.el.classList.contains(t);u<=i.maxBackfaceHiddenSlides?n||e.el.classList.add(t):n&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,i=[],n=t.virtual&&t.params.virtual.enabled;let r,s=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const o=e=>n?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{i.push(e)}));else for(r=0;r