diff --git a/README.md b/README.md index 69567b4f492b52b86ee9f5af2e6bf79c009f01e7..01fdd09a6d2faf16955fe8dd038486b92263d8b5 100644 --- a/README.md +++ b/README.md @@ -40,9 +40,14 @@ then you can write an e-mail to support@pcsg.de. For developers -------------- +### Testing of order confirmation mail template + +If you wont to test confirmation mail template you will finde some + information in [QUIQQER Order wiki](https://dev.quiqqer.com/quiqqer/order/wikis/Home/Send-order-confirmation-mail-console-tool). + ### Available template events -For mor information go to +For more information go to [QUIQQER Wiki - Template events](https://dev.quiqqer.com/quiqqer/quiqqer/wikis/design_standard#template-events). diff --git a/bin/css/order.css b/bin/css/order.css index 7b04ec45f9e9ae652cae2d3b36ab8b96d837ebdd..74987857c18ab4648129c4f616fe39f03c76c55b 100644 --- a/bin/css/order.css +++ b/bin/css/order.css @@ -2,6 +2,8 @@ =================================================== */ .quiqqer-order-ordering .quiqqer-order-ordering-timeline { border-bottom: none; + padding-top: 0; + margin-bottom: 0 !important; } .quiqqer-order-ordering-timeline a { @@ -20,6 +22,16 @@ cursor: pointer; } +@media screen and (max-width: 767px) { + .quiqqer-order-ordering .quiqqer-order-ordering-timeline li { + width: 140px !important; + } + + .quiqqer-order-ordering-timeline .quiqqer-order-ordering-timeline-container li .title { + font-size: 11px; + } +} + /****************/ /* step: basket */ /****************/ @@ -120,13 +132,19 @@ td.quiqqer-order-basket-articles-article-remove button:hover { border: 1px solid #ddd; clear: both; float: left; - min-height: 90px; margin-top: 20px; + min-height: 90px; padding: 20px; position: relative; width: 100%; } +@media screen and (max-width: 767px) { + .quiqqer-shoppingCart-basket-end, .quiqqer-order-basket-end { + padding: 10px; + } +} + .quiqqer-order-basket-articles-header-quantity, .quiqqer-order-basket-articles-header-price, .quiqqer-order-basket-articles-article-quantity, @@ -213,6 +231,20 @@ input.quiqqer-coupons-couponcodeinput-input:active { } @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; } @@ -312,23 +344,29 @@ input.quiqqer-coupons-couponcodeinput-input:active { /* step: shipping */ /******************/ -.quiqqer-order-step-shipping-list-entry { - border-bottom: 0 !important; +.quiqqer-order-step-shipping-list .quiqqer-order-step-shipping-list-entry { + border-bottom: none; } -.quiqqer-order-step-shipping-list-entry:hover { +.quiqqer-order-step-shipping-list .quiqqer-order-step-shipping-list-entry:hover { background: #f8f8f8 !important; } -.quiqqer-order-step-shipping-list-entry:hover { +.quiqqer-order-step-shipping-list .quiqqer-order-step-shipping-list-entry:hover { background: rgba(0, 0, 0, 0.1); } +.quiqqer-order-step-shipping-list-entry-price { + display: flex; +} + @media (max-width: 768px) { .quiqqer-order-step-shipping-list .quiqqer-order-step-shipping-list-entry { display: flex !important; flex-wrap: wrap; - margin-bottom: 30px; + margin-bottom: 20px; + padding-bottom: 20px; + border-bottom: 1px solid #ddd; } .quiqqer-order-step-shipping-list-entry:last-child { @@ -358,6 +396,11 @@ input.quiqqer-coupons-couponcodeinput-input:active { .quiqqer-order-step-shipping-list-entry-price { padding: 10px 10px 10px 40px; } + + .quiqqer-order-step-shipping-list-entry-text, + .quiqqer-order-step-shipping-list-entry-price { + margin-left: 40px; + } } /******************/ @@ -383,6 +426,8 @@ input.quiqqer-coupons-couponcodeinput-input:active { .quiqqer-order-step-payments-list .quiqqer-order-step-payments-list-entry { display: flex !important; flex-wrap: wrap; + border-bottom: 1px solid #ddd; + padding-bottom: 20px; } .quiqqer-order-step-payments-list-entry .quiqqer-order-step-payments-list-entry-text { @@ -548,8 +593,8 @@ input.quiqqer-coupons-couponcodeinput-input:active { } .quiqqer-order-next-mobile { - margin-top: 20px; margin-bottom: 20px; + margin-top: 20px; } } @@ -576,10 +621,10 @@ input.quiqqer-coupons-couponcodeinput-input:active { .quiqqer-order-step-checkout .quiqqer-order-step-checkout-shipping, .quiqqer-order-step-checkout .quiqqer-order-step-checkout-payments-payment { + align-items: flex-start; display: flex; - margin: 0; flex-direction: column; - align-items: flex-start; + margin: 0; } .quiqqer-order-step-checkout .quiqqer-order-step-checkout-payments-payment { @@ -785,4 +830,20 @@ table.articles-sum td { .type-quiqqer-order-types-shoppingCart .content-header, .type-quiqqer-order-types-shoppingCart .quiqqer-order-step-basket > header { display: none; +} + +/****************/ +/* Order window */ +/****************/ +.quiqqer-order-window .qui-window-popup-buttons { + +} +@media screen and (max-width: 767px) { + .quiqqer-order-window .quiqqer-order-window-header { + background: #f8f8f8; + } + + .quiqqer-order-window .qui-window-popup-buttons { + background: #f8f8f8; + } } \ No newline at end of file diff --git a/bin/css/products.css b/bin/css/products.css index c982fb2a56b209976418fbac8aea798574b9b0ce..8dc0f5446442e070c19182209b0f79251ce0ae86 100644 --- a/bin/css/products.css +++ b/bin/css/products.css @@ -1047,8 +1047,10 @@ article .product-data-more { margin-top: 2rem; } -.product-data-more-tabs { +.product-data-more-tabsContainer .product-data-more-tabs { border-bottom: 1px solid #ddd; + min-width: 100%; + width: auto; } li.product-data-more-tabs-tab { @@ -1071,6 +1073,7 @@ li.product-data-more-tabs-tab.active { .product-data-more .product-data-more-sheets { border-color: #ddd; border-top: none; + background: #fff; } @media screen and (max-width: 767px) { diff --git a/bin/javascript/init.js b/bin/javascript/init.js index 5fef3d69562496fbe549e1880f41226397edd718..a2c81e35eaf8906659c62c9e3288492a549b1af6 100644 --- a/bin/javascript/init.js +++ b/bin/javascript/init.js @@ -1,4 +1,5 @@ -var lg = 'quiqqer/template-cologne'; +var lg = 'quiqqer/template-cologne', + USER_BUTTON_CLICKED = false; window.addEvent('domready', function () { "use strict"; @@ -102,6 +103,12 @@ window.addEvent('domready', function () { } if (!QUIQQER_USER.id) { + if (USER_BUTTON_CLICKED) { + return; + } + + USER_BUTTON_CLICKED = true; + createLoginWindow(); } } @@ -222,7 +229,7 @@ window.addEvent('domready', function () { SearchBtn = document.getElement('.cologne-header .search-button'), SearchInput = document.getElement('.template-search input[type="search"]'); - if (SHOW_MENU_START_POS && SHOW_MENU_START_POS.toInt() > 0) { + if (SHOW_MENU_START_POS && SHOW_MENU_START_POS.toInt() > 0) { showMenuFrom = SHOW_MENU_START_POS.toInt(); } @@ -336,7 +343,7 @@ window.addEvent('domready', function () { * @param UserIconControl * @param QUILocale */ -function userIconLoadEvent(UserIconControl, QUILocale) { +function userIconLoadEvent (UserIconControl, QUILocale) { var Menu = UserIconControl.$Menu; require([ @@ -372,7 +379,7 @@ function userIconLoadEvent(UserIconControl, QUILocale) { * * @param LogoutWindow */ -function createLogoutWindow(LogoutWindow) { +function createLogoutWindow (LogoutWindow) { new LogoutWindow({ class : 'cologne-logout-dialog', title : false, @@ -416,7 +423,9 @@ function createLogoutWindow(LogoutWindow) { /** * Create and open login popup */ -function createLoginWindow() { +function createLoginWindow () { + USER_BUTTON_CLICKED = false; + require([ 'Locale', 'utils/Controls', @@ -460,7 +469,7 @@ function createLoginWindow() { * In mobile resolution (less than 767px) opens category menu button * the mobile navigation instead category navigation. */ -function initMobileMenu() { +function initMobileMenu () { if (QUI.getWindowSize().x >= 768) { return; } diff --git a/locale.xml b/locale.xml index 2fdf7f63085730278c890d4ccea0d09fd0e5f962..77d93125ee264a4f3a4057a7046698fe864448a4 100644 --- a/locale.xml +++ b/locale.xml @@ -203,8 +203,6 @@ <a href="#" class="topbar-social-link"><span class="fa fa-facebook"> </span></a> <a href="#" class="topbar-social-link"><span class="fa fa-twitter"> </span></a> - <a href="#" class="topbar-social-link"><span class="fa fa-youtube-play"> </span></a> - <a href="#" class="topbar-social-link"><span class="fa fa-instagram"> </span></a> ]]> </de> <en><![CDATA[ @@ -220,8 +218,6 @@ <a href="#" class="topbar-social-link"><span class="fa fa-facebook"> </span></a> <a href="#" class="topbar-social-link"><span class="fa fa-twitter"> </span></a> - <a href="#" class="topbar-social-link"><span class="fa fa-youtube-play"> </span></a> - <a href="#" class="topbar-social-link"><span class="fa fa-instagram"> </span></a> ]]> </en> </locale> @@ -267,6 +263,10 @@ </locale> <!-- template settings --> + <locale name="settings.shop.showStock"> + <de><![CDATA[Lagerbestand bei Produkt-Details anzeigen]]></de> + <en><![CDATA[Show stock in product details]]></en> + </locale> <locale name="settings.menu.title"> <de><![CDATA[Template Cologne Einstellungen]]></de> <en><![CDATA[Template Cologne Settings]]></en> @@ -509,8 +509,6 @@ <p> <a class="font-icon" href="#"><span class="fa fa-facebook"> </span></a> <a class="font-icon" href="#"><span class="fa fa-twitter"> </span></a> - <a class="font-icon" href="#"><span class="fa fa-youtube-play"> </span></a> - <a class="font-icon" href="#"><span class="fa fa-instagram"> </span></a> </p> ]]> </de> @@ -524,8 +522,6 @@ <p> <a class="font-icon" href="#"><span class="fa fa-facebook"> </span></a> <a class="font-icon" href="#"><span class="fa fa-twitter"> </span></a> - <a class="font-icon" href="#"><span class="fa fa-youtube-play"> </span></a> - <a class="font-icon" href="#"><span class="fa fa-instagram"> </span></a> </p> ]]> </en> @@ -696,11 +692,6 @@ alt="Folgen Sie uns auf Twitter"> </a> - <a href="#" target="_blank" rel="noreferrer" style="color: #666666; text-decoration: none; padding: 0 10px;" - title="Folgen Sie uns auf Instagram"> - <img width="15" height="15" src="[HOST]packages/quiqqer/template-cologne/bin/images/social/instagram.png" - alt="Folgen Sie uns auf Instagram"> - </a> ]]> </de> <en> @@ -717,11 +708,7 @@ alt="Follow us on Twitter"> </a> - <a href="#" target="_blank" rel="noreferrer" style="color: #666666; text-decoration: none; padding: 0 10px;" - title="Follow us on Instagram"> - <img width="15" height="15" src="[HOST]packages/quiqqer/template-cologne/bin/images/social/instagram.png" - alt="Follow us on Instagram"> - </a> + ]]> </en> </locale> @@ -740,11 +727,6 @@ alt="Folgen Sie uns auf Twitter"> </a> - <a href="#" target="_blank" rel="noreferrer" style="color: #666666; text-decoration: none; padding: 0 10px;" - title="Folgen Sie uns auf Instagram"> - <img width="15" height="15" src="[HOST]packages/quiqqer/template-cologne/bin/images/social/instagram.png" - alt="Folgen Sie uns auf Instagram"> - </a> ]]> </de> <en> @@ -761,11 +743,6 @@ alt="Follow us on Twitter"> </a> - <a href="#" target="_blank" rel="noreferrer" style="color: #666666; text-decoration: none; padding: 0 10px;" - title="Follow us on Instagram"> - <img width="15" height="15" src="[HOST]packages/quiqqer/template-cologne/bin/images/social/instagram.png" - alt="Follow us on Instagram"> - </a> ]]> </en> </locale> 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 37b469f32695cbbc8e905d670b461f7a9a7e46b5..6a09017e50e4b671a16786c6ddc83e286fcece25 100644 --- a/quiqqer/products/src/QUI/ERP/Products/Controls/Products/Product.html +++ b/quiqqer/products/src/QUI/ERP/Products/Controls/Products/Product.html @@ -60,6 +60,11 @@ {if $ShippingTimeFrontendView} {$ShippingTimeFrontendView->create()} {/if} + + {assign var=StockFrontendView value=\QUI\TemplateCologne\Utils::getStockFrontendView($Product->getId())} + {if $StockFrontendView} + {$StockFrontendView->create()} + {/if} </div> <div class="product-data-actionButtons"> diff --git a/quiqqer/quiqqer/lib/templates/mail/footer.html b/quiqqer/quiqqer/lib/templates/mail/footer.html index ad28848d254bedc5022bf6b3d0e05d383d6e3446..561a079ac31fc561a1a37f93738a0511ae604714 100644 --- a/quiqqer/quiqqer/lib/templates/mail/footer.html +++ b/quiqqer/quiqqer/lib/templates/mail/footer.html @@ -2,10 +2,10 @@ {$host=$Project->get(1)->getUrlRewrittenWithHost()} <!-- FOOTER --> -<table border="0" cellpadding="0" cellspacing="0" width="100%"> +<table border="0" cellpadding="0" cellspacing="0" width="100%" style="width: 100%;"> <tr> <td bgcolor="#f8f8f8" align="center"> - <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"> + <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" style="width: 100%;"> <tr> <td style="padding: 20px 0px 20px 0px;"> <table width="500" border="0" cellspacing="0" cellpadding="0" align="center" class="responsive-table"> @@ -53,6 +53,29 @@ 'limit' => 1 ])} + {* contact *} + {$contact = $Project->getSites([ + 'where' => [ + 'type' => [ + 'type' => 'IN', + 'value' => 'quiqqer/contact:types/contact' + ] + ], + 'limit' => 1 + ])} + + {if !$contact|count} + {$contact = $Project->getSites([ + 'where' => [ + 'type' => [ + 'type' => 'IN', + 'value' => 'quiqqer/sitetypes:types/contact' + ] + ], + 'limit' => 1 + ])} + {/if} + {if $legalNotes|count} <a href="{$legalNotes[0]->getUrlRewrittenWithHost()}">{$legalNotes[0]->getAttribute('title')}</a> {/if} @@ -62,6 +85,9 @@ {if $generalTermsAndConditions|count} | <a href="{$generalTermsAndConditions[0]->getUrlRewrittenWithHost()}">{$generalTermsAndConditions[0]->getAttribute('title')}</a> {/if} + {if $contact|count} + | <a href="{$contact[0]->getUrlRewrittenWithHost()}">{$contact[0]->getAttribute('title')}</a> + {/if} </td> </tr> diff --git a/settings.xml b/settings.xml index 6b4665e2760c076ced50a8027677abeb71d502f7..47a083a05f3174f548bdda7463cdee518b9c6912 100644 --- a/settings.xml +++ b/settings.xml @@ -25,6 +25,10 @@ <type><![CDATA[bool]]></type> <defaultvalue>0</defaultvalue> </conf> + <conf name="showStock"> + <type><![CDATA[bool]]></type> + <defaultvalue>1</defaultvalue> + </conf> <!-- header --> <conf name="headerStartPage"> @@ -270,6 +274,14 @@ /> </text> </input> + + <input conf="templateCologne.settings.showStock" type="checkbox"> + <text> + <locale group="quiqqer/template-cologne" + var="settings.shop.showStock" + /> + </text> + </input> </settings> <!-- header --> @@ -435,7 +447,7 @@ /> </text> - <option value="flex-start"> + <option value="top"> <locale group="quiqqer/template-cologne" var="settings.header.imagePosition.top" /> @@ -445,7 +457,7 @@ var="settings.header.imagePosition.center" /> </option> - <option value="flex-end"> + <option value="bottom"> <locale group="quiqqer/template-cologne" var="settings.header.imagePosition.bottom" /> diff --git a/src/QUI/TemplateCologne/Utils.php b/src/QUI/TemplateCologne/Utils.php index df625afc851c3e87a569653f440ba666fc6b8db9..04e3cc9369f44008f3ad910408654b160f4b39d8 100644 --- a/src/QUI/TemplateCologne/Utils.php +++ b/src/QUI/TemplateCologne/Utils.php @@ -8,6 +8,7 @@ use QUI; use QUI\ERP\Shipping\Shipping; +use QUI\ERP\StockManagement\StockManager; /** * Class Utils @@ -414,12 +415,22 @@ private static function getPredefinedFooter($Project) */ public static function getShippingTimeFrontendView(int $productId) { + try { + $Product = QUI\ERP\Products\Handler\Products::getProduct($productId); + } catch (\Exception $Exception) { + QUI\System\Log::writeException($Exception); + return false; + } + + if (QUI::getPackageManager()->isInstalled('quiqqer/stock-management')) { + return StockManager::getShippingTimeFrontendViewByProduct($Product); + } + if (!QUI::getPackageManager()->isInstalled('quiqqer/shipping')) { return false; } try { - $Product = QUI\ERP\Products\Handler\Products::getProduct($productId); $ShippingField = $Product->getField(Shipping::PRODUCT_FIELD_SHIPPING_TIME); } catch (\Exception $Exception) { QUI\System\Log::writeException($Exception); @@ -428,4 +439,45 @@ public static function getShippingTimeFrontendView(int $productId) return $ShippingField->getFrontendView(); } + + /** + * Get FrontendView of DeliveryTime field + * + * requires quiqqer/stock-management to be installed + * + * @param int $productId + * @return false|QUI\ERP\Products\Field\View + */ + public static function getStockFrontendView(int $productId) + { + try { + $Project = QUI::getRewrite()->getProject(); + $showStock = $Project->getConfig('templateCologne.settings.showStock'); + + if (empty($showStock)) { + return false; + } + } catch (\Exception $Exception) { + QUI\System\Log::writeException($Exception); + return false; + } + + if (!QUI::getPackageManager()->isInstalled('quiqqer/stock-management')) { + return false; + } + + try { + $Product = QUI\ERP\Products\Handler\Products::getProduct($productId); + $StockField = $Product->getField(StockManager::PRODUCT_FIELD_STOCK); + } catch (\Exception $Exception) { + QUI\System\Log::writeException($Exception); + return false; + } + + /** @var QUI\ERP\StockManagement\Products\Fields\StockView $StockView */ + $StockView = $StockField->getFrontendView(); + $StockView->setProduct($Product); + + return $StockView; + } } diff --git a/template/menu/menuSuffix.html b/template/menu/menuSuffix.html index df1e8e78f6a6a9450c8f3d4167dfe506b3cbf693..76e3bc477555c52c2ff012ce9b0edc4dc028c9cb 100644 --- a/template/menu/menuSuffix.html +++ b/template/menu/menuSuffix.html @@ -9,7 +9,7 @@ {if $createBasketButton} {if $basketStyle == 'compact'} <button disabled class="quiqqer-order-basketButton button--callToAction tpl-btn basket-style-{$basketStyle}" - data-quiid="jyr6toys" style="float: right;"><span class="quiqqer-order-basketButton-icon-custom"><span + 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> {else}