From 889f1ea0c3431a6554a64196acbb2f3e2ca3e54a Mon Sep 17 00:00:00 2001 From: Florian Eisenmenger Date: Fri, 4 Mar 2022 10:23:52 +0100 Subject: [PATCH] com --- .../js/zenit-platform-atmos-set2.js | 66 ++++++++++++++++-- .../src/Resources/views/.DS_Store | Bin 0 -> 6148 bytes .../src/Resources/views/storefront/.DS_Store | Bin 0 -> 6148 bytes .../views/storefront/component/.DS_Store | Bin 0 -> 6148 bytes .../component/account/register.html.twig | 10 +++ .../layout/header/header-minimal.html.twig | 27 +++++++ .../storefront/layout/header/header.html.twig | 8 ++- .../views/storefront/layout/meta.html.twig | 9 +++ .../order-history/order-item.html.twig | 16 +++++ .../summary/summary-shipping.html.twig | 1 + .../page/product-detail/description.html.twig | 17 ++--- .../page/product-detail/index.html.twig | 17 ++--- 12 files changed, 138 insertions(+), 33 deletions(-) create mode 100644 zenitPlatformAtmosSet2/src/Resources/views/.DS_Store create mode 100644 zenitPlatformAtmosSet2/src/Resources/views/storefront/.DS_Store create mode 100644 zenitPlatformAtmosSet2/src/Resources/views/storefront/component/.DS_Store create mode 100644 zenitPlatformAtmosSet2/src/Resources/views/storefront/component/account/register.html.twig create mode 100644 zenitPlatformAtmosSet2/src/Resources/views/storefront/layout/header/header-minimal.html.twig create mode 100644 zenitPlatformAtmosSet2/src/Resources/views/storefront/layout/meta.html.twig create mode 100644 zenitPlatformAtmosSet2/src/Resources/views/storefront/page/account/order-history/order-item.html.twig diff --git a/zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js b/zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js index e7b231f..6d251a7 100644 --- a/zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js +++ b/zenitPlatformAtmosSet2/src/Resources/app/storefront/dist/storefront/js/zenit-platform-atmos-set2.js @@ -18,7 +18,7 @@ $(document).ready(function() { fp.config.onChange.push(function() { manipulateDateInputValue(); }); - + // If Austria and same day delivery is checked change to DPD if ($(".confirm-address-shipping").data("iso") === "AT") { inputDPD.attr('checked', true).trigger("click"); @@ -27,13 +27,21 @@ $(document).ready(function() { // No shop inputShopPickup.parents(".shipping-method").hide(); } - + // Call changeDelivery $("[name='shippingMethodId']").on('change', () => { 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() { @@ -50,7 +58,7 @@ function changeDelivery(fp) { $(this).addClass("active"); $(".confirm-delivery-date #dtgs-datepicker-inputfield").val(spawnDateInputValue + " " + $(this).text()); }); - + if ($(".confirm-address-shipping").data("iso") !== "AT") { if (inputShopPickup.is(':checked')) { // Abholung im Ladengeschäft @@ -87,16 +95,16 @@ function changeDelivery(fp) { function setIncludedDays(delivery, fp, addDays) { let spwnDateTemp = new Date(); spwnDateTemp.setDate(spwnDateTemp.getDate() + addDays); - + let spwnTime = parseInt(spwnDateTemp.getHours() + "" + spwnDateTemp.getMinutes()); if (delivery === "evening" && spwnTime > 1300) { spwnDateTemp.setDate(spwnDateTemp.getDate() + 1); } else if (delivery === "dpd" && spwnTime > 1400) { - spwnDateTemp.setDate(spwnDateTemp.getDate() + 1); + spwnDateTemp.setDate(spwnDateTemp.getDate() + 1); } let spwnDate = fp.formatDate(spwnDateTemp, "d.m.Y"); fp.set("minDate", spwnDate); - + fp.set("enable", [ function(date) { 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"); + } +} \ No newline at end of file diff --git a/zenitPlatformAtmosSet2/src/Resources/views/.DS_Store b/zenitPlatformAtmosSet2/src/Resources/views/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..0e32f8478b262c1f22c1e0937842d7ea42f3c5f5 GIT binary patch literal 6148 zcmeHKQBK1!47FiG75waz&sFMztj_-L1D8+`YJKW@S`xBwU74m`(3S|LdL zLWtQ?@|?tW;wLq!iHPS9?TlzjL+4MkefE)(c4PRZHN zX^ZnloP6*6?RL>MF?L8SZ_q7g^&7aQ0W&+qi~^7eZ5Q_McL2ivai z58MB--mJQ~T4GPh#l;zL2AlzB;OH5!=b*SadM2CzXTTZw%7EMt0Zp(p92C>lfi9H* zzzL?4K$luVe1c(VI4EKT!s-fCSGE#^)gAM}>`KEyQQe8H_+Z=lvv}dOJK~3APFyN_ z?+iEtV+KxjIF42u*a4s7ie2ar5_86 zjFnmWXZh6WilLLb=^$yk{bTub;HF*A*oQ)dQ``0a1fAhoWo1W1sT)L{zA6s<4y2qM z1(7d?O)-f4M9t&q0Am)j&MK>;(eK7)m2cF?RX%FeH>$i*Z;ZzlTm4nr+CT4IU5{?Y zw|AOe3co}p%LXTK4@S;T{iGdw@UF5fCmdeXoVMu2lUee!dZN`bbTPK~_WJPrxcynC z|HaI>`<0b1oqiOG=mJ)oZ2ZHkqKOP31IR!=1LnYBOZj2+A_K_4f6Rb9A2_H)+hC?q z9UU;J767mWZY5yLUP9JzgSNp;BSb)`E(O%3)U+5>mxG_1JlkNVQI`{Hnh$DLrlv!o zYIT^Ot8_wbjW{9$$iOTEMg3Tj_y6wa{r_wcJ|P3hz(2(REw!9h6SidT*165eyOx8V sgG!NknZ{`e80sp9TzM6*fhqw%mj25FHdv~S*@8weN19^FphNAb$aGtEq8r)Opv%d`Ak z{@8Abz8yPpFRD4+L)qJP;+AXdJt2az?YR4Xvwu=t*b-sv_+hiFl6|iUAx8&(=!t$! z^g=IE^VoWTu^h{t6c-1B)#`eQuT_R6KB!jKO1xUB4u?6mxLn@YIc;BF4X%ebx0+lE z-=UIugCn>DBehR2Y6LDksZ2@@24`ivA=+<08JL6tb9}JEBuN;H3?Kvlf&qCxa8QYs!9=4vI-pS{ z0ALo}O2C%2gv{XvErW?h7y+R=6;P*AQ({n^4t{RpEQ5(goldAJKB!rlnhJ%g)nR_F z!U?rBVv7tQ1MeA_(%quG|F=J{|KBHJ4;erP{uBc=Tes^q*pj(hQ=5}_EeAaXl_KL3 njpGzB)Kv_z@+w{eRRVr44M59aq7ghG_#>cbzy=xkQ3hTCc$0ej literal 0 HcmV?d00001 diff --git a/zenitPlatformAtmosSet2/src/Resources/views/storefront/component/account/register.html.twig b/zenitPlatformAtmosSet2/src/Resources/views/storefront/component/account/register.html.twig new file mode 100644 index 0000000..92fa73c --- /dev/null +++ b/zenitPlatformAtmosSet2/src/Resources/views/storefront/component/account/register.html.twig @@ -0,0 +1,10 @@ +{% sw_extends '@Storefront/storefront/component/account/register.html.twig' %} + +{% block component_account_register_submit %} +
+ +
+{% endblock %} \ No newline at end of file diff --git a/zenitPlatformAtmosSet2/src/Resources/views/storefront/layout/header/header-minimal.html.twig b/zenitPlatformAtmosSet2/src/Resources/views/storefront/layout/header/header-minimal.html.twig new file mode 100644 index 0000000..f702432 --- /dev/null +++ b/zenitPlatformAtmosSet2/src/Resources/views/storefront/layout/header/header-minimal.html.twig @@ -0,0 +1,27 @@ +{% sw_extends '@Storefront/storefront/layout/header/header-minimal.html.twig' %} + +{% block layout_header_minimal_logo %} + +{% endblock %} + +{% block layout_header_minimal_contact %} +
+ {{ "header.supportInfo"|trans|sw_sanitize }} +
+{% endblock %} + +{% block layout_header_minimal_button %} + +{% endblock %} \ No newline at end of file diff --git a/zenitPlatformAtmosSet2/src/Resources/views/storefront/layout/header/header.html.twig b/zenitPlatformAtmosSet2/src/Resources/views/storefront/layout/header/header.html.twig index af7e24e..654a085 100644 --- a/zenitPlatformAtmosSet2/src/Resources/views/storefront/layout/header/header.html.twig +++ b/zenitPlatformAtmosSet2/src/Resources/views/storefront/layout/header/header.html.twig @@ -1,8 +1,14 @@ {% sw_extends '@Storefront/storefront/layout/header/header.html.twig' %} - {% block layout_header_actions %}
+ {% block layout_header_top_bar_language %} + {% if not context.customer %} +
+ {% sw_include '@CogiDetectLocation/storefront/layout/header/actions/country-widget.html.twig' %} +
+ {% endif %} + {% endblock %} {% block layout_header_search_toggle %}
diff --git a/zenitPlatformAtmosSet2/src/Resources/views/storefront/layout/meta.html.twig b/zenitPlatformAtmosSet2/src/Resources/views/storefront/layout/meta.html.twig new file mode 100644 index 0000000..8842b39 --- /dev/null +++ b/zenitPlatformAtmosSet2/src/Resources/views/storefront/layout/meta.html.twig @@ -0,0 +1,9 @@ +{% sw_extends '@Storefront/storefront/layout/meta.html.twig' %} + +{% block layout_head_title %} + {% apply spaceless %} + {% block layout_head_title_inner %} + {{ metaTitle }} | easyfit.de + {% endblock %} + {% endapply %} +{% endblock %} \ No newline at end of file diff --git a/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/account/order-history/order-item.html.twig b/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/account/order-history/order-item.html.twig new file mode 100644 index 0000000..51a13f0 --- /dev/null +++ b/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/account/order-history/order-item.html.twig @@ -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 %} \ No newline at end of file diff --git a/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/checkout/summary/summary-shipping.html.twig b/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/checkout/summary/summary-shipping.html.twig index f63e1a5..abe7cb1 100644 --- a/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/checkout/summary/summary-shipping.html.twig +++ b/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/checkout/summary/summary-shipping.html.twig @@ -12,6 +12,7 @@ data-url="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}"> {{ "checkout.summaryShipping"|trans|sw_sanitize }} + {{ "checkout.freeShipping"|trans|sw_sanitize }} {% endblock %} diff --git a/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/product-detail/description.html.twig b/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/product-detail/description.html.twig index d9c965d..772f9b6 100644 --- a/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/product-detail/description.html.twig +++ b/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/product-detail/description.html.twig @@ -1,16 +1,7 @@ {% 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 %} +
+ {{ "detail.descriptionTitle"|trans|sw_sanitize }} {{ page.product.translated.name }} +
{% endblock %} \ No newline at end of file diff --git a/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/product-detail/index.html.twig b/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/product-detail/index.html.twig index 08cec4a..0363ab7 100644 --- a/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/product-detail/index.html.twig +++ b/zenitPlatformAtmosSet2/src/Resources/views/storefront/page/product-detail/index.html.twig @@ -1,18 +1,9 @@ {% 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) %} -
- +{% block zen_page_product_detail_short_description %} + {% if page.product.customFields.custom_description_small_description and theme_config('zen-product-details-short-description') %} +
+ {{ page.product.customFields.custom_description_small_description|trans|sw_sanitize }}
{% endif %} - - {% if page.product.customFields.custom_weightlossplan_day1_shake is defined %} - Shake: {{ page.product.customFields.custom_weightlossplan_day1_shake|trans }} - {% endif %} {% endblock %} \ No newline at end of file