Skip to content
Code-Schnipsel Gruppen Projekte
Bestätigt Commit e539a5dc erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

refactor: base work

Übergeordneter 02b71c53
No related branches found
No related tags found
2 Merge Requests!2Next,!1Dev
define('package/quiqqer/order-simple-checkout/bin/frontend/controls/SimpleCheckout', [], function() {
'use strict';
return new Class({
Extends: QUIControl,
Type: '',
initialize: function(options) {
this.parent(options);
this.addEvents({
onImport: this.$onImport
});
},
$onImport: function() {
}
});
});
<?xml version="1.0" encoding="UTF-8"?>
<locales>
<groups name="quiqqer/order-simple-checkout" datatype="php,js">
<locale name="package.title">
<de><![CDATA[QUIQQER - Einfacher Bestellcheckout]]></de>
<en><![CDATA[QUIQQER - Simple order checkout]]></en>
</locale>
<locale name="package.description">
<de><![CDATA[ ]]></de>
<en><![CDATA[ ]]></en>
</locale>
</groups>
</locales>
\ No newline at end of file
<quiqqer>
<package>
<title>
<locale group="quiqqer/order-simple-checkout" var="package.title"/>
</title>
<description>
<locale group="quiqqer/order-simple-checkout" var="package.title"/>
</description>
<provider>
</provider>
</package>
</quiqqer>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<site>
<types>
<type type="types/simpleCheckout" icon="fa fa-shopping-cart ">
<locale group="quiqqer/order-simple-checkout" var="admin.types.simpleCheckout"/>
<desc>
<locale group="quiqqer/order-simple-checkout" var="admin.types.simpleCheckout.desc"/>
</desc>
</type>
</types>
</site>
<?php
namespace QUI\ERP\Order\SimpleCheckout;
use QUI;
use function dirname;
use function file_exists;
class Checkout extends QUI\Control
{
public function __construct($attributes = [])
{
$this->setAttributes([
'template' => false,
'data-qui' => 'package/quiqqer/order-simple-checkout/bin/frontend/controls/SimpleCheckout'
]);
parent::__construct($attributes);
}
public function getBody(): string
{
$Engine = QUI::getTemplateManager()->getEngine();
$template = dirname(__FILE__) . '/Checkout.html';
if ($this->getAttribute('template') && file_exists($this->getAttribute('template'))) {
$template = $this->getAttribute('template');
}
return $Engine->assign($template);
}
}
{if $Template->getAttribute('content-header')}
<section class="content-header">
<header>
<h1>{$Site->getAttribute('title')}</h1>
</header>
{if $Site->getAttribute('short')}
<div class="content-short">
{$Site->getAttribute('short')}
</div>
{/if}
</section>
{/if}
{if $Template->getAttribute('content-body') && $Site->getAttribute('content')}
<section class="content-body">
{$Site->getAttribute('content')}
</section>
{/if}
{if isset($Exception)}
<div class="message-error">
{$Exception->getMessage()}
</div>
{/if}
{if isset($OrderProcess)}
<section class="content-template">
{$OrderProcess->create()}
</section>
{/if}
\ No newline at end of file
<?php
$Site->setAttribute('nocache', true);
try {
$Checkout = new QUI\ERP\Order\SimpleCheckout\Checkout([
]);
$Engine->assign([
'Checkout' => $Checkout
]);
} catch (QUI\DataBase\Exception $Exception) {
$ExceptionReplacement = new QUI\Exception(['quiqqer/quiqqer', 'exception.error']);
QUI\System\Log::writeException($Exception);
$Engine->assign([
'Exception' => $ExceptionReplacement
]);
} catch (Exception $Exception) {
$Engine->assign([
'Exception' => $Exception
]);
}
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren