From b71cd4a169cb411339508c21a0b321ba68552988 Mon Sep 17 00:00:00 2001 From: Henning Leutz <leutz@pcsg.de> Date: Thu, 19 Sep 2024 09:55:07 +0200 Subject: [PATCH 01/21] fix: spinner loading during basket loading --- bin/javascript/init.js | 2 +- template/menu/menuSuffix.html | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/javascript/init.js b/bin/javascript/init.js index 6b17cc4..80d9273 100644 --- a/bin/javascript/init.js +++ b/bin/javascript/init.js @@ -364,7 +364,7 @@ window.addEvent('domready', function () { new Element('span', { 'class': 'quiqqer-order-basketButton-quantity quiqqer-order-basketButton-batch-custom', - html : '0' + html : '<span class="fa fa-spinner fa-spin"></span>' }).inject(BasketNode); if (BASKET_STYLE && BASKET_STYLE === 'full') { diff --git a/template/menu/menuSuffix.html b/template/menu/menuSuffix.html index 5f7f6b3..248a899 100644 --- a/template/menu/menuSuffix.html +++ b/template/menu/menuSuffix.html @@ -10,14 +10,18 @@ <button disabled class="quiqqer-order-basketButton button--callToAction tpl-btn basket-style-{$basketStyle}" style="float: right;"><span class="quiqqer-order-basketButton-icon-custom"><span class="fa fa-shopping-basket"></span></span><span - class="quiqqer-order-basketButton-quantity quiqqer-order-basketButton-batch-custom">0</span></button> + class="quiqqer-order-basketButton-quantity quiqqer-order-basketButton-batch-custom"> + <span class="fa fa-spinner fa-spin"></span> + </span></button> {else} <button disabled class="quiqqer-order-basketButton button--callToAction tpl-btn basket-style-full" style="float: right;"> <span class="quiqqer-order-basketButton-icon-custom"> <span class="fa fa-shopping-basket"></span> </span> - <span class="quiqqer-order-basketButton-quantity quiqqer-order-basketButton-batch-custom">0</span> + <span class="quiqqer-order-basketButton-quantity quiqqer-order-basketButton-batch-custom"> + <span class="fa fa-spinner fa-spin"></span> + </span> <span class="quiqqer-order-basketButton-sum"> {*$InitialBasketPrice->getDisplayPrice()*} {$initialBasketPrice} -- GitLab From 3881f82d87dfb933ec1e59161ff3cbc7ba9584ec Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Thu, 19 Sep 2024 15:55:16 +0200 Subject: [PATCH 02/21] fix: standardized and simplified options for cart button click action --- bin/css/mini-basket.css | 1 + bin/css/style.css | 5 +++-- bin/css/variables.css | 1 + bin/javascript/init.js | 2 +- composer.json | 2 +- index.html | 20 +++++++++---------- locale.xml | 32 +++++++++++++++++-------------- settings.xml | 32 +++++++++++++++++++------------ src/QUI/TemplateCologne/Utils.php | 11 ++++------- 9 files changed, 59 insertions(+), 47 deletions(-) diff --git a/bin/css/mini-basket.css b/bin/css/mini-basket.css index 62be613..783dff8 100644 --- a/bin/css/mini-basket.css +++ b/bin/css/mini-basket.css @@ -11,6 +11,7 @@ max-height: calc(100vh - 130px); /* header height + top bar height */ padding: 0 !important; width: 350px; + top: calc(var(--_qui-cologne-header-height, 100px) - 1px) !important; /* -1 because of border width */ } .quiqqer-order-basket-small-container > .qui-control { diff --git a/bin/css/style.css b/bin/css/style.css index a184fee..5eaf9e5 100644 --- a/bin/css/style.css +++ b/bin/css/style.css @@ -747,7 +747,7 @@ a.toTop:before { border-bottom: 1px solid #ddd; box-shadow: 0 0 20px 0 rgba(57, 57, 57, 0); display: flex; - height: 100px; + height: var(--_qui-cologne-header-height, 100px); justify-content: space-between; left: 0; position: relative; @@ -758,8 +758,9 @@ a.toTop:before { } .cologne-header-fixed { + --_qui-cologne-header-height: 60px; + box-shadow: 0 0 20px 0 rgba(57, 57, 57, 0.2); - height: 60px; position: fixed; z-index: 100; /* Because of the search dropdown */ } diff --git a/bin/css/variables.css b/bin/css/variables.css index 47ad80e..434620f 100644 --- a/bin/css/variables.css +++ b/bin/css/variables.css @@ -17,6 +17,7 @@ --bg-primary: #ddd; --bg-secondary: #f5f5f5; + --_qui-cologne-header-height: 100px; /* ecoyn / ecommerce */ --_qui-order-basket-articles-image-width: var(--qui-order-basket-articles-image-width, 100px); diff --git a/bin/javascript/init.js b/bin/javascript/init.js index 80d9273..aa506c1 100644 --- a/bin/javascript/init.js +++ b/bin/javascript/init.js @@ -343,7 +343,7 @@ window.addEvent('domready', function () { 'package/quiqqer/order/bin/frontend/controls/basket/Button' ], function (Basket) { new Basket({ - open : BASKET_OPEN.toInt(), + action : BASKET_ACTION, events: { onCreate: function (Basket) { var BasketNode = Basket.getElm(), diff --git a/composer.json b/composer.json index 5689cd4..dd16d0b 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "quiqqer/core": "^2", "quiqqer/erp": "^3", "quiqqer/products": "^2", - "quiqqer/order": "^2", + "quiqqer/order": "^2.7.7", "quiqqer/product-bricks": "^2", "quiqqer/frontend-users": "^2", "quiqqer/menu": "^3", diff --git a/index.html b/index.html index 055e04b..145eb88 100644 --- a/index.html +++ b/index.html @@ -10,16 +10,16 @@ {$Template->getHeader()} <script> - var BASKET_STYLE = "{$basketStyle}"; - var BASKET_OPEN = "{$basketOpen}"; - var INITAL_BASKET_PRICE = "{$initialBasketPrice}"; - var COUNT_LANGUAGES = "{$countLanguages}"; - var SHOW_CATEGORY_MENU = "{$showCategoryMenu}"; - var REGISTER_URL = "{$registerSiteUrl}"; - var SHOW_MENU_AFTER_SCROLL_POS = "{$showNavAfterScroll}"; // The number of pixels from top which the menu will be displayed. - var SHOW_MENU_SMOOTH = "{$showMenuSmooth}"; // if true menu slides from top (animation) - var SET_MENU_POS_BACK_ON_INIT = !!"{$setMenuPosBackOnInit}"; // if true menu slides from top (animation) - var SCROLL_OFFSET = 80; + const BASKET_STYLE = "{$basketStyle}"; + const BASKET_ACTION = "{$basketAction}"; + const INITAL_BASKET_PRICE = "{$initialBasketPrice}"; + const COUNT_LANGUAGES = "{$countLanguages}"; + const SHOW_CATEGORY_MENU = "{$showCategoryMenu}"; + const REGISTER_URL = "{$registerSiteUrl}"; + const SHOW_MENU_AFTER_SCROLL_POS = "{$showNavAfterScroll}"; // The number of pixels from top which the menu will be displayed. + const SHOW_MENU_SMOOTH = "{$showMenuSmooth}"; // if true menu slides from top (animation) + const SET_MENU_POS_BACK_ON_INIT = !!"{$setMenuPosBackOnInit}"; // if true menu slides from top (animation) + const SCROLL_OFFSET = 80; </script> {fetch template="template/head/styles.html" Template=$Template} diff --git a/locale.xml b/locale.xml index 45a994e..7b129ba 100644 --- a/locale.xml +++ b/locale.xml @@ -509,22 +509,26 @@ <en><![CDATA[If the option ist enabled, the product images are displayed in the shopping basket and order.]]></en> </locale> - <!-- basket open --> - <locale name="settings.shop.basketOpen"> - <de><![CDATA[Aktion bei Klick auf Warenkorb]]></de> - <en><![CDATA[What should happen when the user clicks on the shopping cart?]]></en> - </locale> - <locale name="settings.shop.basketOpen.nothing"> - <de><![CDATA[Bestellprozes nicht öffnen]]></de> - <en><![CDATA[Do not open order process]]></en> + <!-- basket action --> + <locale name="settings.shop.basketAction"> + <de><![CDATA[Aktion bei Klick auf Warenkorb-Icon]]></de> + <en><![CDATA[Shopping card action on click]]></en> + </locale> + <locale name="settings.shop.basketAction.desc"> + <de><![CDATA[Diese Option gilt nur für Desktop Ansicht. Auf mobilen Geräten wird immer zu der Bestellseite geleitet.]]></de> + <en><![CDATA[This option only applies to desktop view. On mobile devices it will always be redirected to the order process page.]]></en> + </locale> + <locale name="settings.shop.basketAction.openSmallBasket"> + <de><![CDATA[Kleinen Warenkorb öffnen]]></de> + <en><![CDATA[Open small basket]]></en> </locale> - <locale name="settings.shop.basketOpen.window"> - <de><![CDATA[Bestellprozes in einem Fenster öffnen]]></de> - <en><![CDATA[Open order process in a popup]]></en> + <locale name="settings.shop.basketAction.openOrderProcessUrl"> + <de><![CDATA[Bestellseite öffnen]]></de> + <en><![CDATA[Open order process page]]></en> </locale> - <locale name="settings.shop.basketOpen.page"> - <de><![CDATA[Zu Bestellprozess-Seite leiten]]></de> - <en><![CDATA[Go to order page]]></en> + <locale name="settings.shop.basketAction.openOrderProcess"> + <de><![CDATA[Bestellung in einem Popup Fenster öffnen]]></de> + <en><![CDATA[Open order process in a popup]]></en> </locale> <!-- hide empty fields --> <locale name="settings.shop.hideEmptyFields"> diff --git a/settings.xml b/settings.xml index 3f0a34b..36dacb1 100644 --- a/settings.xml +++ b/settings.xml @@ -40,9 +40,9 @@ <type><![CDATA[bool]]></type> <defaultvalue>1</defaultvalue> </conf> - <conf name="basketOpen"> - <type><![CDATA[integer]]></type> - <defaultvalue>2</defaultvalue> + <conf name="basketAction"> + <type><![CDATA[string]]></type> + <defaultvalue>openSmallBasket</defaultvalue> </conf> <conf name="hideEmptyFields"> <type><![CDATA[bool]]></type> @@ -454,27 +454,35 @@ </description> </input> - <!-- basket open (nothing order window, order page)--> - <select conf="templateCologne.settings.basketOpen"> + + + + <!-- basket action (openSmallBasket, openOrderProcessUrl, openOrderProcess (qui popup))--> + <select conf="templateCologne.settings.basketAction"> <text> <locale group="quiqqer/template-cologne" - var="settings.shop.basketOpen" + var="settings.shop.basketAction" /> </text> + <description> + <locale group="quiqqer/template-cologne" + var="settings.shop.basketAction.desc" + /> + </description> - <option value="0"> + <option value="openSmallBasket"> <locale group="quiqqer/template-cologne" - var="settings.shop.basketOpen.nothing" + var="settings.shop.basketAction.openSmallBasket" /> </option> - <option value="1"> + <option value="openOrderProcessUrl"> <locale group="quiqqer/template-cologne" - var="settings.shop.basketOpen.window" + var="settings.shop.basketAction.openOrderProcessUrl" /> </option> - <option value="2"> + <option value="openOrderProcess"> <locale group="quiqqer/template-cologne" - var="settings.shop.basketOpen.page" + var="settings.shop.basketAction.openOrderProcess" /> </option> </select> diff --git a/src/QUI/TemplateCologne/Utils.php b/src/QUI/TemplateCologne/Utils.php index bfa1bfa..098a86c 100644 --- a/src/QUI/TemplateCologne/Utils.php +++ b/src/QUI/TemplateCologne/Utils.php @@ -237,13 +237,10 @@ public static function getConfig(array $params): object|array|bool|string } // basket open - $basketOpen = 2; + $basketAction = $Project->getConfig('templateCologne.settings.basketAction'); - switch ($Project->getConfig('templateCologne.settings.basketOpen')) { - case '0': - case '1': - case '2': - $basketOpen = $Project->getConfig('templateCologne.settings.basketOpen'); + if (!in_array($basketAction, ['openSmallBasket', 'openOrderProcessUrl', 'openOrderProcess'])) { + $basketAction = 'openSmallBasket'; } $settingsCSS = include 'settings.css.php'; @@ -355,7 +352,7 @@ public static function getConfig(array $params): object|array|bool|string $config['siteType'] = $siteType; $config['pageCustomClass'] = $pageCustomClass; $config['basketStyle'] = $basketStyle; - $config['basketOpen'] = $basketOpen; + $config['basketAction'] = $basketAction; $config['showCategoryMenu'] = $showCategoryMenu; $config['homeLink'] = $homeLink; $config['homeLinkText'] = $homeLinkText; -- GitLab From 9a559f7f52b6583e52e0047cc8c7f930c9d6e644 Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Wed, 16 Oct 2024 15:17:06 +0200 Subject: [PATCH 03/21] fix: improve register button desing in order process --- bin/css/order.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/css/order.css b/bin/css/order.css index 04032a9..2460636 100644 --- a/bin/css/order.css +++ b/bin/css/order.css @@ -8,6 +8,15 @@ padding: 0; } +/* bad button design in this template... */ +.quiqqer-order-ordering-nobody-tabs-main__item .quiqqer-fu-login-forget-password-reset [name="cancel"], +.quiqqer-order-ordering-nobody-tabs-main__item .quiqqer-fu-login-forget-password-reset [name="cancel"]:is(:hover, :focus, :active) { + width: 100%; + background-color: transparent; + color: inherit; + border: none; +} + /****************/ /* step: basket */ /****************/ -- GitLab From 11b31bfbdbf6deb7dc2a744abb54bf230e97e7ca Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Thu, 17 Oct 2024 09:43:23 +0200 Subject: [PATCH 04/21] fix: register smarty functions (required smarty4 >= 2.0.7) --- composer.json | 3 ++- index.php | 14 ++++++++++---- layout/leftSidebar.html | 4 ++-- layout/noSidebar.html | 4 ++-- layout/noSidebarThin.html | 4 ++-- layout/rightSidebar.html | 4 ++-- layout/startPage.html | 4 ++-- .../src/QUI/ERP/Order/Controls/Basket/Basket.html | 4 ++-- .../Controls/Category/ProductListDetails.html | 2 +- .../Controls/Category/ProductListGallery.html | 2 +- .../Controls/Category/ProductListList.html | 2 +- .../ERP/Products/Controls/Products/Product.html | 4 ++-- .../Products/Controls/Products/ProductVariant.html | 4 ++-- template/page.html | 4 ++-- 14 files changed, 33 insertions(+), 26 deletions(-) diff --git a/composer.json b/composer.json index dd16d0b..a0cf711 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,8 @@ "quiqqer/unsemantic": "^2", "quiqqer-asset/fastclick": "^1", "quiqqer/tooltips": "^2", - "quiqqer/currency": "^2" + "quiqqer/currency": "^2", + "quiqqer/smarty4": "^2.0.7" }, "autoload": { "psr-4": { diff --git a/index.php b/index.php index 722a879..d9bdb99 100644 --- a/index.php +++ b/index.php @@ -1,9 +1,15 @@ <?php /** - * Emotion + * Register smarty functions */ +if (method_exists($Engine, 'getSmarty')) { + $Engine->getSmarty()->registerClass('TemplateCologneUtils', 'QUI\TemplateCologne\Utils'); +} +/** + * Emotion + */ QUI\Utils\Site::setRecursiveAttribute($Site, 'image_emotion'); QUI\Utils\Site::setRecursiveAttribute($Site, 'layout'); @@ -13,7 +19,7 @@ $templateSettings = QUI\TemplateCologne\Utils::getConfig([ 'Project' => $Project, 'Template' => $Template, - 'Site' => $Site + 'Site' => $Site ]); /** @@ -93,7 +99,7 @@ /* user avatar */ $Avatar = new QUI\FrontendUsers\Controls\UserIcon([ 'showLogout' => false, // template cologne use own logout popup (see bin/javascript/init.js) - 'User' => QUI::getUserBySession() + 'User' => QUI::getUserBySession() ]); /* product page - for layouts */ @@ -134,7 +140,7 @@ $registerSite = $Project->getSites([ 'where' => [ 'type' => [ - 'type' => 'IN', + 'type' => 'IN', 'value' => $registerSiteTypes ] ], diff --git a/layout/leftSidebar.html b/layout/leftSidebar.html index 01330cb..975f9f5 100644 --- a/layout/leftSidebar.html +++ b/layout/leftSidebar.html @@ -9,7 +9,7 @@ {if !empty( $prefixContentBricks )} {foreach from=$prefixContentBricks item=Brick} - {assign var=classes value=\QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentPrefix brick-id-{$Brick->getAttribute('id')} {$classes}"> @@ -63,7 +63,7 @@ {if !empty( $suffixContentBricks )} {foreach from=$suffixContentBricks item=Brick} - {assign var=classes value=\QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentSuffix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> diff --git a/layout/noSidebar.html b/layout/noSidebar.html index 05b7c79..1706313 100644 --- a/layout/noSidebar.html +++ b/layout/noSidebar.html @@ -6,7 +6,7 @@ <div class="main-no-sidebar"> {if !empty( $prefixContentBricks )} {foreach from=$prefixContentBricks item=Brick} - {assign var=classes value=\QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentPrefix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> @@ -58,7 +58,7 @@ {if !empty( $suffixContentBricks )} {foreach from=$suffixContentBricks item=Brick} - {assign var=classes value=\QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentSuffix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> diff --git a/layout/noSidebarThin.html b/layout/noSidebarThin.html index 7eb7187..77a853a 100644 --- a/layout/noSidebarThin.html +++ b/layout/noSidebarThin.html @@ -7,7 +7,7 @@ <div class="main-no-sidebar-thin"> {if !empty( $prefixContentBricks )} {foreach from=$prefixContentBricks item=Brick} - {assign var=classes value=\QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentPrefix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> @@ -58,7 +58,7 @@ {if !empty( $suffixContentBricks )} {foreach from=$suffixContentBricks item=Brick} - {assign var=classes value=\QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentSuffix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> diff --git a/layout/rightSidebar.html b/layout/rightSidebar.html index db226d4..fb7e626 100644 --- a/layout/rightSidebar.html +++ b/layout/rightSidebar.html @@ -10,7 +10,7 @@ {if !empty( $prefixContentBricks )} {foreach from=$prefixContentBricks item=Brick} - {assign var=classes value=\QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentPrefix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> @@ -62,7 +62,7 @@ {if !empty( $suffixContentBricks )} {foreach from=$suffixContentBricks item=Brick} - {assign var=classes value=\QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentSuffix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> diff --git a/layout/startPage.html b/layout/startPage.html index 672b17c..201aad4 100644 --- a/layout/startPage.html +++ b/layout/startPage.html @@ -6,7 +6,7 @@ <div class="main-start-page"> {if !empty( $prefixContentBricks )} {foreach from=$prefixContentBricks item=Brick} - {assign var=classes value=\QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentPrefix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> @@ -59,7 +59,7 @@ {if !empty( $suffixContentBricks )} {foreach from=$suffixContentBricks item=Brick} - {assign var=classes value=\QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentSuffix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> diff --git a/quiqqer/order/src/QUI/ERP/Order/Controls/Basket/Basket.html b/quiqqer/order/src/QUI/ERP/Order/Controls/Basket/Basket.html index d06d528..b1eaa22 100644 --- a/quiqqer/order/src/QUI/ERP/Order/Controls/Basket/Basket.html +++ b/quiqqer/order/src/QUI/ERP/Order/Controls/Basket/Basket.html @@ -9,7 +9,7 @@ > {locale group="quiqqer/erp" var="article.list.articles.header.pos"} </th> - {if QUI\TemplateCologne\Utils::getSetting('order.basket.showImages')} + {if $TemplateCologneUtils::getSetting('order.basket.showImages')} <th class="quiqqer-order-basket-articles-header-image" title="{locale group='quiqqer/erp' var='article.list.articles.header.image'}" > @@ -50,7 +50,7 @@ > {$pos} </td> - {if QUI\TemplateCologne\Utils::getSetting('order.basket.showImages')} + {if $TemplateCologneUtils::getSetting('order.basket.showImages')} <td class="quiqqer-order-basket-articles-article-image" data-label="{locale group='quiqqer/erp' var='article.list.articles.header.image'}" > diff --git a/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListDetails.html b/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListDetails.html index 5d45125..ab96fd7 100644 --- a/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListDetails.html +++ b/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListDetails.html @@ -42,7 +42,7 @@ {/if} {if $Project->getConfig('templateCologne.settings.categoryShowStock')} - {assign var=ShippingTimeFrontendView value=\QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} + {assign var=ShippingTimeFrontendView value=$TemplateCologneUtils::getShippingTimeFrontendView($Product->getId())} {if $ShippingTimeFrontendView} <div class="cologne-productList-product-details-content-shippingTime"> {$ShippingTimeFrontendView->create()} diff --git a/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListGallery.html b/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListGallery.html index 38f84d0..be155ca 100644 --- a/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListGallery.html +++ b/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListGallery.html @@ -36,7 +36,7 @@ </div> {if $Project->getConfig('templateCologne.settings.categoryShowStock')} - {assign var=ShippingTimeFrontendView value=\QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} + {assign var=ShippingTimeFrontendView value=$TemplateCologneUtils::getShippingTimeFrontendView($Product->getId())} {if $ShippingTimeFrontendView} <div class="cologne-products-productGallery-products-product-price-shippingTime"> {$ShippingTimeFrontendView->create()} diff --git a/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListList.html b/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListList.html index 050380e..ff6a679 100644 --- a/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListList.html +++ b/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListList.html @@ -16,7 +16,7 @@ </div> {if $Project->getConfig('templateCologne.settings.categoryShowStock')} - {assign var=ShippingTimeFrontendView value=\QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} + {assign var=ShippingTimeFrontendView value=$TemplateCologneUtils::getShippingTimeFrontendView($Product->getId())} {if $ShippingTimeFrontendView} <div class="quiqqer-productList-product-list-text-shippingTime"> {$ShippingTimeFrontendView->create()} diff --git a/quiqqer/products/src/QUI/ERP/Products/Controls/Products/Product.html b/quiqqer/products/src/QUI/ERP/Products/Controls/Products/Product.html index 8842cc5..634bc02 100644 --- a/quiqqer/products/src/QUI/ERP/Products/Controls/Products/Product.html +++ b/quiqqer/products/src/QUI/ERP/Products/Controls/Products/Product.html @@ -69,12 +69,12 @@ {/foreach} {assign var=ShippingTimeFrontendView - value=\QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} + value=$TemplateCologneUtils::getShippingTimeFrontendView($Product->getId())} {if $ShippingTimeFrontendView} {$ShippingTimeFrontendView->create()} {/if} - {assign var=StockFrontendView value=\QUI\TemplateCologne\Utils::getStockFrontendView($Product->getId())} + {assign var=StockFrontendView value=$TemplateCologneUtils::getStockFrontendView($Product->getId())} {if $StockFrontendView} {$StockFrontendView->create()} {/if} diff --git a/quiqqer/products/src/QUI/ERP/Products/Controls/Products/ProductVariant.html b/quiqqer/products/src/QUI/ERP/Products/Controls/Products/ProductVariant.html index 22ca193..79433b2 100644 --- a/quiqqer/products/src/QUI/ERP/Products/Controls/Products/ProductVariant.html +++ b/quiqqer/products/src/QUI/ERP/Products/Controls/Products/ProductVariant.html @@ -52,12 +52,12 @@ {/foreach} {assign var=ShippingTimeFrontendView - value=\QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} + value=$TemplateCologneUtils::getShippingTimeFrontendView($Product->getId())} {if $ShippingTimeFrontendView} {$ShippingTimeFrontendView->create()} {/if} - {assign var=StockFrontendView value=\QUI\TemplateCologne\Utils::getStockFrontendView($Product->getId())} + {assign var=StockFrontendView value=$TemplateCologneUtils::getStockFrontendView($Product->getId())} {if $StockFrontendView} {$StockFrontendView->create()} {/if} diff --git a/template/page.html b/template/page.html index ba86b13..9cdb023 100644 --- a/template/page.html +++ b/template/page.html @@ -25,7 +25,7 @@ {assign var=brickNoPadding value="brick-no-spacing"} {/if} - {assign var=classes value=\QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-headerSuffix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-container template-grid-row {$brickFullWidth} {$brickNoPadding}"> @@ -54,7 +54,7 @@ {assign var=brickNoPadding value="brick-no-spacing"} {/if} - {assign var=classes value=\QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-footerPrefix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-container template-grid-row {$brickFullWidth} {$brickNoPadding}"> -- GitLab From 815fc0147cbc2831cea8d25ce1d2e78673727626 Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Thu, 17 Oct 2024 15:47:33 +0200 Subject: [PATCH 05/21] fix: improve design of login control --- bin/css/frontend-users.css | 16 +++++++++++----- bin/css/style.css | 13 ++++++++++--- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/bin/css/frontend-users.css b/bin/css/frontend-users.css index c8cde74..56bc8b6 100644 --- a/bin/css/frontend-users.css +++ b/bin/css/frontend-users.css @@ -258,6 +258,12 @@ width: 100%; } +.loginAndRegister .quiqqer-fu-login-container-width { + width: 100%; + max-width: 400px; + margin-inline: auto; +} + :where(.loginAndRegister) .quiqqer-frontendUsers-login .quiqqer-fu-login-container { background: none; border: none; @@ -274,17 +280,18 @@ /******************/ /* reset password */ /******************/ -:where(.loginAndRegister) .quiqqer-fu-login-container .quiqqer-fu-login-forget-password-reset [name="cancel"] { +.quiqqer-fu-login-container .quiqqer-fu-login-forget-password-reset [name="cancel"] { background: none; border: none; color: inherit; - float: right; margin-top: 1rem; padding: 0; position: initial; + width: 100%; + text-align: right; } -:where(.loginAndRegister) .quiqqer-fu-login-container .quiqqer-fu-login-forget-password-reset [type="submit"] { +.quiqqer-fu-login-container .quiqqer-fu-login-forget-password-reset [type="submit"] { margin-top: 1rem; } @@ -317,8 +324,7 @@ } .loginAndRegister .quiqqer-fu-login-forget-password-reset { - padding: 1.5rem 2rem; - background: #f8f8f8; + padding-inline: 2rem; } .quiqqer-fu-registrationSignUp-terms-text [name="decline"] { diff --git a/bin/css/style.css b/bin/css/style.css index 5eaf9e5..408b667 100644 --- a/bin/css/style.css +++ b/bin/css/style.css @@ -1523,6 +1523,12 @@ a.toTop:before { .cologne-login-dialog .qui-window-popup-content { padding: 20px 40px; + display: grid; + grid-template-areas: + 'logo' + 'body' + 'reset'; + grid-template-rows: auto 1fr; } .quiqqer-frontendUsers-loginWindow .quiqqer-frontendUsers-login { @@ -1615,11 +1621,12 @@ a.toTop:before { /* sing up / registration in link */ .login-popup-create-account-wrapper { - bottom: 10px; - left: 0; - position: absolute; text-align: center; width: 100%; + grid-area: reset; + margin-top: 1rem; + z-index: 1; + position: relative; } /*************************/ -- GitLab From 4beb1aa7e89999a0b0e65cf6b1e5383b6cba84f0 Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Thu, 17 Oct 2024 16:01:36 +0200 Subject: [PATCH 06/21] chore: header blocks must be separated by a single blank line --- index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.php b/index.php index d9bdb99..4ecffac 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,12 @@ <?php +/** + * @var QUI\Projects\Project $Project + * @var QUI\Projects\Site $Site + * @var QUI\Interfaces\Template\EngineInterface $Engine + * @var QUI\Template $Template + **/ + /** * Register smarty functions */ -- GitLab From fc6841409eff22db5aa3ebb64bfe9000c68fe219 Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Thu, 17 Oct 2024 16:18:01 +0200 Subject: [PATCH 07/21] docs: header blocks must be separated by a single blank line --- index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.php b/index.php index 4ecffac..5b2daac 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,8 @@ <?php /** + * cologne template file + * * @var QUI\Projects\Project $Project * @var QUI\Projects\Site $Site * @var QUI\Interfaces\Template\EngineInterface $Engine -- GitLab From 7921f5df625d4d5620bce410a4e4caeb879d3bf7 Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Thu, 17 Oct 2024 16:19:58 +0200 Subject: [PATCH 08/21] docs: header blocks must be separated by a single blank line --- index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/index.php b/index.php index 5b2daac..9e6fe09 100644 --- a/index.php +++ b/index.php @@ -12,6 +12,7 @@ /** * Register smarty functions */ + if (method_exists($Engine, 'getSmarty')) { $Engine->getSmarty()->registerClass('TemplateCologneUtils', 'QUI\TemplateCologne\Utils'); } -- GitLab From 1a567cbf37bb2cec3ae579a2401f6271b3c5ebe4 Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Thu, 24 Oct 2024 11:09:59 +0200 Subject: [PATCH 09/21] fix: register smarty functions --- .phive/phars.xml | 2 +- events.xml | 1 + index.php | 8 -------- layout/leftSidebar.html | 4 ++-- layout/noSidebar.html | 4 ++-- layout/noSidebarThin.html | 4 ++-- layout/rightSidebar.html | 4 ++-- layout/startPage.html | 4 ++-- .../src/QUI/ERP/Order/Controls/Basket/Basket.html | 4 ++-- .../Controls/Category/ProductListDetails.html | 2 +- .../Controls/Category/ProductListGallery.html | 2 +- .../Controls/Category/ProductListList.html | 2 +- .../ERP/Products/Controls/Products/Product.html | 4 ++-- .../Products/Controls/Products/ProductVariant.html | 4 ++-- src/QUI/TemplateCologne/EventHandler.php | 14 ++++++++++++++ template/page.html | 4 ++-- 16 files changed, 37 insertions(+), 30 deletions(-) diff --git a/.phive/phars.xml b/.phive/phars.xml index 5bfa092..7877fd4 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <phive xmlns="https://phar.io/phive"> - <phar name="phpstan" version="1.11.8" installed="1.11.8" location="./tools/phpstan" copy="false"/> + <phar name="phpstan" version="^1.11.5" installed="1.11.5" location="./tools/phpstan" copy="false"/> <phar name="phpunit" version="^10.5.20" installed="10.5.20" location="./tools/phpunit" copy="false"/> <phar name="phpcs" version="^3.10.1" installed="3.10.1" location="./tools/phpcs" copy="false"/> <phar name="phpcbf" version="^3.10.1" installed="3.10.1" location="./tools/phpcbf" copy="false"/> diff --git a/events.xml b/events.xml index 10127fc..8551c67 100644 --- a/events.xml +++ b/events.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <events> + <event on="onSmartyInit" fire="\QUI\TemplateCologne\EventHandler::onSmartyInit"/> <event on="onProjectConfigSave" fire="\QUI\TemplateCologne\EventHandler::onProjectConfigSave"/> <event on="onSiteSave" fire="\QUI\TemplateCologne\EventHandler::onSiteSave"/> <event on="onQuiqqer::products::product::buttons::end" diff --git a/index.php b/index.php index 9e6fe09..0e576c5 100644 --- a/index.php +++ b/index.php @@ -9,14 +9,6 @@ * @var QUI\Template $Template **/ -/** - * Register smarty functions - */ - -if (method_exists($Engine, 'getSmarty')) { - $Engine->getSmarty()->registerClass('TemplateCologneUtils', 'QUI\TemplateCologne\Utils'); -} - /** * Emotion */ diff --git a/layout/leftSidebar.html b/layout/leftSidebar.html index 975f9f5..550431a 100644 --- a/layout/leftSidebar.html +++ b/layout/leftSidebar.html @@ -9,7 +9,7 @@ {if !empty( $prefixContentBricks )} {foreach from=$prefixContentBricks item=Brick} - {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentPrefix brick-id-{$Brick->getAttribute('id')} {$classes}"> @@ -63,7 +63,7 @@ {if !empty( $suffixContentBricks )} {foreach from=$suffixContentBricks item=Brick} - {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentSuffix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> diff --git a/layout/noSidebar.html b/layout/noSidebar.html index 1706313..5c5e7af 100644 --- a/layout/noSidebar.html +++ b/layout/noSidebar.html @@ -6,7 +6,7 @@ <div class="main-no-sidebar"> {if !empty( $prefixContentBricks )} {foreach from=$prefixContentBricks item=Brick} - {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentPrefix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> @@ -58,7 +58,7 @@ {if !empty( $suffixContentBricks )} {foreach from=$suffixContentBricks item=Brick} - {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentSuffix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> diff --git a/layout/noSidebarThin.html b/layout/noSidebarThin.html index 77a853a..c790018 100644 --- a/layout/noSidebarThin.html +++ b/layout/noSidebarThin.html @@ -7,7 +7,7 @@ <div class="main-no-sidebar-thin"> {if !empty( $prefixContentBricks )} {foreach from=$prefixContentBricks item=Brick} - {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentPrefix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> @@ -58,7 +58,7 @@ {if !empty( $suffixContentBricks )} {foreach from=$suffixContentBricks item=Brick} - {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentSuffix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> diff --git a/layout/rightSidebar.html b/layout/rightSidebar.html index fb7e626..30e9a59 100644 --- a/layout/rightSidebar.html +++ b/layout/rightSidebar.html @@ -10,7 +10,7 @@ {if !empty( $prefixContentBricks )} {foreach from=$prefixContentBricks item=Brick} - {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentPrefix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> @@ -62,7 +62,7 @@ {if !empty( $suffixContentBricks )} {foreach from=$suffixContentBricks item=Brick} - {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentSuffix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> diff --git a/layout/startPage.html b/layout/startPage.html index 201aad4..76256d8 100644 --- a/layout/startPage.html +++ b/layout/startPage.html @@ -6,7 +6,7 @@ <div class="main-start-page"> {if !empty( $prefixContentBricks )} {foreach from=$prefixContentBricks item=Brick} - {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentPrefix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> @@ -59,7 +59,7 @@ {if !empty( $suffixContentBricks )} {foreach from=$suffixContentBricks item=Brick} - {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-contentSuffix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-row"> diff --git a/quiqqer/order/src/QUI/ERP/Order/Controls/Basket/Basket.html b/quiqqer/order/src/QUI/ERP/Order/Controls/Basket/Basket.html index b1eaa22..d06d528 100644 --- a/quiqqer/order/src/QUI/ERP/Order/Controls/Basket/Basket.html +++ b/quiqqer/order/src/QUI/ERP/Order/Controls/Basket/Basket.html @@ -9,7 +9,7 @@ > {locale group="quiqqer/erp" var="article.list.articles.header.pos"} </th> - {if $TemplateCologneUtils::getSetting('order.basket.showImages')} + {if QUI\TemplateCologne\Utils::getSetting('order.basket.showImages')} <th class="quiqqer-order-basket-articles-header-image" title="{locale group='quiqqer/erp' var='article.list.articles.header.image'}" > @@ -50,7 +50,7 @@ > {$pos} </td> - {if $TemplateCologneUtils::getSetting('order.basket.showImages')} + {if QUI\TemplateCologne\Utils::getSetting('order.basket.showImages')} <td class="quiqqer-order-basket-articles-article-image" data-label="{locale group='quiqqer/erp' var='article.list.articles.header.image'}" > diff --git a/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListDetails.html b/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListDetails.html index ab96fd7..770df2c 100644 --- a/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListDetails.html +++ b/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListDetails.html @@ -42,7 +42,7 @@ {/if} {if $Project->getConfig('templateCologne.settings.categoryShowStock')} - {assign var=ShippingTimeFrontendView value=$TemplateCologneUtils::getShippingTimeFrontendView($Product->getId())} + {assign var=ShippingTimeFrontendView value=QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} {if $ShippingTimeFrontendView} <div class="cologne-productList-product-details-content-shippingTime"> {$ShippingTimeFrontendView->create()} diff --git a/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListGallery.html b/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListGallery.html index be155ca..c1d5c72 100644 --- a/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListGallery.html +++ b/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListGallery.html @@ -36,7 +36,7 @@ </div> {if $Project->getConfig('templateCologne.settings.categoryShowStock')} - {assign var=ShippingTimeFrontendView value=$TemplateCologneUtils::getShippingTimeFrontendView($Product->getId())} + {assign var=ShippingTimeFrontendView value=QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} {if $ShippingTimeFrontendView} <div class="cologne-products-productGallery-products-product-price-shippingTime"> {$ShippingTimeFrontendView->create()} diff --git a/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListList.html b/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListList.html index ff6a679..6713312 100644 --- a/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListList.html +++ b/quiqqer/products/src/QUI/ERP/Products/Controls/Category/ProductListList.html @@ -16,7 +16,7 @@ </div> {if $Project->getConfig('templateCologne.settings.categoryShowStock')} - {assign var=ShippingTimeFrontendView value=$TemplateCologneUtils::getShippingTimeFrontendView($Product->getId())} + {assign var=ShippingTimeFrontendView value=QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} {if $ShippingTimeFrontendView} <div class="quiqqer-productList-product-list-text-shippingTime"> {$ShippingTimeFrontendView->create()} diff --git a/quiqqer/products/src/QUI/ERP/Products/Controls/Products/Product.html b/quiqqer/products/src/QUI/ERP/Products/Controls/Products/Product.html index 634bc02..1adeb7c 100644 --- a/quiqqer/products/src/QUI/ERP/Products/Controls/Products/Product.html +++ b/quiqqer/products/src/QUI/ERP/Products/Controls/Products/Product.html @@ -69,12 +69,12 @@ {/foreach} {assign var=ShippingTimeFrontendView - value=$TemplateCologneUtils::getShippingTimeFrontendView($Product->getId())} + value=QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} {if $ShippingTimeFrontendView} {$ShippingTimeFrontendView->create()} {/if} - {assign var=StockFrontendView value=$TemplateCologneUtils::getStockFrontendView($Product->getId())} + {assign var=StockFrontendView value=QUI\TemplateCologne\Utils::getStockFrontendView($Product->getId())} {if $StockFrontendView} {$StockFrontendView->create()} {/if} diff --git a/quiqqer/products/src/QUI/ERP/Products/Controls/Products/ProductVariant.html b/quiqqer/products/src/QUI/ERP/Products/Controls/Products/ProductVariant.html index 79433b2..f8cb2e9 100644 --- a/quiqqer/products/src/QUI/ERP/Products/Controls/Products/ProductVariant.html +++ b/quiqqer/products/src/QUI/ERP/Products/Controls/Products/ProductVariant.html @@ -52,12 +52,12 @@ {/foreach} {assign var=ShippingTimeFrontendView - value=$TemplateCologneUtils::getShippingTimeFrontendView($Product->getId())} + value=QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} {if $ShippingTimeFrontendView} {$ShippingTimeFrontendView->create()} {/if} - {assign var=StockFrontendView value=$TemplateCologneUtils::getStockFrontendView($Product->getId())} + {assign var=StockFrontendView value=QUI\TemplateCologne\Utils::getStockFrontendView($Product->getId())} {if $StockFrontendView} {$StockFrontendView->create()} {/if} diff --git a/src/QUI/TemplateCologne/EventHandler.php b/src/QUI/TemplateCologne/EventHandler.php index f34b098..f7544fb 100644 --- a/src/QUI/TemplateCologne/EventHandler.php +++ b/src/QUI/TemplateCologne/EventHandler.php @@ -7,6 +7,7 @@ namespace QUI\TemplateCologne; use QUI; +use Smarty; use QUI\ERP\Products\Product\ViewFrontend; use QUI\Smarty\Collector; @@ -71,4 +72,17 @@ public static function onQuiqqerProductsProductButtonsEnd( </div>' ); } + + /** + * Event: on smarty init + * + * @param Smarty $Smarty + * @return void + */ + public static function onSmartyInit(Smarty $Smarty): void + { + $Smarty->registerClass('QUI\TemplateCologne\Utils', '\QUI\TemplateCologne\Utils'); + $Smarty->registerClass('QUI\Bricks\Manager', '\QUI\Bricks\Manager'); + $Smarty->registerClass('QUI\ERP\Products\Utils\Products', '\QUI\ERP\Products\Utils\Products'); + } } diff --git a/template/page.html b/template/page.html index 9cdb023..6af211a 100644 --- a/template/page.html +++ b/template/page.html @@ -25,7 +25,7 @@ {assign var=brickNoPadding value="brick-no-spacing"} {/if} - {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-headerSuffix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-container template-grid-row {$brickFullWidth} {$brickNoPadding}"> @@ -54,7 +54,7 @@ {assign var=brickNoPadding value="brick-no-spacing"} {/if} - {assign var=classes value=$TemplateCologneUtils::convertBrickCSSClass($Brick->getAttribute('classes'))} + {assign var=classes value=QUI\TemplateCologne\Utils::convertBrickCSSClass($Brick->getAttribute('classes'))} <section class="template-brick-container template-brick-footerPrefix brick-id-{$Brick->getAttribute('id')} {$classes}"> <div class="template-grid-container template-grid-row {$brickFullWidth} {$brickNoPadding}"> -- GitLab From 50613b2560a78c9255dceadb93546f4a5e651947 Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Thu, 24 Oct 2024 13:59:09 +0200 Subject: [PATCH 10/21] docs: header blocks must be separated by a single blank line --- index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/index.php b/index.php index 0e576c5..85536cd 100644 --- a/index.php +++ b/index.php @@ -12,6 +12,7 @@ /** * Emotion */ + QUI\Utils\Site::setRecursiveAttribute($Site, 'image_emotion'); QUI\Utils\Site::setRecursiveAttribute($Site, 'layout'); -- GitLab From a39bf8ee940d2385c7e969270d9bf9868220b4ac Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Thu, 24 Oct 2024 16:24:43 +0200 Subject: [PATCH 11/21] fix: style inputs disabled state --- bin/css/form.css | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/bin/css/form.css b/bin/css/form.css index 13d4bf8..e922246 100644 --- a/bin/css/form.css +++ b/bin/css/form.css @@ -21,7 +21,6 @@ select { background-image: url("../images/arrow-select.svg"); background-position: calc(100% - 10px) center; background-repeat: no-repeat; - background-size: 20px auto; background-size: 8px; height: 40px; padding-bottom: 0; @@ -58,6 +57,28 @@ textarea:focus { border-color: #a9a8a5; } +/* disabled */ +:is( + input:where(:not([type])), + [type='text'], + [type='email'], + [type='url'], + [type='password'], + [type='number'], + [type='date'], + [type='datetime-local'], + [type='month'], + [type='search'], + [type='tel'], + [type='time'], + [type='week'], + [multiple], + textarea, + select +):where([disabled]) { + opacity: 0.6; +} + /* iOs input search fix */ input[type="search"] { -webkit-appearance: none; -- GitLab From 72beeb33b9f9fc7d80d75fe914f9e8f8579093e2 Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Mon, 4 Nov 2024 12:54:15 +0100 Subject: [PATCH 12/21] fix: adjust paths to standard mail templates in quiqqer/core Related: quiqqer/template-cologne#116 --- quiqqer/{quiqqer/lib => core/src}/templates/mail/body.html | 0 quiqqer/{quiqqer/lib => core/src}/templates/mail/footer.html | 0 quiqqer/{quiqqer/lib => core/src}/templates/mail/header.html | 0 quiqqer/{quiqqer/lib => core/src}/templates/mail/meta.html | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename quiqqer/{quiqqer/lib => core/src}/templates/mail/body.html (100%) rename quiqqer/{quiqqer/lib => core/src}/templates/mail/footer.html (100%) rename quiqqer/{quiqqer/lib => core/src}/templates/mail/header.html (100%) rename quiqqer/{quiqqer/lib => core/src}/templates/mail/meta.html (100%) diff --git a/quiqqer/quiqqer/lib/templates/mail/body.html b/quiqqer/core/src/templates/mail/body.html similarity index 100% rename from quiqqer/quiqqer/lib/templates/mail/body.html rename to quiqqer/core/src/templates/mail/body.html diff --git a/quiqqer/quiqqer/lib/templates/mail/footer.html b/quiqqer/core/src/templates/mail/footer.html similarity index 100% rename from quiqqer/quiqqer/lib/templates/mail/footer.html rename to quiqqer/core/src/templates/mail/footer.html diff --git a/quiqqer/quiqqer/lib/templates/mail/header.html b/quiqqer/core/src/templates/mail/header.html similarity index 100% rename from quiqqer/quiqqer/lib/templates/mail/header.html rename to quiqqer/core/src/templates/mail/header.html diff --git a/quiqqer/quiqqer/lib/templates/mail/meta.html b/quiqqer/core/src/templates/mail/meta.html similarity index 100% rename from quiqqer/quiqqer/lib/templates/mail/meta.html rename to quiqqer/core/src/templates/mail/meta.html -- GitLab From 8773c99f1fcc60ace1dcd7b1e3803317eef9ebc3 Mon Sep 17 00:00:00 2001 From: Henning <leutz@pcsg.de> Date: Mon, 10 Feb 2025 18:23:30 +0100 Subject: [PATCH 13/21] fix(phpstan): resolve method and class checks Several changes have been made, primarily around checking the existence of methods and classes and removing unnecessary comments. - Method checks have been introduced to ensure the `getCachePath()` method exists before calling it. - Removed invalid phpDocs, e.g., @var $Site Site and @var $Project Project - Fixed typing to align return types and updated a factory method to check class existence. - Added variable definition comments in the settings.css.php file for clarity. Related: quiqqer/template-cologne#114 --- phpstan-baseline.neon | 51 +------------------ .../Controls/Menu/Categories.php | 8 ++- src/QUI/TemplateCologne/Utils.php | 15 +++--- src/QUI/TemplateCologne/settings.css.php | 9 +++- 4 files changed, 21 insertions(+), 62 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 0fa167e..1339890 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,51 +1,2 @@ parameters: - ignoreErrors: - - - message: "#^Call to an undefined method QUI\\\\Interfaces\\\\Projects\\\\Site\\:\\:getCachePath\\(\\)\\.$#" - count: 1 - path: src/QUI/TemplateCologne/Controls/Menu/Categories.php - - - - message: "#^Access to constant PRODUCT_FIELD_SHIPPING_TIME on an unknown class QUI\\\\ERP\\\\Shipping\\\\Shipping\\.$#" - count: 1 - path: src/QUI/TemplateCologne/Utils.php - - - - message: "#^Access to constant PRODUCT_FIELD_STOCK on an unknown class QUI\\\\ERP\\\\StockManagement\\\\StockManager\\.$#" - count: 1 - path: src/QUI/TemplateCologne/Utils.php - - - - message: "#^Call to method setProduct\\(\\) on an unknown class QUI\\\\ERP\\\\StockManagement\\\\Products\\\\Fields\\\\StockView\\.$#" - count: 1 - path: src/QUI/TemplateCologne/Utils.php - - - - message: "#^Call to static method getShippingTimeFrontendViewByProduct\\(\\) on an unknown class QUI\\\\ERP\\\\StockManagement\\\\StockManager\\.$#" - count: 1 - path: src/QUI/TemplateCologne/Utils.php - - - - message: "#^Method QUI\\\\TemplateCologne\\\\Utils\\:\\:getStockFrontendView\\(\\) should return QUI\\\\ERP\\\\Products\\\\Field\\\\View\\|false but returns QUI\\\\ERP\\\\StockManagement\\\\Products\\\\Fields\\\\StockView\\.$#" - count: 1 - path: src/QUI/TemplateCologne/Utils.php - - - - message: "#^PHPDoc tag @var for variable \\$StockView contains unknown class QUI\\\\ERP\\\\StockManagement\\\\Products\\\\Fields\\\\StockView\\.$#" - count: 1 - path: src/QUI/TemplateCologne/Utils.php - - - - message: "#^PHPDoc tag @var has invalid value \\(\\$Site Site\\)\\: Unexpected token \"\\$Site\", expected type at offset 9$#" - count: 1 - path: src/QUI/TemplateCologne/Utils.php - - - - message: "#^Variable \\$Project might not be defined\\.$#" - count: 2 - path: src/QUI/TemplateCologne/settings.css.php - - - - message: "#^Variable \\$Site might not be defined\\.$#" - count: 1 - path: src/QUI/TemplateCologne/settings.css.php + ignoreErrors: \ No newline at end of file diff --git a/src/QUI/TemplateCologne/Controls/Menu/Categories.php b/src/QUI/TemplateCologne/Controls/Menu/Categories.php index eadc91c..ab3af91 100644 --- a/src/QUI/TemplateCologne/Controls/Menu/Categories.php +++ b/src/QUI/TemplateCologne/Controls/Menu/Categories.php @@ -72,10 +72,14 @@ public function getBody(): string } $cache = EventHandler::menuCacheName() . '/megaMenu/'; + $cachePah = ''; + + if (method_exists($this->getSite(), 'getCachePath')) { + $cachePah = $this->getSite()->getCachePath(); + } $cache .= md5( - $this->getSite()->getCachePath() . - serialize($this->getAttributes()) + $cachePah . serialize($this->getAttributes()) ); try { diff --git a/src/QUI/TemplateCologne/Utils.php b/src/QUI/TemplateCologne/Utils.php index 098a86c..9f88806 100644 --- a/src/QUI/TemplateCologne/Utils.php +++ b/src/QUI/TemplateCologne/Utils.php @@ -11,7 +11,6 @@ use QUI\ERP\Shipping\Shipping; use QUI\ERP\StockManagement\StockManager; use QUI\Projects\Project; -use QUI\Projects\Site; use QUI\TemplateCologne\Controls\Payments; use function class_exists; @@ -75,13 +74,8 @@ public static function getAvatar(mixed $User): QUI\Projects\Media\Image|bool */ public static function getConfig(array $params): object|array|bool|string { - /** @var $Site Site */ $Site = $params['Site']; - - /* @var $Project Project */ $Project = $params['Project']; - - /* @var $Project QUI\Template */ $Template = $params['Template']; $cacheName = md5($Site->getId() . $Project->getName() . $Project->getLang()); @@ -599,7 +593,7 @@ private static function getPredefinedFooter(Project $Project): array * * @return false|QUI\ERP\Products\Field\View */ - public static function getShippingTimeFrontendView(int $productId) + public static function getShippingTimeFrontendView(int $productId): bool | QUI\ERP\Products\Field\View { try { $Product = QUI\ERP\Products\Handler\Products::getProduct($productId); @@ -609,7 +603,7 @@ public static function getShippingTimeFrontendView(int $productId) return false; } - if (QUI::getPackageManager()->isInstalled('quiqqer/stock-management')) { + if (class_exists('QUI\ERP\StockManagement\StockManager')) { return StockManager::getShippingTimeFrontendViewByProduct($Product); } @@ -656,6 +650,10 @@ public static function getStockFrontendView(int $productId) return false; } + if (!class_exists('QUI\ERP\StockManagement\StockManager')) { + return false; + } + try { $Product = QUI\ERP\Products\Handler\Products::getProduct($productId); $StockField = $Product->getField(StockManager::PRODUCT_FIELD_STOCK); @@ -665,7 +663,6 @@ public static function getStockFrontendView(int $productId) return false; } - /** @var QUI\ERP\StockManagement\Products\Fields\StockView $StockView */ $StockView = $StockField->getFrontendView(); if (method_exists($StockView, 'setProduct')) { diff --git a/src/QUI/TemplateCologne/settings.css.php b/src/QUI/TemplateCologne/settings.css.php index 9953e25..965553d 100644 --- a/src/QUI/TemplateCologne/settings.css.php +++ b/src/QUI/TemplateCologne/settings.css.php @@ -1,4 +1,12 @@ <?php +/** + * cologne template file + * + * @var QUI\Projects\Project $Project + * @var QUI\Projects\Site $Site + * @var QUI\Interfaces\Template\EngineInterface $Engine + * @var QUI\Template $Template + **/ $largeSpacing = $Site->getAttribute('templateCologne.largeSpacing'); $headerImagePosition = $Project->getConfig('templateCologne.settings.headerImagePosition'); @@ -7,7 +15,6 @@ ob_start(); ?> - <?php if ($largeSpacing) { ?> /* more spacing */ .page-content-header, -- GitLab From 704e489270f007aa7b985315103383816b80fe18 Mon Sep 17 00:00:00 2001 From: Henning <leutz@pcsg.de> Date: Mon, 10 Feb 2025 18:29:39 +0100 Subject: [PATCH 14/21] fix(phpstan): add checks for undefined constant in utils.php A fix has been applied in the src/QUI/TemplateCologne/Utils.php file. A condition has been added to check whether the PRODUCT_FIELD_SHIPPING_TIME constant is defined. If not, the function will return false to prevent any potential errors. --- src/QUI/TemplateCologne/Utils.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/QUI/TemplateCologne/Utils.php b/src/QUI/TemplateCologne/Utils.php index 9f88806..cc49997 100644 --- a/src/QUI/TemplateCologne/Utils.php +++ b/src/QUI/TemplateCologne/Utils.php @@ -611,6 +611,10 @@ public static function getShippingTimeFrontendView(int $productId): bool | QUI\E return false; } + if (!defined('PRODUCT_FIELD_SHIPPING_TIME')) { + return false; + } + try { $ShippingField = $Product->getField(Shipping::PRODUCT_FIELD_SHIPPING_TIME); } catch (\Exception $Exception) { -- GitLab From 942e123cfabf7eb1c5c7eb81e19fb49f25ac96ee Mon Sep 17 00:00:00 2001 From: Henning <leutz@pcsg.de> Date: Mon, 10 Feb 2025 18:40:29 +0100 Subject: [PATCH 15/21] refactor(phpstan): update type declaration format and add reflection for Shipping class - Modified format for return types in declaration of functions `getAvatar`, `getConfig`, and `getSetting` for increased readability. - Added `ReflectionClass` usage to check for constant in `QUI\ERP\Shipping\Shipping` in `getShippingTimeFrontendView` function, enhancing maintainability and robustness of the code. - Adjusted the fail-safe condition inside `getShippingTimeFrontendView` to check for the existence of the class 'Shipping' before checking for defined constant, reducing chance of errors. - Imported `ReflectionClass` at the top of the file. --- src/QUI/TemplateCologne/Utils.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/QUI/TemplateCologne/Utils.php b/src/QUI/TemplateCologne/Utils.php index cc49997..f29c743 100644 --- a/src/QUI/TemplateCologne/Utils.php +++ b/src/QUI/TemplateCologne/Utils.php @@ -13,6 +13,8 @@ use QUI\Projects\Project; use QUI\TemplateCologne\Controls\Payments; +use ReflectionClass; + use function class_exists; use function count; use function method_exists; @@ -31,7 +33,7 @@ class Utils * @throws QUI\Exception * */ - public static function getAvatar(mixed $User): QUI\Projects\Media\Image|bool + public static function getAvatar(mixed $User): QUI\Projects\Media\Image | bool { if (!$User instanceof QUI\Interfaces\Users\User) { throw new QUI\Exception([ @@ -72,7 +74,7 @@ public static function getAvatar(mixed $User): QUI\Projects\Media\Image|bool * @return array|bool|object|string * @throws QUI\Exception */ - public static function getConfig(array $params): object|array|bool|string + public static function getConfig(array $params): object | array | bool | string { $Site = $params['Site']; $Project = $params['Project']; @@ -611,10 +613,16 @@ public static function getShippingTimeFrontendView(int $productId): bool | QUI\E return false; } - if (!defined('PRODUCT_FIELD_SHIPPING_TIME')) { + if (!class_exists('QUI\ERP\Shipping\Shipping')) { return false; } + $reflection = new ReflectionClass(Shipping::class); + + if (!$reflection->hasConstant('PRODUCT_FIELD_SHIPPING_TIME')) { + return false; + } + try { $ShippingField = $Product->getField(Shipping::PRODUCT_FIELD_SHIPPING_TIME); } catch (\Exception $Exception) { @@ -710,7 +718,7 @@ public static function convertBrickCSSClass(array $classes): string * @param string $settingName * @return bool|array|int|string */ - public static function getSetting(string $settingName): bool|array|int|string + public static function getSetting(string $settingName): bool | array | int | string { if (empty($settingName)) { return false; -- GitLab From 40cf4b1f899436aff3588ce18efd05caa1be29e7 Mon Sep 17 00:00:00 2001 From: Henning <leutz@pcsg.de> Date: Mon, 10 Feb 2025 18:41:57 +0100 Subject: [PATCH 16/21] fix(phpstan): remove unnecessary newline in utils.php This commit removes an unnecessary newline in the 'src/QUI/TemplateCologne/Utils.php' file to maintain code cleanliness and readability. It also includes a minor change to spacing for formatting consistency. --- src/QUI/TemplateCologne/Utils.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/QUI/TemplateCologne/Utils.php b/src/QUI/TemplateCologne/Utils.php index f29c743..14d62f5 100644 --- a/src/QUI/TemplateCologne/Utils.php +++ b/src/QUI/TemplateCologne/Utils.php @@ -12,7 +12,6 @@ use QUI\ERP\StockManagement\StockManager; use QUI\Projects\Project; use QUI\TemplateCologne\Controls\Payments; - use ReflectionClass; use function class_exists; @@ -622,7 +621,7 @@ public static function getShippingTimeFrontendView(int $productId): bool | QUI\E if (!$reflection->hasConstant('PRODUCT_FIELD_SHIPPING_TIME')) { return false; } - + try { $ShippingField = $Product->getField(Shipping::PRODUCT_FIELD_SHIPPING_TIME); } catch (\Exception $Exception) { -- GitLab From 5b31aa120b99c0079758108b03824e3741bd6529 Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Tue, 11 Feb 2025 15:54:32 +0100 Subject: [PATCH 17/21] fix: update template to be compatible with the quiqqer/frontend-users version 2.4.0 Related: quiqqer/template-cologne#117 --- bin/css/buttons.css | 9 +- bin/css/frontend-users.css | 176 +++--------------- bin/css/style.css | 1 + bin/css/variables.css | 3 + .../QUI/FrontendUsers/Controls/Profile.html | 145 ++++++++------- 5 files changed, 106 insertions(+), 228 deletions(-) diff --git a/bin/css/buttons.css b/bin/css/buttons.css index a3bf5c8..714138a 100644 --- a/bin/css/buttons.css +++ b/bin/css/buttons.css @@ -28,16 +28,11 @@ a.qui-button, float: none; /* qui-button reset */ } -button > .fa, -.btn > .fa { +button > .fa:not(:only-child), +.btn > .fa:not(:only-child) { margin-right: .75rem; } -button.loading > .fa, -.btn.loading > .fa { - margin-right: 0; -} - /*****************************/ /* button primary & standard */ /*****************************/ diff --git a/bin/css/frontend-users.css b/bin/css/frontend-users.css index 56bc8b6..927cbb3 100644 --- a/bin/css/frontend-users.css +++ b/bin/css/frontend-users.css @@ -11,7 +11,7 @@ /* simple user info */ /********************/ .quiqqer-fupc-userinfo { - border: 1px solid #ddd; + border: var(--_qui-cologne-theme-border-width) solid var(--_qui-cologne-theme-border-color); border-radius: 5px; margin-bottom: 1em; background: #fff; @@ -21,67 +21,33 @@ background: url("../images/brushed_alu.png"); } -.quiqqer-frontendUsers-profile-container { - display: flex; - margin-bottom: 2rem; - margin-top: 2rem; -} - -.quiqqer-frontendUsers-controls-profile .quiqqer-frontendUsers-controls-profile-categories { - padding-right: 20px; -} - -.quiqqer-frontendUsers-controls-profile .quiqqer-frontendUsers-controls-profile-categoryContent { - padding-left: 20px; -} - -@media (max-width: 768px) { - .quiqqer-frontendUsers-controls-profile .quiqqer-frontendUsers-controls-profile-categories { - padding: 0; - width: 100%; - } - - .quiqqer-frontendUsers-controls-profile .quiqqer-frontendUsers-controls-profile-categoryContent { - padding-left: 0; - } +/***********/ +/* Profile */ +/***********/ +.quiqqer-frontendUsers-controls-profile { + --qui-frontend-users-profile__radius: 0; + --qui-frontend-users-profile__sidebar-width: 360px; + --qui-frontend-users-profile__content-maxWidth: 700px; + --qui-frontend-users-profile__sidebar-nav-item-outline--hover: none; + --qui-frontend-users-profile__sidebar-nav-item-bg-color--hover: transparent; } /*****************/ /* category menu */ /*****************/ .quiqqer-fupc-category { - margin-bottom: 2em; -} - -.quiqqer-fupc-category:last-child { - margin-bottom: 0; + /*margin-bottom: 2em;*/ } .quiqqer-fupc-category-header { line-height: 30px; } -.quiqqer-fupc-category .quiqqer-fupc-category-header { - border-bottom: 1px solid #ddd; - cursor: pointer; - font-size: 1.5em; - line-height: 30px; -} - -.quiqqer-fu-profile-categories-category-items { - clear: both; - float: left; - width: 100%; -} - .quiqqer-fupc-category-items-item { - border: 1px solid #ddd; - border-bottom: none; + border-top: var(--_qui-cologne-theme-border-width) solid var(--_qui-cologne-theme-border-color); + border-left: var(--_qui-cologne-theme-border-width) solid var(--_qui-cologne-theme-border-color); + border-right: var(--_qui-cologne-theme-border-width) solid var(--_qui-cologne-theme-border-color); clear: both; - color: #333; - display: flex; - float: left; - line-height: 40px; overflow: hidden; padding: 5px 0; position: relative; @@ -89,26 +55,13 @@ width: 100%; } -.quiqqer-fupc-category.quiqqer-fupc-category--open .quiqqer-fupc-category-header { - border-bottom: none !important; -} - -.quiqqer-fupc-category--open .quiqqer-fupc-category-items-item { - background: #fff; -} - -.quiqqer-fupc-category .quiqqer-fu-profile-categories-category-items .quiqqer-fupc-category-items-item--active, -.quiqqer-fupc-category .quiqqer-fu-profile-categories-category-items .quiqqer-fupc-category-items-item:hover { - background: #fff; -} - -.quiqqer-fupc-category--open .quiqqer-fupc-category-items-item:last-child { - border-bottom: 1px solid #ddd; +.quiqqer-fupc-category-items-item:last-child { + border-bottom: var(--_qui-cologne-theme-border-width) solid var(--_qui-cologne-theme-border-color); border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; } -.quiqqer-fupc-category--open .quiqqer-fupc-category-items-item:first-child { +.quiqqer-fupc-category-items-item:first-child { border-top-left-radius: 5px; border-top-right-radius: 5px; } @@ -122,42 +75,19 @@ width: 0; } -.quiqqer-fu-profile-categories-category-items .quiqqer-fupc-category-items-item--active, -.quiqqer-fu-profile-categories-category-items .quiqqer-fupc-category-items-item:hover { - background: none; -} - -.quiqqer-fu-profile-categories-category-items .quiqqer-fupc-category-items-item--active:before, -.quiqqer-fu-profile-categories-category-items .quiqqer-fupc-category-items-item:hover:before { +.quiqqer-fupc-category-items-item[data-active]:before, +.quiqqer-fupc-category-items-item:is(:hover, :focus):before { width: 4px; } .quiqqer-fupc-category-items-item .fa { line-height: 40px; + width: 40px; } /***********/ /* address */ /***********/ -.quiqqer-frontend-users-address header, -.quiqqer-frontendUsers-userdata-section header { - padding: 20px 0; -} - -.quiqqer-frontend-users-address header h2, -.quiqqer-frontendUsers-userdata-section header h2 { - padding-bottom: 0; -} - -.quiqqer-frontend-users-address-edit .qui-select, -.quiqqer-frontend-users-address-edit .qui-select .drop-icon { - height: 40px; -} - -.quiqqer-frontend-users-address-edit .qui-select .text { - line-height: 40px; -} - .quiqqer-frontendUsers-userdata-invoiceaddress { border-bottom: 1px solid rgba(0, 0, 0, 0.1); float: left; @@ -172,72 +102,10 @@ margin-right: 10px; } -.quiqqer-frontend-users-address-list-entry { - border: 1px solid #ddd; - background: #fff; -} - -.quiqqer-frontendUsers-controls-profile-categoryContent .quiqqer-frontend-users-address-list-entry-buttons button { - width: inherit; - margin-bottom: 0; -} - -.cologne-main .quiqqer-frontendUsers-userdata-address h2, -.cologne-main .quiqqer-frontendUsers-userdata-invoiceaddress h2, -.cologne-main .quiqqer-frontendUsers-userdata-invoiceaddress header, -.cologne-main .quiqqer-frontendUsers-controls-profile-changepassword h2, -.cologne-main .quiqqer-frontendUsers-controls-profile-deleteaccount h2 { - margin-top: 0; - padding-top: 0; -} - -@media (max-width: 768px) { - .quiqqer-frontendUsers-controls-profile-categories-mobile { - margin-bottom: 2em; - } - - .quiqqer-frontend-users-address-list .quiqqer-frontend-users-address-list-entry { - width: 100%; - } - - .quiqqer-frontend-users-address-list .quiqqer-frontend-users-address-list-entry:nth-child(even) { - margin-left: 0; - } - - .quiqqer-frontend-users-address-list .quiqqer-frontend-users-address-list-entry:nth-child(odd) { - margin-right: 0; - } -} - -/* email */ -.quiqqer-frontendUsers-userdata-address-additional .quiqqer-frontendUsers-userdata-email input { - float: left; - width: calc(100% - 70px); - margin-right: 10px; -} - -.quiqqer-frontendUsers-userdata-email .quiqqer-frontendUsers-userdata-email-edit { - line-height: 40px; - border-width: 1px; - border-radius: 0.25rem; -} - -@media screen and (max-width: 767px) { - .cologne-main .quiqqer-frontendUsers-controls-profile-control label { - margin-bottom: 10px; - } -} - -/**********/ -/* Avatar */ -/**********/ -.quiqqer-frontendUsers-userAvatar-gravatar { - margin: 1.5rem 0; -} - /******************/ /* profile orders */ /******************/ +/* hide top pagination */ .quiqqer-order-profile-orders .quiqqer-order-profile-orders-pagination:first-child { display: none; } @@ -252,7 +120,7 @@ :where(.loginAndRegister) .quiqqer-fu-login-container { background: #f8f8f8; - border: 1px solid #ddd; + border: var(--_qui-cologne-theme-border-width) solid var(--_qui-cologne-theme-border-color); max-width: 400px; position: relative; width: 100%; diff --git a/bin/css/style.css b/bin/css/style.css index 408b667..4bcf1f4 100644 --- a/bin/css/style.css +++ b/bin/css/style.css @@ -928,6 +928,7 @@ a.toTop:before { .cologne-main { margin-top: 1rem; + margin-bottom: 1rem; width: 100%; } diff --git a/bin/css/variables.css b/bin/css/variables.css index 434620f..4dc456a 100644 --- a/bin/css/variables.css +++ b/bin/css/variables.css @@ -19,6 +19,9 @@ --_qui-cologne-header-height: 100px; + --_qui-cologne-theme-border-color: var(--qui-cologne-theme-border-color, #ddd); + --_qui-cologne-theme-border-width: var(--qui-cologne-theme-border-width, 1px); + /* ecoyn / ecommerce */ --_qui-order-basket-articles-image-width: var(--qui-order-basket-articles-image-width, 100px); --_qui-order-basket-articles-image-height: var(--qui-order-basket-articles-image-height, 100px); diff --git a/quiqqer/frontend-users/src/QUI/FrontendUsers/Controls/Profile.html b/quiqqer/frontend-users/src/QUI/FrontendUsers/Controls/Profile.html index 171be08..97ec342 100644 --- a/quiqqer/frontend-users/src/QUI/FrontendUsers/Controls/Profile.html +++ b/quiqqer/frontend-users/src/QUI/FrontendUsers/Controls/Profile.html @@ -1,76 +1,87 @@ {if !$Category} -<p> - {locale group="quiqqer/frontend-users" var="profile.no_categories_available"} -</p> + <div class="quiqqer-frontendUsers-controls-profile__noCategoriesInfo"> + <p> + {locale group="quiqqer/frontend-users" var="profile.no_categories_available"} + </p> + </div> {else} + <div class="quiqqer-frontendUsers-controls-profile__sidebar"> + {if $this->getAttribute('menu')} + <div class="quiqqer-frontendUsers-controls-profile-categories"> -{if $this->getAttribute('menu')} -<div class="quiqqer-frontendUsers-controls-profile-categories"> - - <div class="quiqqer-fupc-userinfo"> - {control control="QUI\TemplateCologne\Controls\SimpleUserInfo" assign=SimpleUserInfo} - {$SimpleUserInfo->create()} - </div> + <div class="quiqqer-fupc-userinfo"> + {control control="QUI\TemplateCologne\Controls\SimpleUserInfo" assign=SimpleUserInfo} + {$SimpleUserInfo->create()} + </div> - {foreach $categories as $category} - <div class="quiqqer-fupc-category quiqqer-fupc-category--open" - data-category="{$category.name}" - > - <div class="quiqqer-fupc-category-header"> - {$category.title} - </div> - <div class="quiqqer-fu-profile-categories-category-items"> - {foreach $category.items as $setting} + {foreach $categories as $category} + <div class="quiqqer-fupc-category" + data-category="{$category.name}" + data-name="nav-category" + data-open="1" + > + <div class="quiqqer-fupc-category-header" data-name="header"> + <span class="quiqqer-fupc-category-header__text">{$category.title}</span> + <span class="fa-solid fa-angle-right quiqqer-fupc-category-header__icon" data-name="opener"></span> + </div> + <div class="quiqqer-fu-profile-categories-category-items"> + {foreach $category.items as $setting} + {assign var=active value=false} + {if $currentCategory == $category.name && $currentSetting == $setting.name} + {assign var=active value=true} + {/if} + <a href="{$Site->getUrlRewritten()}/{$category.name}/{$setting.name}" + class="quiqqer-fupc-category-items-item" + {if $active}data-active{/if} + data-name="nav-category-item" + data-setting="{$setting.name}" + > + {if $setting.icon} + <span class="fa-fw quiqqer-fupc-category-items-item-icon {$setting.icon}"></span> + {/if} + <span>{$setting.title}</span> + </a> + {/foreach} + </div> + </div> + {/foreach} + </div> + {/if} - {assign var=active value=""} - {if $currentCategory == $category.name && $currentSetting == $setting.name} - {assign var=active value=" quiqqer-fupc-category-items-item--active"} - {/if} - <a href="{$Site->getUrlRewritten()}/{$category.name}/{$setting.name}" - class="quiqqer-fupc-category-items-item{$active}" - data-setting="{$setting.name}" - > - {if $setting.icon} - <span class="quiqqer-fupc-category-items-item-icon {$setting.icon}"></span> - {/if} - <span>{$setting.title}</span> - </a> - {/foreach} - </div> + {* mobile categories *} + <form action="" method="post" class="quiqqer-frontendUsers-controls-profile-categories-mobile"> + <label class="quiqqer-frontendUsers-controls-profile-categories-mobile-label"> + <select name="profile-categories-mobile"> + {foreach $categories as $category} + <optgroup label="{$category.title}"> + {foreach $category.items as $setting} + {assign var=active value=""} + {if $currentCategory == $category.name && $currentSetting == $setting.name} + {assign var=active value="selected"} + {/if} + <option value="{$category.name}:{$setting.name}" {$active}> + {$setting.title} + </option> + {/foreach} + </optgroup> + {/foreach} + </select> + </label> + </form> </div> - {/foreach} -</div> -{/if} - -<form action="" method="post"> - <label class="quiqqer-frontendUsers-controls-profile-categories-mobile"> - <select name="profile-categories"> - {foreach $categories as $category} - <optgroup label="{$category.title}"> - {foreach $category.items as $setting} - {assign var=active value=""} - {if $currentCategory== $category.name} - {assign var=active value=" selected"} - {/if} - <option value="{$category.name}:{$setting.name}"{$active}> - {$setting.title} - </option> - {/foreach} - </optgroup> - {/foreach} - </select> - </label> -</form> -<form class="quiqqer-frontendUsers-controls-profile-categoryContent" - method="post" - action="" - data-category="{$currentCategory}" - data-setting="{$currentSetting}" -> - <div class="quiqqer-frontendUsers-controls-profile-categoryContentAnimation"> - {$Category->create()} - <input type="hidden" name="profile-save" value="1"> + <div class="quiqqer-frontendUsers-controls-profile__content"> + <form class="quiqqer-frontendUsers-controls-profile-categoryContent" + data-name="form" + method="post" + action="" + data-category="{$currentCategory}" + data-setting="{$currentSetting}" + > + <div class="quiqqer-frontendUsers-controls-profile-categoryContentAnimation" data-name="content-animated"> + {$Category->create()} + <input type="hidden" name="profile-save" value="1"> + </div> + </form> </div> -</form> {/if} \ No newline at end of file -- GitLab From dbff1739aa613165fe38b4fc4ac62ca4b2c9ca7b Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Wed, 12 Feb 2025 13:48:44 +0100 Subject: [PATCH 18/21] fix: update CSS to match changes in package quiqqer/coupons 2.1.1 Related: quiqqer/coupons#17 --- bin/css/order.css | 91 +++++++---------------------------------------- 1 file changed, 13 insertions(+), 78 deletions(-) diff --git a/bin/css/order.css b/bin/css/order.css index 2460636..69c34c0 100644 --- a/bin/css/order.css +++ b/bin/css/order.css @@ -146,18 +146,28 @@ td.quiqqer-order-basket-articles-article-remove button:hover { .quiqqer-shoppingCart-basket-end, .quiqqer-order-basket-end { + --gap: 1.5rem; + background: #f8f8f8; border: 1px solid #ddd; - clear: both; margin-top: 20px; - min-height: 90px; padding: 20px; position: relative; width: 100%; + display: flex; + flex-direction: column; + gap: var(--gap); +} + +.quiqqer-order-basket-end > *:not(:first-child, :only-child) { + border-top: var(--_qui-cologne-theme-border-width) solid var(--_qui-cologne-theme-border-color); + padding-top: var(--gap); } @media screen and (max-width: 767px) { - .quiqqer-shoppingCart-basket-end, .quiqqer-order-basket-end { + .quiqqer-shoppingCart-basket-end, + .quiqqer-order-basket-end { + --gap: 1rem; padding: 10px; } } @@ -217,45 +227,7 @@ td.quiqqer-order-basket-articles-article-remove button:hover { border-bottom: 3px double #999999; } -/* coupons */ -.quiqqer-coupons-couponcodeinput-title { - display: none; -} - -input.quiqqer-coupons-couponcodeinput-input:hover, -input.quiqqer-coupons-couponcodeinput-input:focus, -input.quiqqer-coupons-couponcodeinput-input:active { - background: #fff; - border-color: #28a745; -} - -.btn.quiqqer-coupons-couponcodeinput-btn { - background: #fff; - border-color: #28a745; - color: #28a745; -} - -.btn.quiqqer-coupons-couponcodeinput-btn:hover, -.btn.quiqqer-coupons-couponcodeinput-btn:active { - background: #28a745; - color: #fff; -} - @media screen and (max-width: 767px) { - .quiqqer-coupons-couponcodeinput { - flex-wrap: wrap; - } - - .quiqqer-coupons-couponcodeinput label { - margin: 0 0 1rem 0; - width: 100%; - } - - .quiqqer-coupons-couponcodeinput input, - .btn.quiqqer-coupons-couponcodeinput-btn { - width: 100%; - } - .quiqqer-order-basket-articles-article td:before { font-weight: bold; } @@ -372,43 +344,6 @@ input.quiqqer-coupons-couponcodeinput-input:active { .quiqqer-order-ordering-buttons a { width: 100%; } - - .quiqqer-order-basket-end { - height: inherit; - padding: 1rem; - text-align: center; - } - - .quiqqer-order-basket-end > * { - display: inline-block; - float: none !important; - margin: 0 !important; - width: 100%; - } - - .quiqqer-order-basket-end > * + * { - margin-top: 20px !important; - } - - .quiqqer-payment-paypal-express { - padding: 1rem 0; - } - - .quiqqer-order-basket-end .quiqqer-coupons-couponcodeinput { - flex-direction: column; - padding: 0; - text-align: left; - } - - .quiqqer-order-basket-end .quiqqer-coupons-couponcodeinput input { - margin-bottom: 1rem; - width: 100%; - } - - .quiqqer-coupons-couponcodeinput label span { - display: block; - padding: 5px 10px; - } } /******************/ -- GitLab From 5e01917367687b81c86366a176c48eaa491c50d9 Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Mon, 24 Feb 2025 14:31:05 +0100 Subject: [PATCH 19/21] fix: adjust template to the latest quiqqer/order changes Related: quiqqer/template-cologne#119 --- bin/css/user-orders.css | 198 ------------------ bin/css/variables.css | 1 + composer.json | 2 +- .../Controls/UserOrders.Order.html | 87 -------- template/head/styles.html | 1 - 5 files changed, 2 insertions(+), 287 deletions(-) delete mode 100644 bin/css/user-orders.css delete mode 100644 quiqqer/order/src/QUI/ERP/Order/FrontendUsers/Controls/UserOrders.Order.html diff --git a/bin/css/user-orders.css b/bin/css/user-orders.css deleted file mode 100644 index 2ab49d7..0000000 --- a/bin/css/user-orders.css +++ /dev/null @@ -1,198 +0,0 @@ -section.quiqqer-order-profile-orders-order { - margin-bottom: 2em; -} - -.quiqqer-order-profile-orders-order-header-orderId { - float: left; - position: relative; - width: 25%; -} - -.quiqqer-order-profile-orders-order-header-date, -.quiqqer-order-profile-orders-order-header-total, -.quiqqer-order-profile-orders-order-header-addressInvoice, -.quiqqer-order-profile-orders-order-header-addressDelivery, -.quiqqer-order-profile-orders-order-header-orderId { - padding: 0 10px; -} - -.quiqqer-order-profile-orders-order-header-date { - padding-left: 0; -} - -.quiqqer-order-profile-orders-order-header-orderId { - padding-right: 0; -} - -.quiqqer-order-profile-orders-order-header-date > span:first-child, -.quiqqer-order-profile-orders-order-header-total > span:first-child, -.quiqqer-order-profile-orders-order-header-addressInvoice > span:first-child, -.quiqqer-order-profile-orders-order-header-addressDelivery > span:first-child, -.quiqqer-order-profile-orders-order-header-orderId > span:first-child { - display: block; -} - -/** - 1. avoid !important and increase the specificity (not good) - 2. set address position at the bottom line 100% height + 10px padding of "header" - */ -.quiqqer-order-profile-orders-order-header-addressInvoice address:is(address) { /* 1 */ - top: calc(100% + 10px); /* 2 */ -} - -.quiqqer-order-profile-orders-order-header-addressInvoice span { - align-items: center; - display: flex; - max-width: 100%; -} - -.quiqqer-order-profile-orders-order-header-addressInvoice > span > span { - display: block; - max-width: 100%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.quiqqer-order-profile-orders-order-header-addressInvoice .fa { - margin-left: 5px; -} - -.quiqqer-order-profile-orders-order-articles { - background: #fff; -} - -.quiqqer-order-profile-orders-order-articles-article { - border-bottom: 1px dashed #ddd; - padding: 2em 0; -} - -.quiqqer-order-profile-orders-order-articles-article:last-child { - border-bottom: none; -} - -.quiqqer-order-profile-orders-order-articles-article { - align-items: start; - border-bottom: 1px dashed #ddd; - display: grid; - grid-column-gap: 20px; - grid-template-columns: 25% auto; - grid-template-rows: auto; - justify-items: start; - padding: 2em 0; -} - -.quiqqer-order-profile-orders-order-articles-image { - align-items: flex-start; - align-self: start; - border-right: 1px dashed #ddd; - display: flex; - grid-row: 1 / 5; - justify-content: center; - padding: 20px; - width: 100%; -} - -.quiqqer-order-profile-orders-order-articles-information { - padding-top: 0 !important; -} - -.quiqqer-order-profile-orders-order-articles-title { - color: inherit; - font-size: 1.75em; -} - -.quiqqer-order-profile-orders-order-articles-description { - margin: 5px 0; - color: #9ba3ad; -} - -.quiqqer-order-profile-orders-order-articles-price { - font-size: 1.2em; - font-weight: 500; - padding-bottom: 10px; -} - -.quiqqer-order-profile-orders-order-articles-rebuy { - align-self: end; -} - -/**********/ -/* footer */ -/**********/ -.quiqqer-order-profile-orders-order footer { - display: flex; - justify-content: space-between; -} - -.quiqqer-order-profile-orders-order footer .quiqqer-order-profile-orders-order-footer-paymentType { - margin-top: 0; -} - -.quiqqer-order-profile-orders-order-footer-rightWrapper { - display: flex; - align-items: center; -} - -@media (max-width: 768px) { - /***********************/ - /* article list header */ - /***********************/ - .quiqqer-order-profile-orders-order-header-date, .quiqqer-order-profile-orders-order-header-total, .quiqqer-order-profile-orders-order-header-addressInvoice, .quiqqer-order-profile-orders-order-header-addressDelivery, .quiqqer-order-profile-orders-order-header-orderId { - padding: 0; - margin-bottom: 10px; - } - - .quiqqer-order-profile-orders-order-header-orderId { - margin: 0 !important; - } - - .quiqqer-order-profile-orders-order-header-date > span:first-child, .quiqqer-order-profile-orders-order-header-total > span:first-child, .quiqqer-order-profile-orders-order-header-addressInvoice > span:first-child, .quiqqer-order-profile-orders-order-header-addressDelivery > span:first-child, .quiqqer-order-profile-orders-order-header-orderId > span:first-child { - padding-right: 5px; - } - - /****************/ - /* article list */ - /****************/ - .quiqqer-order-profile-orders-order-articles-article { - display: block; - padding: 3em 0; - } - - .quiqqer-order-profile-orders-order-articles-image { - border-bottom: 1px dashed #ddd; - border-right: none; - float: none !important; - margin: 0 0 20px 0; - } - - .quiqqer-order-profile-orders-order-articles-price { - padding-top: 10px; - } - - .quiqqer-order-profile-orders-order-articles-rebuy{ - display: block; - margin: 0 auto; - max-width: 340px; - width: 100%; - } - - /**********/ - /* footer */ - /**********/ - .quiqqer-order-profile-orders-order footer { - display: block; - } - - .quiqqer-order-profile-orders-order footer .quiqqer-order-profile-orders-order-footer-rightWrapper .btn { - padding-left: 3px; - padding-right: 3px; - } -} - -/****************/ -/* Invoice list */ -/****************/ -.quiqqer-invoice-profile-invoices-table-invoice { - background: #fff; -} \ No newline at end of file diff --git a/bin/css/variables.css b/bin/css/variables.css index 4dc456a..77e5b4f 100644 --- a/bin/css/variables.css +++ b/bin/css/variables.css @@ -18,6 +18,7 @@ --bg-secondary: #f5f5f5; --_qui-cologne-header-height: 100px; + --_qui-template-scrollMarginTop: var(--qui-template-scrollMarginTop, var(--_qui-cologne-header-height)); --_qui-cologne-theme-border-color: var(--qui-cologne-theme-border-color, #ddd); --_qui-cologne-theme-border-width: var(--qui-cologne-theme-border-width, 1px); diff --git a/composer.json b/composer.json index a0cf711..18b2786 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "quiqqer/core": "^2", "quiqqer/erp": "^3", "quiqqer/products": "^2", - "quiqqer/order": "^2.7.7", + "quiqqer/order": "^2.7.23", "quiqqer/product-bricks": "^2", "quiqqer/frontend-users": "^2", "quiqqer/menu": "^3", diff --git a/quiqqer/order/src/QUI/ERP/Order/FrontendUsers/Controls/UserOrders.Order.html b/quiqqer/order/src/QUI/ERP/Order/FrontendUsers/Controls/UserOrders.Order.html deleted file mode 100644 index 49f018d..0000000 --- a/quiqqer/order/src/QUI/ERP/Order/FrontendUsers/Controls/UserOrders.Order.html +++ /dev/null @@ -1,87 +0,0 @@ -<section class="quiqqer-order-profile-orders-order"> - <header> - <div class="quiqqer-order-profile-orders-order-header-date"> - <span class="text-muted text-small">{locale group="quiqqer/order" var="control.profile.orders.order.date"}</span> - <span>{$Order->getCreateDate()}</span> - </div> - - <div class="quiqqer-order-profile-orders-order-header-total"> - <span class="text-muted text-small">{locale group="quiqqer/order" var="control.profile.orders.order.total"}</span> - <span>{$order.calculations.display_sum}</span> - </div> - - <div class="quiqqer-order-profile-orders-order-header-addressInvoice"> - <span class="text-muted text-small">{locale group="quiqqer/order" var="control.profile.orders.order.invoiceAddress"}</span> - {if $Invoice} - {assign var=Customer value=$Invoice->getCustomer()} - {else} - {assign var=Customer value=$Order->getCustomer()} - {/if} - - {assign var=Address value=$Customer->getAddress()} - {$Address->render(['tel' => false, 'mail' => false])} - <span> - <span>{$Address->getName()}</span> - <span class="fa fa-angle-down"></span> - </span> - </div> - - <div class="quiqqer-order-profile-orders-order-header-orderId"> - <span class="text-muted text-small">{locale group="quiqqer/order" var="control.profile.orders.order.orderNo"}</span> - <a href="{$Utils->getOrderUrl($Project, $Order)}" - target="_blank" - data-hash="{$Order->getHash()}" - title="{locale group='quiqqer/order' var='control.order.details.title'}" - > - {$Order->getId()} - </a> - </div> - </header> - - <div class="quiqqer-order-profile-orders-order-articles"> - {foreach $articles as $Article} - {$this->renderArticle($Article)} - {/foreach} - </div> - - <footer> - <div class="quiqqer-order-profile-orders-order-footer-leftWrapper"> - {if $Payment} - <div class="quiqqer-order-profile-orders-order-footer-paymentType"> - <span class="text-muted text-small">{locale group="quiqqer/order" var="control.profile.orders.order.paymentMethod"}:</span> - <span>{$Payment->getTitle()}</span> - </div> - {/if} - - {if isset($orderStatus)} - <div class="quiqqer-order-profile-orders-order-footer-orderStatus"> - <span class="text-muted text-small">{locale group="quiqqer/order" var="control.profile.orders.order.orderStatus"}:</span> - <span>{$orderStatus}</span> - </div> - {/if} - - {if !empty($shippingStatus)} - <div class="quiqqer-order-profile-orders-order-footer-shipping"> - <span class="text-muted text-small">{locale group="quiqqer/shipping" var="control.profile.orders.shipping"}:</span> - <span>{$shippingStatus}</span> - </div> - {/if} - </div> - - <div class="quiqqer-order-profile-orders-order-footer-rightWrapper"> - {if $Order->isPosted() && $Order->getInvoiceType() === 'QUI\ERP\Accounting\Invoice\Invoice'} - <a href="{$Order->getAttribute('downloadLink')}" target="_blank" - class="btn btn-link-dark"> - <span class="fa fa-file-pdf-o"></span> - <span>{locale group="quiqqer/order" var="control.profile.orders.order.invoice"}</span> - </a> - {else if !$Order->isSuccessful()} - <a href="{$orderUrl}" target="_blank" - class="btn btn-link-dark"> - <span class="fa fa-shopping-basket"></span> - <span>{locale group="quiqqer/order" var="control.profile.orders.order.continuePayment"}</span> - </a> - {/if} - </div> - </footer> -</section> diff --git a/template/head/styles.html b/template/head/styles.html index 2a19527..9a03798 100644 --- a/template/head/styles.html +++ b/template/head/styles.html @@ -13,7 +13,6 @@ <link rel="stylesheet" href="{$Template->getTemplateUrl('bin/css/products.css')}"/> <link rel="stylesheet" href="{$Template->getTemplateUrl('bin/css/frontend-users.css')}"/> <link rel="stylesheet" href="{$Template->getTemplateUrl('bin/css/order.css')}"/> -<link rel="stylesheet" href="{$Template->getTemplateUrl('bin/css/user-orders.css')}"/> <link rel="stylesheet" href="{$Template->getTemplateUrl('bin/css/controls.css')}"/> <link rel="stylesheet" href="{$Template->getTemplateUrl('bin/css/mini-basket.css')}"/> <link rel="stylesheet" href="{$Template->getTemplateUrl('bin/css/product-bricks.css')}"/> -- GitLab From 98689c7930d92c684955ed00b1c44ef5c7b5b22a Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Wed, 26 Feb 2025 10:38:58 +0100 Subject: [PATCH 20/21] fix: updated basket html file for compatibility with quiqqer/order v2.7.24 Related: quiqqer/template-cologne#115 --- composer.json | 2 +- .../QUI/ERP/Order/Controls/Basket/Basket.html | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 18b2786..a553c16 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "quiqqer/core": "^2", "quiqqer/erp": "^3", "quiqqer/products": "^2", - "quiqqer/order": "^2.7.23", + "quiqqer/order": "^2.7.24", "quiqqer/product-bricks": "^2", "quiqqer/frontend-users": "^2", "quiqqer/menu": "^3", diff --git a/quiqqer/order/src/QUI/ERP/Order/Controls/Basket/Basket.html b/quiqqer/order/src/QUI/ERP/Order/Controls/Basket/Basket.html index d06d528..8414d1f 100644 --- a/quiqqer/order/src/QUI/ERP/Order/Controls/Basket/Basket.html +++ b/quiqqer/order/src/QUI/ERP/Order/Controls/Basket/Basket.html @@ -231,11 +231,23 @@ {elseif $this->isGuest() && $this->isLoading()} <div class="quiqqer-order-basket-isLoading"> - <span class="fa fa-spinner fa-spin"></span> + <div class="quiqqer-order-basket-isLoading__inner"> + <span class="fa fa-circle-notch fa-spin"></span> + </div> </div> {else} <div class="quiqqer-order-basket-isEmpty"> - {locale group="quiqqer/order" var="message.basket.is.empty"} + <div class="quiqqer-order-basket-isEmpty__iconContainer"> + <div class="decorative-element"> + <div class="decorative-element__line decorative-element__line--1 animation"></div> + <div class="decorative-element__line decorative-element__line--2 animation"></div> + <div class="decorative-element__line decorative-element__line--3 animation"></div> + </div> + <i class="fa-solid fa-cart-shopping quiqqer-order-basket-isEmpty__icon animation"></i> + </div> + <div class="quiqqer-order-basket-isEmpty__text animation"> + {locale group="quiqqer/order" var="message.basket.is.empty"} + </div> </div> {/if} -- GitLab From 6e847a43621703e305a5490432938ef9f438a0e7 Mon Sep 17 00:00:00 2001 From: Michael Danielczok <michael@pcsg.de> Date: Thu, 27 Feb 2025 12:35:39 +0100 Subject: [PATCH 21/21] fix: avoid floating invoice elements in user profile --- bin/css/frontend-users.css | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/css/frontend-users.css b/bin/css/frontend-users.css index 927cbb3..4c5250f 100644 --- a/bin/css/frontend-users.css +++ b/bin/css/frontend-users.css @@ -90,7 +90,6 @@ /***********/ .quiqqer-frontendUsers-userdata-invoiceaddress { border-bottom: 1px solid rgba(0, 0, 0, 0.1); - float: left; margin-bottom: 20px; padding-bottom: 20px; width: 100%; -- GitLab