| @@ -18,7 +18,7 @@ $(document).ready(function() { | |||||
| fp.config.onChange.push(function() { | fp.config.onChange.push(function() { | ||||
| manipulateDateInputValue(); | manipulateDateInputValue(); | ||||
| }); | }); | ||||
| // If Austria and same day delivery is checked change to DPD | // If Austria and same day delivery is checked change to DPD | ||||
| if ($(".confirm-address-shipping").data("iso") === "AT") { | if ($(".confirm-address-shipping").data("iso") === "AT") { | ||||
| inputDPD.attr('checked', true).trigger("click"); | inputDPD.attr('checked', true).trigger("click"); | ||||
| @@ -27,13 +27,21 @@ $(document).ready(function() { | |||||
| // No shop | // No shop | ||||
| inputShopPickup.parents(".shipping-method").hide(); | inputShopPickup.parents(".shipping-method").hide(); | ||||
| } | } | ||||
| // Call changeDelivery | // Call changeDelivery | ||||
| $("[name='shippingMethodId']").on('change', () => { | $("[name='shippingMethodId']").on('change', () => { | ||||
| changeDelivery(fp); | changeDelivery(fp); | ||||
| }); | }); | ||||
| changeDelivery(fp); | changeDelivery(fp); | ||||
| } | } | ||||
| var sticky = $(".thumbnail-container"), | |||||
| parentContainer = sticky.parents(".aku-cms-factory-element"), | |||||
| stickyTop = sticky.offset().top; | |||||
| tagBar(sticky, parentContainer, stickyTop); | |||||
| $(window).on('resize scroll', function() { | |||||
| tagBar(sticky, parentContainer, stickyTop); | |||||
| }); | |||||
| }); | }); | ||||
| function manipulateDateInputValue() { | function manipulateDateInputValue() { | ||||
| @@ -50,7 +58,7 @@ function changeDelivery(fp) { | |||||
| $(this).addClass("active"); | $(this).addClass("active"); | ||||
| $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateInputValue + " " + $(this).text()); | $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateInputValue + " " + $(this).text()); | ||||
| }); | }); | ||||
| if ($(".confirm-address-shipping").data("iso") !== "AT") { | if ($(".confirm-address-shipping").data("iso") !== "AT") { | ||||
| if (inputShopPickup.is(':checked')) { | if (inputShopPickup.is(':checked')) { | ||||
| // Abholung im Ladengeschäft | // Abholung im Ladengeschäft | ||||
| @@ -87,16 +95,16 @@ function changeDelivery(fp) { | |||||
| function setIncludedDays(delivery, fp, addDays) { | function setIncludedDays(delivery, fp, addDays) { | ||||
| let spwnDateTemp = new Date(); | let spwnDateTemp = new Date(); | ||||
| spwnDateTemp.setDate(spwnDateTemp.getDate() + addDays); | spwnDateTemp.setDate(spwnDateTemp.getDate() + addDays); | ||||
| let spwnTime = parseInt(spwnDateTemp.getHours() + "" + spwnDateTemp.getMinutes()); | let spwnTime = parseInt(spwnDateTemp.getHours() + "" + spwnDateTemp.getMinutes()); | ||||
| if (delivery === "evening" && spwnTime > 1300) { | if (delivery === "evening" && spwnTime > 1300) { | ||||
| spwnDateTemp.setDate(spwnDateTemp.getDate() + 1); | spwnDateTemp.setDate(spwnDateTemp.getDate() + 1); | ||||
| } else if (delivery === "dpd" && spwnTime > 1400) { | } else if (delivery === "dpd" && spwnTime > 1400) { | ||||
| spwnDateTemp.setDate(spwnDateTemp.getDate() + 1); | |||||
| spwnDateTemp.setDate(spwnDateTemp.getDate() + 1); | |||||
| } | } | ||||
| let spwnDate = fp.formatDate(spwnDateTemp, "d.m.Y"); | let spwnDate = fp.formatDate(spwnDateTemp, "d.m.Y"); | ||||
| fp.set("minDate", spwnDate); | fp.set("minDate", spwnDate); | ||||
| fp.set("enable", [ | fp.set("enable", [ | ||||
| function(date) { | function(date) { | ||||
| let day = date.getDate(); | let day = date.getDate(); | ||||
| @@ -116,3 +124,49 @@ function setIncludedDays(delivery, fp, addDays) { | |||||
| } | } | ||||
| ]); | ]); | ||||
| } | } | ||||
| $.fn.isInViewport = function() { | |||||
| var elementTop = $(this).offset().top + 50; | |||||
| var elementBottom = elementTop + $(this).outerHeight(); | |||||
| var viewportTop = $(window).scrollTop(); | |||||
| var viewportBottom = viewportTop + $(window).height(); | |||||
| return elementBottom > viewportTop && elementTop < viewportBottom; | |||||
| }; | |||||
| function tagBar(sticky, parentContainer, stickyTop) { | |||||
| var headerHeight = $(".header-inner").outerHeight() + 13, | |||||
| windowTop = $(window).scrollTop() + headerHeight; | |||||
| if (stickyTop < windowTop && parentContainer.height() + parentContainer.offset().top - sticky.height() > windowTop) { | |||||
| sticky.css('position', 'fixed').css('top', headerHeight + 'px'); | |||||
| } else { | |||||
| sticky.css('position', 'absolute').css('top', 0); | |||||
| } | |||||
| sticky.find("figure").removeClass("active"); | |||||
| if ($("#day1").isInViewport() && !$("#day2").isInViewport() && | |||||
| !$("#day3").isInViewport() && !$("#day4").isInViewport() && | |||||
| !$("#day5").isInViewport() && !$("#day6").isInViewport()) { | |||||
| sticky.find(".day1Image").addClass("active"); | |||||
| } | |||||
| if ($("#day2").isInViewport() && | |||||
| !$("#day3").isInViewport() && !$("#day4").isInViewport() && | |||||
| !$("#day5").isInViewport() && !$("#day6").isInViewport()) { | |||||
| sticky.find(".day2Image").addClass("active"); | |||||
| } | |||||
| if ($("#day3").isInViewport() && !$("#day4").isInViewport() && | |||||
| !$("#day5").isInViewport() && !$("#day6").isInViewport()) { | |||||
| sticky.find(".day3Image").addClass("active"); | |||||
| } | |||||
| if ($("#day4").isInViewport() && | |||||
| !$("#day5").isInViewport() && !$("#day6").isInViewport()) { | |||||
| sticky.find(".day4Image").addClass("active"); | |||||
| } | |||||
| if ($("#day5").isInViewport() && !$("#day6").isInViewport()) { | |||||
| sticky.find(".day5Image").addClass("active"); | |||||
| } | |||||
| if ($("#day6").isInViewport()) { | |||||
| sticky.find(".day6Image").addClass("active"); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,10 @@ | |||||
| {% sw_extends '@Storefront/storefront/component/account/register.html.twig' %} | |||||
| {% block component_account_register_submit %} | |||||
| <div class="register-submit"> | |||||
| <button type="submit" | |||||
| class="btn btn-outline-primary"> | |||||
| {{ "account.registerSubmit"|trans|sw_sanitize }} | |||||
| </button> | |||||
| </div> | |||||
| {% endblock %} | |||||
| @@ -0,0 +1,27 @@ | |||||
| {% sw_extends '@Storefront/storefront/layout/header/header-minimal.html.twig' %} | |||||
| {% block layout_header_minimal_logo %} | |||||
| <div class="col-6 col-md-2 header-minimal-logo"> | |||||
| {% sw_include '@Storefront/storefront/layout/header/logo.html.twig' %} | |||||
| </div> | |||||
| {% endblock %} | |||||
| {% block layout_header_minimal_contact %} | |||||
| <div class="col-md-6 header-minimal-contact"> | |||||
| {{ "header.supportInfo"|trans|sw_sanitize }} | |||||
| </div> | |||||
| {% endblock %} | |||||
| {% block layout_header_minimal_button %} | |||||
| <div class="col-6 col-md-4 header-minimal-back-to-shop"> | |||||
| <a href="{{ path('frontend.home.page') }}" | |||||
| class="btn header-minimal-back-to-shop-button" | |||||
| title="{{ "checkout.finishButtonBackToShop"|trans|striptags }}"> | |||||
| {% sw_icon 'arrow-medium-left' style { | |||||
| 'size': 'sm', | |||||
| 'pack': 'solid' | |||||
| } %} | |||||
| <span class="d-none d-sm-inline-block">{{ "checkout.finishButtonBackToShop"|trans|striptags }}</span> | |||||
| </a> | |||||
| </div> | |||||
| {% endblock %} | |||||
| @@ -1,8 +1,14 @@ | |||||
| {% sw_extends '@Storefront/storefront/layout/header/header.html.twig' %} | {% sw_extends '@Storefront/storefront/layout/header/header.html.twig' %} | ||||
| {% block layout_header_actions %} | {% block layout_header_actions %} | ||||
| <div class="header-actions-col {{ actionClasses }}"> | <div class="header-actions-col {{ actionClasses }}"> | ||||
| <div class="row no-gutters"> | <div class="row no-gutters"> | ||||
| {% block layout_header_top_bar_language %} | |||||
| {% if not context.customer %} | |||||
| <div class="col-auto d-none d-lg-block"> | |||||
| {% sw_include '@CogiDetectLocation/storefront/layout/header/actions/country-widget.html.twig' %} | |||||
| </div> | |||||
| {% endif %} | |||||
| {% endblock %} | |||||
| {% block layout_header_search_toggle %} | {% block layout_header_search_toggle %} | ||||
| <div class="col-auto{% if theme_config('zen-search-style') is same as('default') %} d-sm-none"{% endif %}"> | <div class="col-auto{% if theme_config('zen-search-style') is same as('default') %} d-sm-none"{% endif %}"> | ||||
| <div class="search-toggle"> | <div class="search-toggle"> | ||||
| @@ -0,0 +1,9 @@ | |||||
| {% sw_extends '@Storefront/storefront/layout/meta.html.twig' %} | |||||
| {% block layout_head_title %} | |||||
| <title itemprop="name">{% apply spaceless %} | |||||
| {% block layout_head_title_inner %} | |||||
| {{ metaTitle }} | easyfit.de | |||||
| {% endblock %} | |||||
| {% endapply %}</title> | |||||
| {% endblock %} | |||||
| @@ -0,0 +1,16 @@ | |||||
| {% sw_extends '@Storefront/storefront/page/account/order-history/order-item.html.twig' %} | |||||
| {% block page_account_order_item_context_menu_content_change_payment_button %} | |||||
| {% endblock %} | |||||
| {% block page_account_order_item_order_table_header_cell_shipping_status %} | |||||
| {% endblock %} | |||||
| {% block page_account_order_item_order_table_header_cell_payment_status %} | |||||
| {% endblock %} | |||||
| {% block page_account_order_item_order_table_body_cell_shipping_status %} | |||||
| {% endblock %} | |||||
| {% block page_account_order_item_order_table_body_cell_payment_status %} | |||||
| {% endblock %} | |||||
| @@ -12,6 +12,7 @@ | |||||
| data-url="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}"> | data-url="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}"> | ||||
| {{ "checkout.summaryShipping"|trans|sw_sanitize }} | {{ "checkout.summaryShipping"|trans|sw_sanitize }} | ||||
| </a> | </a> | ||||
| <span>{{ "checkout.freeShipping"|trans|sw_sanitize }}</span> | |||||
| </dt> | </dt> | ||||
| {% endblock %} | {% endblock %} | ||||
| @@ -1,16 +1,7 @@ | |||||
| {% sw_extends '@Storefront/storefront/page/product-detail/description.html.twig' %} | {% sw_extends '@Storefront/storefront/page/product-detail/description.html.twig' %} | ||||
| {% block page_product_detail_description_content_text %} | |||||
| {{ parent() }} | |||||
| {% if product.customFields.custom_weightlossplan_day1_image is defined %} | |||||
| {{ product.customFields.custom_weightlossplan_day1_image }} | |||||
| {% endif %} | |||||
| {% if product.customFields.custom_weightlossplan_day1_notice is defined %} | |||||
| {{ product.customFields.custom_weightlossplan_day1_notice|trans }} | |||||
| {% endif %} | |||||
| {% if product.customFields.custom_weightlossplan_day1_shake is defined %} | |||||
| {{ product.customFields.custom_weightlossplan_day1_shake|trans }} | |||||
| {% endif %} | |||||
| {% block page_product_detail_description_title %} | |||||
| <div class="h3 product-detail-description-title"> | |||||
| {{ "detail.descriptionTitle"|trans|sw_sanitize }} {{ page.product.translated.name }} | |||||
| </div> | |||||
| {% endblock %} | {% endblock %} | ||||
| @@ -1,18 +1,9 @@ | |||||
| {% sw_extends '@Storefront/storefront/page/product-detail/index.html.twig' %} | {% sw_extends '@Storefront/storefront/page/product-detail/index.html.twig' %} | ||||
| {% block page_product_detail_content %} | |||||
| {{ parent() }} | |||||
| {% if page.product.customFields.custom_weightlossplan_day1_image is defined %} | |||||
| {% set day1ImageId = page.product.customFields.custom_weightlossplan_day1_image %} | |||||
| {% set mediaCollection = searchMedia([day1ImageId], context.context) %} | |||||
| {% set day1Image = mediaCollection.get(day1ImageId) %} | |||||
| <div class="day1Image"> | |||||
| <img src="{{ day1Image.url }}"> | |||||
| {% block zen_page_product_detail_short_description %} | |||||
| {% if page.product.customFields.custom_description_small_description and theme_config('zen-product-details-short-description') %} | |||||
| <div class="product-detail-short-description"> | |||||
| {{ page.product.customFields.custom_description_small_description|trans|sw_sanitize }} | |||||
| </div> | </div> | ||||
| {% endif %} | {% endif %} | ||||
| {% if page.product.customFields.custom_weightlossplan_day1_shake is defined %} | |||||
| Shake: {{ page.product.customFields.custom_weightlossplan_day1_shake|trans }} | |||||
| {% endif %} | |||||
| {% endblock %} | {% endblock %} | ||||