diff --git a/bin/css/mini-basket.css b/bin/css/mini-basket.css index 84052c5d2bc365873300c1fc7a55f993dd3d14f4..13e655e838ddf88e58561b5bcb89a6734ae3dd9e 100644 --- a/bin/css/mini-basket.css +++ b/bin/css/mini-basket.css @@ -4,18 +4,32 @@ background: #ffffff; border: 1px solid #ddd; box-shadow: 0 7px 22px -5px rgba(48, 60, 72, 0.2); + display: flex; + flex-direction: column; left: auto !important; margin: 0 auto; /* test */ max-height: calc(100vh - 130px); /* header height + top bar height */ - overflow-y: auto; - padding: 15px !important; + padding: 0 !important; width: 350px; } +.quiqqer-order-basket-small-container > .qui-control { + display: flex; + flex-direction: column; + height: 100%; +} + body.header-fixed .quiqqer-order-basket-small-container { max-height: calc(100vh - 80px); /* only header height */ } +.quiqqer-order-basket-small-articles { + height: calc(100vh - 400px); + min-height: 0; + overflow-y: auto; + padding: 15px; +} + .quiqqer-order-basket-small-articles-article { align-items: flex-start; border-bottom: 1px dashed #ddd; @@ -76,8 +90,8 @@ body.header-fixed .quiqqer-order-basket-small-container { /* basket summary */ .quiqqer-order-basket-small-total { - margin-top: 1em; - width: 100%; + margin: 1em 15px 0 15px; + width: calc(100% - 30px); } .quiqqer-order-basket-small-total td { @@ -105,8 +119,9 @@ body.header-fixed .quiqqer-order-basket-small-container { } .quiqqer-order-basket-small-buttons { - margin-top: 15px; + margin: 15px; text-align: right; + width: calc(100% - 30px); } .quiqqer-order-basket-small-buttons .open-shopping-cart { @@ -117,8 +132,8 @@ body.header-fixed .quiqqer-order-basket-small-container { /* payments - paypal */ /*********************/ .quiqqer-order-basket-small-container .quiqqer-payment-paypal-express { - margin-top: 15px; + margin: 0 15px; text-align: right; - width: 100%; + width: calc(100% - 30px); height: auto; } \ No newline at end of file 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 096ae82ced32f872d7ada2a88ea7fee48b7811d2..37b469f32695cbbc8e905d670b461f7a9a7e46b5 100644 --- a/quiqqer/products/src/QUI/ERP/Products/Controls/Products/Product.html +++ b/quiqqer/products/src/QUI/ERP/Products/Controls/Products/Product.html @@ -55,6 +55,11 @@ {$Field->getValue()} </div> {/foreach} + + {assign var=ShippingTimeFrontendView value=\QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} + {if $ShippingTimeFrontendView} + {$ShippingTimeFrontendView->create()} + {/if} </div> <div class="product-data-actionButtons"> diff --git a/src/QUI/TemplateCologne/Utils.php b/src/QUI/TemplateCologne/Utils.php index 78ae70759b9e4b2766a94ad61a6fa4f4ec1e5581..5d4637f2f8c03814fc128e2f56dd639f806a30fd 100644 --- a/src/QUI/TemplateCologne/Utils.php +++ b/src/QUI/TemplateCologne/Utils.php @@ -7,6 +7,7 @@ namespace QUI\TemplateCologne; use QUI; +use QUI\ERP\Shipping\Shipping; /** * Class Utils @@ -402,4 +403,29 @@ private static function getPredefinedFooter($Project) 'paymentsData' => $paymentsData ]; } + + /** + * Get FrontendView of ShippingTime field + * + * requires quiqqer/shipping to be installed + * + * @param int $productId + * @return false|QUI\ERP\Products\Field\View + */ + public static function getShippingTimeFrontendView(int $productId) + { + 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); + return false; + } + + return $ShippingField->getFrontendView(); + } }