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
Commits auf Quelle (9)
include:
- project: 'quiqqer/stabilization/semantic-release'
file: '/ci-templates/.gitlab-ci.yml'
Dieser Diff ist reduziert.
......@@ -343,11 +343,7 @@ input.quiqqer-coupons-couponcodeinput-input:active {
display: block;
width: 100%;
}
.quiqqer-order-ordering-buttons-backToShop {
display: none;
}
.quiqqer-order-ordering-buttons-next,
.quiqqer-order-ordering-buttons a {
width: 100%;
......
......@@ -18,7 +18,7 @@
"require": {
"php": ">=5.3",
"quiqqer\/quiqqer": "1.*|dev-master|dev-dev",
"quiqqer\/erp": "1.*|dev-master|dev-dev",
"quiqqer\/erp": "^1|^2|^3|dev-master|dev-dev",
"quiqqer\/products": "^1.3.1|dev-master|dev-dev",
"quiqqer\/order": "^1.6|dev-master|dev-dev",
"quiqqer\/product-bricks": "1.*|dev-master|dev-dev",
......
......@@ -12,6 +12,7 @@
*/
$templateSettings = QUI\TemplateCologne\Utils::getConfig([
'Project' => $Project,
'Template' => $Template,
'Site' => $Site
]);
......@@ -19,9 +20,9 @@
* Menu
*/
$menuParams = [
'showStart' => false,
'showStart' => false,
'data-show-button-on-desktop' => 1,
'Project' => $Site->getProject()
'Project' => $Site->getProject()
];
if (isset($templateSettings['homeLink']) && $templateSettings['homeLink']) {
......@@ -32,10 +33,13 @@
$menuParams['startText'] = $templateSettings['homeLinkText'];
}
if ($Project->getConfig('templateCologne.settings.enableIndependentMenu') && $Project->getConfig('templateCologne.settings.menuId')) {
$menuParams['menuId'] = $Project->getConfig('templateCologne.settings.menuId');
$enableIndependentMenu = $Project->getConfig('templateCologne.settings.enableIndependentMenu');
$independentMenuId = $Project->getConfig('templateCologne.settings.menuId');
if ($enableIndependentMenu && $independentMenuId) {
$menuParams['menuId'] = $enableIndependentMenu;
$menuParams['showFirstLevelIcons'] = $Project->getConfig('templateCologne.settings.showFirstLevelIcons');
$menuParams['showStart'] = false;
$menuParams['showStart'] = false;
}
// Site own / independent menu
......@@ -55,20 +59,22 @@
}
$createBasketButton = true;
$simpleSiteTypes = [
'quiqqer/order:types/orderingProcess',
'quiqqer/order:types/shoppingCart',
'quiqqer/order-simple-checkout:types/simpleCheckout',
];
if ($Site->getAttribute('type') == 'quiqqer/order:types/orderingProcess' ||
$Site->getAttribute('type') == 'quiqqer/order:types/shoppingCart' ||
$Site->getAttribute('type') == 'quiqqer/order-simple-checkout:types/simpleCheckout') {
if (in_array($Site->getAttribute('type'), $simpleSiteTypes)) {
$createBasketButton = false;
$Template->setAttribute('content-header', false);
}
$InitialBasketPrice = new QUI\ERP\Money\Price(0, $Currency);
$Logo = $Project->getMedia()->getLogoImage();
$Logo = $Project->getMedia()->getLogoImage();
$logoHeight = $templateSettings['logoHeight'];
$logoWidth = false;
$logoWidth = false;
try {
if ($Logo) {
......@@ -78,9 +84,9 @@
QUI\System\Log::addNotice($Exception->getMessage());
}
$templateSettings['Logo'] = $Logo;
$templateSettings['logoHeight'] = $logoHeight;
$templateSettings['logoWidth'] = $logoWidth;
$templateSettings['Logo'] = $Logo;
$templateSettings['logoHeight'] = $logoHeight;
$templateSettings['logoWidth'] = $logoWidth;
$templateSettings['initialBasketPrice'] = $InitialBasketPrice->getDisplayPrice();
$templateSettings['createBasketButton'] = $createBasketButton;
......@@ -103,27 +109,24 @@
* Flags
*/
$Flags = new QUI\Bricks\Controls\LanguageSwitches\Flags([
'Site' => $Site,
'Site' => $Site,
'showFlags' => true,
'showText' => true,
'all' => true
'showText' => true,
'all' => true
]);
/**
* Langguage and currency swtich
*/
//$LangCurrencySwitch = new \QUI\TemplateCologne\Controls\LangCurrencySwitch();
$LangCurrencySwitch = null;
/**
* Sign up / registration page
*/
$registerSiteUrl = false;
$types = [
$registerSiteTypes = [
'quiqqer/frontend-users:types/registrationSignUp',
'quiqqer/frontend-users:types/registration',
];
......@@ -132,7 +135,7 @@
'where' => [
'type' => [
'type' => 'IN',
'value' => $types
'value' => $registerSiteTypes
]
],
'limit' => 1
......@@ -144,18 +147,18 @@
}
// array to assign
$templateSettings['BricksManager'] = QUI\Bricks\Manager::init();
$templateSettings['Project'] = $Project;
$templateSettings['Menu'] = $Menu;
$templateSettings['Avatar'] = $Avatar;
$templateSettings['productPage'] = $productPage;
$templateSettings['Flags'] = $Flags;
$templateSettings['BricksManager'] = QUI\Bricks\Manager::init();
$templateSettings['Project'] = $Project;
$templateSettings['Menu'] = $Menu;
$templateSettings['Avatar'] = $Avatar;
$templateSettings['productPage'] = $productPage;
$templateSettings['Flags'] = $Flags;
$templateSettings['LangCurrencySwitch'] = $LangCurrencySwitch;
$templateSettings['countLanguages'] = \count($Project->getLanguages());
$templateSettings['Search'] = new QUI\ERP\Products\Search\Controls\Suggest([
$templateSettings['countLanguages'] = \count($Project->getLanguages());
$templateSettings['Search'] = new QUI\ERP\Products\Search\Controls\Suggest([
'globalsearch' => true
]);
$templateSettings['registerSiteUrl'] = $registerSiteUrl;
$templateSettings['registerSiteUrl'] = $registerSiteUrl;
$Template->setAttributes($templateSettings);
......
......@@ -21,11 +21,11 @@ class CurrencySwitch extends QUI\Control
public function __construct($attributes = [])
{
$this->setAttributes([
'class' => 'quiqqer-currency-switch',
'class' => 'quiqqer-currency-switch',
'userRelatedCurrency' => 1, // 1 / 0 -> is user allowed to change currency?
]);
$this->addCSSFile(dirname(__FILE__).'/CurrencySwitch.css');
$this->addCSSFile(dirname(__FILE__) . '/CurrencySwitch.css');
parent::__construct($attributes);
}
......@@ -51,7 +51,7 @@ public function getBody()
if ($this->isCurrencySwitchAllowed()) {
try {
$Package = QUI::getPackage('quiqqer/erp');
$Config = $Package->getConfig();
$Config = $Package->getConfig();
if ($Config->getValue('general', 'userRelatedCurrency')) {
$this->setJavaScriptControl('package/quiqqer/currency/bin/controls/Switch');
......@@ -68,11 +68,11 @@ public function getBody()
}
$Engine->assign([
'this' => $this,
'this' => $this,
'DefaultCurrency' => $Currency,
]);
return $Engine->fetch(dirname(__FILE__).'/CurrencySwitch.html');
return $Engine->fetch(dirname(__FILE__) . '/CurrencySwitch.html');
}
/**
......
......@@ -27,16 +27,16 @@ class Categories extends QUI\Control
public function __construct($attributes = [])
{
$this->setAttributes([
'class' => 'quiqqer-categories-menu',
'startId' => 1, // site id or site link where menu starts by. 1 is start page (first project page)
'template' => \dirname(__FILE__).'/Categories.html', // nav wrapper
'menuFile' => \dirname(__FILE__).'/Categories.Menu.html', // contains children (sites),
'jsControl' => 'package/quiqqer/template-cologne/bin/javascript/controls/Menu/Categories',
'showDescFor' => 'all', // Show category description: all / firstLevel / none
'class' => 'quiqqer-categories-menu',
'startId' => 1, // site id or site link where menu starts by. 1 is start page (first project page)
'template' => \dirname(__FILE__) . '/Categories.html', // nav wrapper
'menuFile' => \dirname(__FILE__) . '/Categories.Menu.html', // contains children (sites),
'jsControl' => 'package/quiqqer/template-cologne/bin/javascript/controls/Menu/Categories',
'showDescFor' => 'all', // Show category description: all / firstLevel / none
'showBasketButton' => false
]);
$this->addCSSFile(\dirname(__FILE__).'/Categories.css');
$this->addCSSFile(\dirname(__FILE__) . '/Categories.css');
parent::__construct($attributes);
}
......@@ -47,7 +47,7 @@ public function __construct($attributes = [])
*/
public function getBody()
{
$Engine = QUI::getTemplateManager()->getEngine();
$Engine = QUI::getTemplateManager()->getEngine();
$Project = $this->getProject();
......@@ -66,10 +66,10 @@ public function getBody()
return '';
}
$cache = EventHandler::menuCacheName().'/megaMenu/';
$cache = EventHandler::menuCacheName() . '/megaMenu/';
$cache .= \md5(
$this->getSite()->getCachePath().
$this->getSite()->getCachePath() .
\serialize($this->getAttributes())
);
......@@ -85,12 +85,12 @@ public function getBody()
}
$Engine->assign([
'menuFile' => $this->getAttribute('menuFile'),
'this' => $this,
'showDescFor' => $this->getAttribute('showDescFor'),
'menuFile' => $this->getAttribute('menuFile'),
'this' => $this,
'showDescFor' => $this->getAttribute('showDescFor'),
'showBasketButton' => $showBasketButton,
'Site' => $Site,
'Project' => $Project
'Site' => $Site,
'Project' => $Project
]);
$result = $Engine->fetch($this->getAttribute('template'));
......
......@@ -26,13 +26,13 @@ class Payments extends QUI\Control
public function __construct($attributes = [])
{
$this->setAttributes([
'class' => 'quiqqer-payments-control',
'showInactive' => false,
'template' => 'list',
'class' => 'quiqqer-payments-control',
'showInactive' => false,
'template' => 'list',
// Custom children template (path to html file); overwrites "template".
'customTemplate' => false,
// Custom children template css (path to css file); overwrites "template".
'customCss' => false,
'customCss' => false,
]);
parent::__construct($attributes);
......@@ -51,7 +51,7 @@ public function getBody()
return '';
}
$Engine = QUI::getTemplateManager()->getEngine();
$Engine = QUI::getTemplateManager()->getEngine();
$Payments = \QUI\ERP\Accounting\Payments\Payments::getInstance();
$payments = $Payments->getpayments();
......@@ -62,17 +62,16 @@ public function getBody()
}
$Engine->assign([
'payments' => $payments,
'payments' => $payments,
'showInactive' => $this->getAttribute('showInactive')
]);
// load custom template (if set)
if ($this->getAttribute('customTemplate')
&& \file_exists($this->getAttribute('customTemplate'))
) {
if ($this->getAttribute('customCss')
&& \file_exists($this->getAttribute('customCss'))
) {
$customTemplate = $this->getAttribute('customTemplate');
$customCss = $this->getAttribute('customCss');
if ($customTemplate && \file_exists($customTemplate)) {
if ($customCss && \file_exists($customCss)) {
$this->addCSSFile($this->getAttribute('customCss'));
}
......@@ -83,12 +82,12 @@ public function getBody()
switch ($this->getAttribute('template')) {
case 'list':
$template = dirname(__FILE__) . '/Payments.List.html';
$css = dirname(__FILE__) . '/Payments.List.css';
$css = dirname(__FILE__) . '/Payments.List.css';
break;
case 'grid':
default:
$template = dirname(__FILE__) . '/Payments.Grid.html';
$css = dirname(__FILE__) . '/Payments.Grid.css';
$css = dirname(__FILE__) . '/Payments.Grid.css';
}
$this->addCSSFile($css);
......
......@@ -8,6 +8,7 @@
use QUI;
use QUI\ERP\Products\Handler\Fields;
use function is_a;
use function usort;
......@@ -43,7 +44,7 @@ public function getBody()
return '';
}
$Engine = QUI::getTemplateManager()->getEngine();
$Engine = QUI::getTemplateManager()->getEngine();
$Product = $this->getAttribute('Product');
$Gallery = new QUI\Gallery\Controls\Slider();
......@@ -52,7 +53,7 @@ public function getBody()
}
$typeVariantParent = is_a($Product->getType(), QUI\ERP\Products\Product\Types\VariantParent::class, true);
$typeVariantChild = is_a($Product->getType(), QUI\ERP\Products\Product\Types\VariantChild::class, true);
$typeVariantChild = is_a($Product->getType(), QUI\ERP\Products\Product\Types\VariantChild::class, true);
// gallery
$PlaceholderImage = $this->getProject()->getMedia()->getPlaceholderImage();
......@@ -100,7 +101,7 @@ public function getBody()
'Gallery' => $Gallery,
]);
return $Engine->fetch(dirname(__FILE__).'/ProductGallery.html');
return $Engine->fetch(dirname(__FILE__) . '/ProductGallery.html');
}
/**
......@@ -109,6 +110,7 @@ public function getBody()
* By @peat
*
* @param QUI\ERP\Products\Product\Product $Product
*
* @return QUI\Projects\Media\Image[]
*/
protected function getVariantImages(QUI\ERP\Products\Product\Product $Product): array
......@@ -116,8 +118,8 @@ protected function getVariantImages(QUI\ERP\Products\Product\Product $Product):
$images = $Product->getImages();
try {
$MainImage = $Product->getImage();
$mainImageId = $MainImage->getId();
$MainImage = $Product->getImage();
$mainImageId = $MainImage->getId();
$hasMainImage = false;
foreach ($images as $Image) {
......
......@@ -24,7 +24,7 @@ public function __construct($attributes = [])
'User' => null
]);
$this->addCSSFile(dirname(__FILE__).'/SimpleUserInfo.css');
$this->addCSSFile(dirname(__FILE__) . '/SimpleUserInfo.css');
parent::__construct($attributes);
}
......@@ -32,14 +32,13 @@ public function __construct($attributes = [])
/**
* (non-PHPdoc)
*
* @see \QUI\Control::create()
*
* @throws QUI\Exception
* @see \QUI\Control::create()
*/
public function getBody()
{
$Engine = QUI::getTemplateManager()->getEngine();
$User = $this->getUser();
$User = $this->getUser();
$avatarUrl = URL_OPT_DIR . 'quiqqer/template-cologne/bin/images/avatar-placeholder.svg';
......@@ -48,9 +47,9 @@ public function getBody()
}
$Engine->assign([
'name' => $User->getName(),
'name' => $User->getName(),
'registrationDay' => $User->getAttribute('regdate'),
'avatarUrl' => $avatarUrl,
'avatarUrl' => $avatarUrl,
'ordersNumber' => $this->getOrdersNumber($User)
]);
......@@ -100,6 +99,7 @@ public function getSite()
* Get number of orders
*
* @param $User QUI\Interfaces\Users\User
*
* @return int
*/
public function getOrdersNumber($User)
......
<?php
/**
* This file contains \QUI\TemplateCologne\EventHandler
*/
......@@ -48,8 +49,10 @@ public static function onSiteSave()
*
* @throws QUI\Exception
*/
public static function onQuiqqerProductsProductButtonsEnd(\Quiqqer\Engine\Collector $Collector, \QUI\ERP\Products\Product\ViewFrontend $Product)
{
public static function onQuiqqerProductsProductButtonsEnd(
\Quiqqer\Engine\Collector $Collector,
\QUI\ERP\Products\Product\ViewFrontend $Product
) {
// setting
$Project = QUI::getRewrite()->getProject();
......@@ -57,7 +60,7 @@ public static function onQuiqqerProductsProductButtonsEnd(\Quiqqer\Engine\Collec
return;
}
$text = QUI::getLocale()->get('quiqqer/template-cologne', 'control.product.buy.know.button');
$text = QUI::getLocale()->get('quiqqer/template-cologne', 'control.product.buy.know.button');
$disabled = 0;
if (!$Product->getMaximumQuantity()) {
......@@ -65,11 +68,11 @@ public static function onQuiqqerProductsProductButtonsEnd(\Quiqqer\Engine\Collec
}
$Collector->append(
'<div class="product-data-actionButtons-buyNow" data-qui-options-disabled="'.$disabled.'">
'<div class="product-data-actionButtons-buyNow" data-qui-options-disabled="' . $disabled . '">
<div class="product-data-actionButtons-buyNow-placeholder"></div>
<button disabled data-qui="package/quiqqer/template-cologne/bin/javascript/controls/BuyNowButton"
data-qui-options-disabled="'.$disabled.'">
<span class="add-to-basket-text">'.$text.'</span>
data-qui-options-disabled="' . $disabled . '">
<span class="add-to-basket-text">' . $text . '</span>
</button>
</div>'
);
......
Dieser Diff ist reduziert.
......@@ -15,10 +15,10 @@
urlList=$urlList
featuredProducts=$featuredProducts
}
{/if}
{* footer copyright *}
{fetch template="template/footer/copyright.html"}
{* footer copyright *}
{fetch template="template/footer/copyright.html"}
{/if}
</footer>
</section>
......