Skip to content
Code-Schnipsel Gruppen Projekte
Commit 53d9f595 erstellt von Michael Danielczok's avatar Michael Danielczok
Dateien durchsuchen

Merge branch 'dev' of dev.quiqqer.com:quiqqer/template-cologne into dev

Übergeordnete a83ecf57 5c7b907e
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -10,7 +10,7 @@
}
/**************************************/
/* Product children slider (vertical) */
/* Product children slider (carousel) */
/**************************************/
.quiqqer-products-control-product-childrenslider-entry-image {
height: 40% !important;
......
......@@ -836,14 +836,6 @@
padding: 0 0 20px;
}
.product-data-price .qui-products-price-display-value {
color: inherit;
float: none;
font-size: 3rem;
font-weight: normal;
line-height: normal;
}
.product-data-price .qui-products-price-display-vat {
text-align: left;
}
......
......@@ -1494,13 +1494,13 @@ a.toTop:before {
/** Product Children Slider (horizontal)
===================================== */
.quiqqer-bricks-children-slider-container-wrapper .quiqqer-bricks-children-slider-container,
/*.quiqqer-bricks-children-slider-container-wrapper .quiqqer-bricks-children-slider-container,
.quiqqer-bricks-children-slider-container-inner {
height: calc(100% + 22px);
}
ul.quiqqer-bricks-children-slider-container-slide {
/*padding: 10px 0 !important;*/
!*padding: 10px 0 !important;*!
}
.quiqqer-bricks-children-slider-container-slide .quiqqer-products-control-product-childrenslider-entry {
......@@ -1520,10 +1520,10 @@ ul.quiqqer-bricks-children-slider-container-slide {
.quiqqer-bricks-children-slider-child:last-child .quiqqer-products-control-product-childrenslider-entry {
margin-right: 0;
}
}*/
/* nav arrows */
.quiqqer-bricks-children-slider-mobile .quiqqer-bricks-children-slider-container-wrapper .quiqqer-bricks-children-slider-prev,
/*.quiqqer-bricks-children-slider-mobile .quiqqer-bricks-children-slider-container-wrapper .quiqqer-bricks-children-slider-prev,
.quiqqer-bricks-children-slider-mobile .quiqqer-bricks-children-slider-container-wrapper .quiqqer-bricks-children-slider-next {
align-items: center;
border-color: rgba(51, 51, 51, 0.2);
......@@ -1549,7 +1549,7 @@ ul.quiqqer-bricks-children-slider-container-slide {
.brick-full-width .quiqqer-bricks-children-slider-child:last-child .quiqqer-products-control-product-childrenslider-entry:first-child {
margin-right: 20px;
}
}*/
/************************/
/* lang currency switch */
......
......@@ -263,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>
......
......@@ -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">
......
......@@ -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 -->
......
......@@ -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;
}
}
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren