Skip to content
Code-Schnipsel Gruppen Projekte

Revisionen vergleichen

Änderungen werden so angezeigt, als ob die Quellrevision mit der Zielrevision zusammengeführt würde. Erfahre mehr über den Vergleich von Revisionen.

Quelle

Zielprojekt auswählen
No results found

Ziel

Zielprojekt auswählen
  • quiqqer/template-cologne
1 Ergebnis
Änderungen anzeigen
werden angezeigt mit 178 Ergänzungen und 250 Löschungen
parameters: parameters:
ignoreErrors: ignoreErrors:
- \ No newline at end of file
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
{if !$Category} {if !$Category}
<p> <div class="quiqqer-frontendUsers-controls-profile__noCategoriesInfo">
{locale group="quiqqer/frontend-users" var="profile.no_categories_available"} <p>
</p> {locale group="quiqqer/frontend-users" var="profile.no_categories_available"}
</p>
</div>
{else} {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-fupc-userinfo">
<div class="quiqqer-frontendUsers-controls-profile-categories"> {control control="QUI\TemplateCologne\Controls\SimpleUserInfo" assign=SimpleUserInfo}
{$SimpleUserInfo->create()}
<div class="quiqqer-fupc-userinfo"> </div>
{control control="QUI\TemplateCologne\Controls\SimpleUserInfo" assign=SimpleUserInfo}
{$SimpleUserInfo->create()}
</div>
{foreach $categories as $category} {foreach $categories as $category}
<div class="quiqqer-fupc-category quiqqer-fupc-category--open" <div class="quiqqer-fupc-category"
data-category="{$category.name}" data-category="{$category.name}"
> data-name="nav-category"
<div class="quiqqer-fupc-category-header"> data-open="1"
{$category.title} >
</div> <div class="quiqqer-fupc-category-header" data-name="header">
<div class="quiqqer-fu-profile-categories-category-items"> <span class="quiqqer-fupc-category-header__text">{$category.title}</span>
{foreach $category.items as $setting} <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=""} {* mobile categories *}
{if $currentCategory == $category.name && $currentSetting == $setting.name} <form action="" method="post" class="quiqqer-frontendUsers-controls-profile-categories-mobile">
{assign var=active value=" quiqqer-fupc-category-items-item--active"} <label class="quiqqer-frontendUsers-controls-profile-categories-mobile-label">
{/if} <select name="profile-categories-mobile">
<a href="{$Site->getUrlRewritten()}/{$category.name}/{$setting.name}" {foreach $categories as $category}
class="quiqqer-fupc-category-items-item{$active}" <optgroup label="{$category.title}">
data-setting="{$setting.name}" {foreach $category.items as $setting}
> {assign var=active value=""}
{if $setting.icon} {if $currentCategory == $category.name && $currentSetting == $setting.name}
<span class="quiqqer-fupc-category-items-item-icon {$setting.icon}"></span> {assign var=active value="selected"}
{/if} {/if}
<span>{$setting.title}</span> <option value="{$category.name}:{$setting.name}" {$active}>
</a> {$setting.title}
{/foreach} </option>
</div> {/foreach}
</optgroup>
{/foreach}
</select>
</label>
</form>
</div> </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" <div class="quiqqer-frontendUsers-controls-profile__content">
method="post" <form class="quiqqer-frontendUsers-controls-profile-categoryContent"
action="" data-name="form"
data-category="{$currentCategory}" method="post"
data-setting="{$currentSetting}" action=""
> data-category="{$currentCategory}"
<div class="quiqqer-frontendUsers-controls-profile-categoryContentAnimation"> data-setting="{$currentSetting}"
{$Category->create()} >
<input type="hidden" name="profile-save" value="1"> <div class="quiqqer-frontendUsers-controls-profile-categoryContentAnimation" data-name="content-animated">
{$Category->create()}
<input type="hidden" name="profile-save" value="1">
</div>
</form>
</div> </div>
</form>
{/if} {/if}
\ No newline at end of file
...@@ -231,11 +231,23 @@ ...@@ -231,11 +231,23 @@
{elseif $this->isGuest() && $this->isLoading()} {elseif $this->isGuest() && $this->isLoading()}
<div class="quiqqer-order-basket-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> </div>
{else} {else}
<div class="quiqqer-order-basket-isEmpty"> <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> </div>
{/if} {/if}
......
<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>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
{/if} {/if}
{if $Project->getConfig('templateCologne.settings.categoryShowStock')} {if $Project->getConfig('templateCologne.settings.categoryShowStock')}
{assign var=ShippingTimeFrontendView value=\QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} {assign var=ShippingTimeFrontendView value=QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())}
{if $ShippingTimeFrontendView} {if $ShippingTimeFrontendView}
<div class="cologne-productList-product-details-content-shippingTime"> <div class="cologne-productList-product-details-content-shippingTime">
{$ShippingTimeFrontendView->create()} {$ShippingTimeFrontendView->create()}
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</div> </div>
{if $Project->getConfig('templateCologne.settings.categoryShowStock')} {if $Project->getConfig('templateCologne.settings.categoryShowStock')}
{assign var=ShippingTimeFrontendView value=\QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} {assign var=ShippingTimeFrontendView value=QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())}
{if $ShippingTimeFrontendView} {if $ShippingTimeFrontendView}
<div class="cologne-products-productGallery-products-product-price-shippingTime"> <div class="cologne-products-productGallery-products-product-price-shippingTime">
{$ShippingTimeFrontendView->create()} {$ShippingTimeFrontendView->create()}
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
{if $Project->getConfig('templateCologne.settings.categoryShowStock')} {if $Project->getConfig('templateCologne.settings.categoryShowStock')}
{assign var=ShippingTimeFrontendView value=\QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} {assign var=ShippingTimeFrontendView value=QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())}
{if $ShippingTimeFrontendView} {if $ShippingTimeFrontendView}
<div class="quiqqer-productList-product-list-text-shippingTime"> <div class="quiqqer-productList-product-list-text-shippingTime">
{$ShippingTimeFrontendView->create()} {$ShippingTimeFrontendView->create()}
......
...@@ -69,12 +69,12 @@ ...@@ -69,12 +69,12 @@
{/foreach} {/foreach}
{assign var=ShippingTimeFrontendView {assign var=ShippingTimeFrontendView
value=\QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} value=QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())}
{if $ShippingTimeFrontendView} {if $ShippingTimeFrontendView}
{$ShippingTimeFrontendView->create()} {$ShippingTimeFrontendView->create()}
{/if} {/if}
{assign var=StockFrontendView value=\QUI\TemplateCologne\Utils::getStockFrontendView($Product->getId())} {assign var=StockFrontendView value=QUI\TemplateCologne\Utils::getStockFrontendView($Product->getId())}
{if $StockFrontendView} {if $StockFrontendView}
{$StockFrontendView->create()} {$StockFrontendView->create()}
{/if} {/if}
......
...@@ -52,12 +52,12 @@ ...@@ -52,12 +52,12 @@
{/foreach} {/foreach}
{assign var=ShippingTimeFrontendView {assign var=ShippingTimeFrontendView
value=\QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())} value=QUI\TemplateCologne\Utils::getShippingTimeFrontendView($Product->getId())}
{if $ShippingTimeFrontendView} {if $ShippingTimeFrontendView}
{$ShippingTimeFrontendView->create()} {$ShippingTimeFrontendView->create()}
{/if} {/if}
{assign var=StockFrontendView value=\QUI\TemplateCologne\Utils::getStockFrontendView($Product->getId())} {assign var=StockFrontendView value=QUI\TemplateCologne\Utils::getStockFrontendView($Product->getId())}
{if $StockFrontendView} {if $StockFrontendView}
{$StockFrontendView->create()} {$StockFrontendView->create()}
{/if} {/if}
......
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
<type><![CDATA[bool]]></type> <type><![CDATA[bool]]></type>
<defaultvalue>1</defaultvalue> <defaultvalue>1</defaultvalue>
</conf> </conf>
<conf name="basketOpen"> <conf name="basketAction">
<type><![CDATA[integer]]></type> <type><![CDATA[string]]></type>
<defaultvalue>2</defaultvalue> <defaultvalue>openSmallBasket</defaultvalue>
</conf> </conf>
<conf name="hideEmptyFields"> <conf name="hideEmptyFields">
<type><![CDATA[bool]]></type> <type><![CDATA[bool]]></type>
...@@ -454,27 +454,35 @@ ...@@ -454,27 +454,35 @@
</description> </description>
</input> </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> <text>
<locale group="quiqqer/template-cologne" <locale group="quiqqer/template-cologne"
var="settings.shop.basketOpen" var="settings.shop.basketAction"
/> />
</text> </text>
<description>
<locale group="quiqqer/template-cologne"
var="settings.shop.basketAction.desc"
/>
</description>
<option value="0"> <option value="openSmallBasket">
<locale group="quiqqer/template-cologne" <locale group="quiqqer/template-cologne"
var="settings.shop.basketOpen.nothing" var="settings.shop.basketAction.openSmallBasket"
/> />
</option> </option>
<option value="1"> <option value="openOrderProcessUrl">
<locale group="quiqqer/template-cologne" <locale group="quiqqer/template-cologne"
var="settings.shop.basketOpen.window" var="settings.shop.basketAction.openOrderProcessUrl"
/> />
</option> </option>
<option value="2"> <option value="openOrderProcess">
<locale group="quiqqer/template-cologne" <locale group="quiqqer/template-cologne"
var="settings.shop.basketOpen.page" var="settings.shop.basketAction.openOrderProcess"
/> />
</option> </option>
</select> </select>
......
...@@ -72,10 +72,14 @@ public function getBody(): string ...@@ -72,10 +72,14 @@ public function getBody(): string
} }
$cache = EventHandler::menuCacheName() . '/megaMenu/'; $cache = EventHandler::menuCacheName() . '/megaMenu/';
$cachePah = '';
if (method_exists($this->getSite(), 'getCachePath')) {
$cachePah = $this->getSite()->getCachePath();
}
$cache .= md5( $cache .= md5(
$this->getSite()->getCachePath() . $cachePah . serialize($this->getAttributes())
serialize($this->getAttributes())
); );
try { try {
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
namespace QUI\TemplateCologne; namespace QUI\TemplateCologne;
use QUI; use QUI;
use Smarty;
use QUI\ERP\Products\Product\ViewFrontend; use QUI\ERP\Products\Product\ViewFrontend;
use QUI\Smarty\Collector; use QUI\Smarty\Collector;
...@@ -71,4 +72,17 @@ public static function onQuiqqerProductsProductButtonsEnd( ...@@ -71,4 +72,17 @@ public static function onQuiqqerProductsProductButtonsEnd(
</div>' </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');
}
} }
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
use QUI\ERP\Shipping\Shipping; use QUI\ERP\Shipping\Shipping;
use QUI\ERP\StockManagement\StockManager; use QUI\ERP\StockManagement\StockManager;
use QUI\Projects\Project; use QUI\Projects\Project;
use QUI\Projects\Site;
use QUI\TemplateCologne\Controls\Payments; use QUI\TemplateCologne\Controls\Payments;
use ReflectionClass;
use function class_exists; use function class_exists;
use function count; use function count;
...@@ -32,7 +32,7 @@ class Utils ...@@ -32,7 +32,7 @@ class Utils
* @throws QUI\Exception * @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) { if (!$User instanceof QUI\Interfaces\Users\User) {
throw new QUI\Exception([ throw new QUI\Exception([
...@@ -73,15 +73,10 @@ public static function getAvatar(mixed $User): QUI\Projects\Media\Image|bool ...@@ -73,15 +73,10 @@ public static function getAvatar(mixed $User): QUI\Projects\Media\Image|bool
* @return array|bool|object|string * @return array|bool|object|string
* @throws QUI\Exception * @throws QUI\Exception
*/ */
public static function getConfig(array $params): object|array|bool|string public static function getConfig(array $params): object | array | bool | string
{ {
/** @var $Site Site */
$Site = $params['Site']; $Site = $params['Site'];
/* @var $Project Project */
$Project = $params['Project']; $Project = $params['Project'];
/* @var $Project QUI\Template */
$Template = $params['Template']; $Template = $params['Template'];
$cacheName = md5($Site->getId() . $Project->getName() . $Project->getLang()); $cacheName = md5($Site->getId() . $Project->getName() . $Project->getLang());
...@@ -237,13 +232,10 @@ public static function getConfig(array $params): object|array|bool|string ...@@ -237,13 +232,10 @@ public static function getConfig(array $params): object|array|bool|string
} }
// basket open // basket open
$basketOpen = 2; $basketAction = $Project->getConfig('templateCologne.settings.basketAction');
switch ($Project->getConfig('templateCologne.settings.basketOpen')) { if (!in_array($basketAction, ['openSmallBasket', 'openOrderProcessUrl', 'openOrderProcess'])) {
case '0': $basketAction = 'openSmallBasket';
case '1':
case '2':
$basketOpen = $Project->getConfig('templateCologne.settings.basketOpen');
} }
$settingsCSS = include 'settings.css.php'; $settingsCSS = include 'settings.css.php';
...@@ -355,7 +347,7 @@ public static function getConfig(array $params): object|array|bool|string ...@@ -355,7 +347,7 @@ public static function getConfig(array $params): object|array|bool|string
$config['siteType'] = $siteType; $config['siteType'] = $siteType;
$config['pageCustomClass'] = $pageCustomClass; $config['pageCustomClass'] = $pageCustomClass;
$config['basketStyle'] = $basketStyle; $config['basketStyle'] = $basketStyle;
$config['basketOpen'] = $basketOpen; $config['basketAction'] = $basketAction;
$config['showCategoryMenu'] = $showCategoryMenu; $config['showCategoryMenu'] = $showCategoryMenu;
$config['homeLink'] = $homeLink; $config['homeLink'] = $homeLink;
$config['homeLinkText'] = $homeLinkText; $config['homeLinkText'] = $homeLinkText;
...@@ -602,7 +594,7 @@ private static function getPredefinedFooter(Project $Project): array ...@@ -602,7 +594,7 @@ private static function getPredefinedFooter(Project $Project): array
* *
* @return false|QUI\ERP\Products\Field\View * @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 { try {
$Product = QUI\ERP\Products\Handler\Products::getProduct($productId); $Product = QUI\ERP\Products\Handler\Products::getProduct($productId);
...@@ -612,7 +604,7 @@ public static function getShippingTimeFrontendView(int $productId) ...@@ -612,7 +604,7 @@ public static function getShippingTimeFrontendView(int $productId)
return false; return false;
} }
if (QUI::getPackageManager()->isInstalled('quiqqer/stock-management')) { if (class_exists('QUI\ERP\StockManagement\StockManager')) {
return StockManager::getShippingTimeFrontendViewByProduct($Product); return StockManager::getShippingTimeFrontendViewByProduct($Product);
} }
...@@ -620,6 +612,16 @@ public static function getShippingTimeFrontendView(int $productId) ...@@ -620,6 +612,16 @@ public static function getShippingTimeFrontendView(int $productId)
return false; return false;
} }
if (!class_exists('QUI\ERP\Shipping\Shipping')) {
return false;
}
$reflection = new ReflectionClass(Shipping::class);
if (!$reflection->hasConstant('PRODUCT_FIELD_SHIPPING_TIME')) {
return false;
}
try { try {
$ShippingField = $Product->getField(Shipping::PRODUCT_FIELD_SHIPPING_TIME); $ShippingField = $Product->getField(Shipping::PRODUCT_FIELD_SHIPPING_TIME);
} catch (\Exception $Exception) { } catch (\Exception $Exception) {
...@@ -659,6 +661,10 @@ public static function getStockFrontendView(int $productId) ...@@ -659,6 +661,10 @@ public static function getStockFrontendView(int $productId)
return false; return false;
} }
if (!class_exists('QUI\ERP\StockManagement\StockManager')) {
return false;
}
try { try {
$Product = QUI\ERP\Products\Handler\Products::getProduct($productId); $Product = QUI\ERP\Products\Handler\Products::getProduct($productId);
$StockField = $Product->getField(StockManager::PRODUCT_FIELD_STOCK); $StockField = $Product->getField(StockManager::PRODUCT_FIELD_STOCK);
...@@ -668,7 +674,6 @@ public static function getStockFrontendView(int $productId) ...@@ -668,7 +674,6 @@ public static function getStockFrontendView(int $productId)
return false; return false;
} }
/** @var QUI\ERP\StockManagement\Products\Fields\StockView $StockView */
$StockView = $StockField->getFrontendView(); $StockView = $StockField->getFrontendView();
if (method_exists($StockView, 'setProduct')) { if (method_exists($StockView, 'setProduct')) {
...@@ -712,7 +717,7 @@ public static function convertBrickCSSClass(array $classes): string ...@@ -712,7 +717,7 @@ public static function convertBrickCSSClass(array $classes): string
* @param string $settingName * @param string $settingName
* @return bool|array|int|string * @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)) { if (empty($settingName)) {
return false; return false;
......
<?php <?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'); $largeSpacing = $Site->getAttribute('templateCologne.largeSpacing');
$headerImagePosition = $Project->getConfig('templateCologne.settings.headerImagePosition'); $headerImagePosition = $Project->getConfig('templateCologne.settings.headerImagePosition');
...@@ -7,7 +15,6 @@ ...@@ -7,7 +15,6 @@
ob_start(); ob_start();
?> ?>
<?php if ($largeSpacing) { ?> <?php if ($largeSpacing) { ?>
/* more spacing */ /* more spacing */
.page-content-header, .page-content-header,
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
<link rel="stylesheet" href="{$Template->getTemplateUrl('bin/css/products.css')}"/> <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/frontend-users.css')}"/>
<link rel="stylesheet" href="{$Template->getTemplateUrl('bin/css/order.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/controls.css')}"/>
<link rel="stylesheet" href="{$Template->getTemplateUrl('bin/css/mini-basket.css')}"/> <link rel="stylesheet" href="{$Template->getTemplateUrl('bin/css/mini-basket.css')}"/>
<link rel="stylesheet" href="{$Template->getTemplateUrl('bin/css/product-bricks.css')}"/> <link rel="stylesheet" href="{$Template->getTemplateUrl('bin/css/product-bricks.css')}"/>
......
...@@ -10,14 +10,18 @@ ...@@ -10,14 +10,18 @@
<button disabled class="quiqqer-order-basketButton button--callToAction tpl-btn basket-style-{$basketStyle}" <button disabled class="quiqqer-order-basketButton button--callToAction tpl-btn basket-style-{$basketStyle}"
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="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} {else}
<button disabled class="quiqqer-order-basketButton button--callToAction tpl-btn basket-style-full" <button disabled class="quiqqer-order-basketButton button--callToAction tpl-btn basket-style-full"
style="float: right;"> style="float: right;">
<span class="quiqqer-order-basketButton-icon-custom"> <span class="quiqqer-order-basketButton-icon-custom">
<span class="fa fa-shopping-basket"></span> <span class="fa fa-shopping-basket"></span>
</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"> <span class="quiqqer-order-basketButton-sum">
{*$InitialBasketPrice->getDisplayPrice()*} {*$InitialBasketPrice->getDisplayPrice()*}
{$initialBasketPrice} {$initialBasketPrice}
......