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/coupons
1 Ergebnis
Änderungen anzeigen
Commits auf Quelle (18)
# Ignore developer files when exporting
.gitattributes export-ignore
.gitignore export-ignore
.gitlab-ci.yml export-ignore
.phive export-ignore
captainhook.json export-ignore
phpcs.xml.dist export-ignore
phpstan-baseline.neon export-ignore
phpstan.dist.neon export-ignore
phpunit.dist.xml export-ignore
tests export-ignore
# Explicitly set file type and line endings for PHP files, improves git diff output
*.php text eol=lf diff=php
\ No newline at end of file
tools/
phpstan.neon
.phpunit.result.cache
phpunit.xml
\ No newline at end of file
phpunit.xml
tools/
phpstan.neon
.phpunit.result.cache
phpunit.xml
include:
- project: 'quiqqer/stabilization/semantic-release'
file: '/ci-templates/.gitlab-ci.yml'
- component: dev.quiqqer.com/quiqqer/stabilization/ci-cd-components/quiqqer-package-bundle/quiqqer-package-bundle@main
# Remove the entire phpunit-php8.1 block, to allow PHPUnit to run on PHP 8.1 in your pipeline
phpunit-php8.1:
rules:
- when: never
# Remove the entire phpunit-php8.2 block, to allow PHPUnit to run on PHP 8.2 in your pipeline
phpunit-php8.2:
rules:
- when: never
# Remove the entire phpunit-php8.3 block, to allow PHPUnit to run on PHP 8.3 in your pipeline
phpunit-php8.3:
rules:
- when: never
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="^1.10.67" installed="1.10.67" location="./tools/phpstan" copy="false"/>
<phar name="phpstan" version="1.11.8" installed="1.11.8" location="./tools/phpstan" copy="false"/>
<phar name="phpunit" version="^10.5.20" installed="10.5.20" location="./tools/phpunit" copy="false"/>
<phar name="phpcs" version="^3.10.1" installed="3.10.1" location="./tools/phpcs" copy="false"/>
<phar name="phpcbf" version="^3.10.1" installed="3.10.1" location="./tools/phpcbf" copy="false"/>
<phar name="captainhook" version="^5.23.3" installed="5.23.3" location="./tools/captainhook" copy="false"/>
</phive>
# Contributing
This package follows the [QUIQQER contribution guidelines](https://dev.quiqqer.com/quiqqer/stabilization/documentation/-/wikis/home).
\ No newline at end of file
......@@ -29,3 +29,26 @@ div + .quiqqer-coupons-field {
.quiqqer-coupons-remove .fa {
margin-right: 0;
}
/**
* Simple Checkout
*/
.quiqqer-coupons-field-simpleCheckout {
margin-top: 20px;
margin-left: 0 !important;
}
.quiqqer-coupons-field-simpleCheckout .quiqqer-coupons-couponcodeinput {
background: var(--_sectionBgColor);
display: flex;
padding: var(--_sectionPadding);
}
.quiqqer-coupons-field-simpleCheckout .quiqqer-coupons-couponcodeinput label {
flex-grow: 1;
}
.quiqqer-coupons-field-simpleCheckout .quiqqer-coupons-couponcodeinput-input {
width: calc(100% - 1rem);
}
\ No newline at end of file
......@@ -20,25 +20,25 @@ define('package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput', [
'text!package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput.html',
'css!package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput.css'
], function (QUI, QUIControl, QUILoader, Sessions, CouponCodes, QUIAjax, QUILocale, Mustache, template) {
"use strict";
], function(QUI, QUIControl, QUILoader, Sessions, CouponCodes, QUIAjax, QUILocale, Mustache, template) {
'use strict';
var lg = 'quiqqer/coupons';
return new Class({
Extends: QUIControl,
Type : 'package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput',
Type: 'package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput',
Binds: [
'$submit'
],
initialize: function (options) {
initialize: function(options) {
this.parent(options);
this.$Input = null;
this.Loader = new QUILoader();
this.$Input = null;
this.Loader = new QUILoader();
this.$running = false;
this.addEvents({
......@@ -49,23 +49,27 @@ define('package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput', [
/**
* Event: onInject
*/
$onInject: function () {
var self = this;
$onInject: function() {
var self = this;
var lgPrefix = 'controls.frontend.CouponCodeInput.template.';
this.$Elm.addClass('quiqqer-coupons-field');
if (this.$Elm.getParent('[data-name="quiqqer-simple-checkout"]')) {
this.$Elm.addClass('quiqqer-coupons-field-simpleCheckout');
}
this.$Elm.set('html', Mustache.render(template, {
labelInput : QUILocale.get(lg, lgPrefix + 'labelInput'),
labelInput: QUILocale.get(lg, lgPrefix + 'labelInput'),
labelInputPlaceholder: QUILocale.get(lg, lgPrefix + 'labelInputPlaceholder'),
submitBtnText : QUILocale.get(lg, lgPrefix + 'submitBtnText')
submitBtnText: QUILocale.get(lg, lgPrefix + 'submitBtnText')
}));
this.Loader.inject(this.$Elm);
this.$Input = this.$Elm.getElement('input[name="code"]');
this.$Input.addEvent('keyup', function (event) {
this.$Input.addEvent('keyup', function(event) {
if (event.code === 13) {
self.$submit();
}
......@@ -73,7 +77,7 @@ define('package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput', [
this.$Elm.getElement(
'button.quiqqer-coupons-couponcodeinput-btn'
).addEvent('click', function (event) {
).addEvent('click', function(event) {
event.stop();
self.$submit();
});
......@@ -81,23 +85,23 @@ define('package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput', [
if (this.isInOrder()) {
var OrderProcess = this.getOrderProcess();
new Promise(function (resolve) {
new Promise(function(resolve) {
if (!OrderProcess.isLoaded()) {
return OrderProcess.addEvent('onLoad', resolve);
}
resolve();
}).then(function () {
}).then(function() {
if (OrderProcess.getAttribute('basketEditable') === false) {
// remove coupon codes button
new Element('button', {
'class': 'quiqqer-coupons-remove',
'html' : '<span class="fa fa-close"></span>',
title : QUILocale.get(lg, 'remove.coupons.button'),
events : {
click: function (e) {
'html': '<span class="fa fa-close"></span>',
title: QUILocale.get(lg, 'remove.coupons.button'),
events: {
click: function(e) {
e.stop();
self.removeCouponsFromOrder().catch(function (e) {
self.removeCouponsFromOrder().catch(function(e) {
console.error(e);
});
}
......@@ -111,7 +115,7 @@ define('package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput', [
/**
* Submit a CouponCode
*/
$submit: function () {
$submit: function() {
if (this.$running) {
return;
}
......@@ -127,18 +131,56 @@ define('package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput', [
this.$running = true;
this.Loader.show();
// simple order
const SimpleCheckoutNode = this.getElm().getParent('[data-name="quiqqer-simple-checkout"]');
if (SimpleCheckoutNode) {
const SimpleCheckout = QUI.Controls.getById(SimpleCheckoutNode.get('data-quiid'));
let orderHash = window.location.hash.substring(1);
if (!orderHash || orderHash === '') {
orderHash = SimpleCheckout.getAttribute('orderHash');
}
QUIAjax.get('package_quiqqer_order-simple-checkout_ajax_frontend_getOrder', (response) => {
CouponCodes.addCouponCodeToBasket(code, response.order.uuid).then(() => {
if (SimpleCheckout) {
SimpleCheckout.$refreshBasket().then(() => {
this.$running = false;
this.Loader.hide();
});
return;
}
this.$running = false;
this.Loader.hide();
}).catch((err) => {
console.error(err);
this.$running = false;
this.Loader.hide();
});
}, {
'package': 'quiqqer/order-simple-checkout',
orderHash: orderHash
});
return;
}
// get order process
if (!this.isInOrder()) {
QUIAjax.get('package_quiqqer_order_ajax_frontend_basket_getLastOrder', function (order) {
CouponCodes.addCouponCodeToBasket(code, order.hash).then(function (redeemed) {
QUIAjax.get('package_quiqqer_order_ajax_frontend_basket_getLastOrder', function(order) {
CouponCodes.addCouponCodeToBasket(code, order.hash).then(function(redeemed) {
if (!redeemed) {
self.$running = false;
self.Loader.hide();
return;
}
self.$addCouponCodeToSession(code).then(function () {
QUIAjax.get('package_quiqqer_order_ajax_frontend_basket_getOrderProcessUrl', function (url) {
self.$addCouponCodeToSession(code).then(function() {
QUIAjax.get('package_quiqqer_order_ajax_frontend_basket_getOrderProcessUrl', function(url) {
window.location = url + '?coupon=' + code;
}, {
'package': 'quiqqer/order'
......@@ -156,9 +198,9 @@ define('package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput', [
OrderProcess.Loader.show();
OrderProcess.getOrder().then(function (orderHash) {
OrderProcess.getOrder().then(function(orderHash) {
return CouponCodes.addCouponCodeToBasket(code, orderHash);
}).then(function (redeemed) {
}).then(function(redeemed) {
self.$running = false;
if (redeemed === false) {
......@@ -167,7 +209,7 @@ define('package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput', [
return;
}
self.$addCouponCodeToSession(code).then(function () {
self.$addCouponCodeToSession(code).then(function() {
OrderProcess.reload();
});
});
......@@ -178,15 +220,15 @@ define('package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput', [
* @param code
* @return {Promise}
*/
$addCouponCodeToSession: function (code) {
return Sessions.get('quiqqer-coupons').then(function (coupons) {
$addCouponCodeToSession: function(code) {
return Sessions.get('quiqqer-coupons').then(function(coupons) {
if (!coupons || typeOf(coupons) !== 'array') {
coupons = [];
}
coupons.push(code);
coupons = coupons.filter(function (value, index, self) {
coupons = coupons.filter(function(value, index, self) {
return self.indexOf(value) === index;
});
......@@ -198,7 +240,7 @@ define('package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput', [
* Is the coupon in the order process?
* @return {boolean}
*/
isInOrder: function () {
isInOrder: function() {
var OrderProcessNode = this.getElm().getParent(
'[data-qui="package/quiqqer/order/bin/frontend/controls/OrderProcess"]'
);
......@@ -211,7 +253,7 @@ define('package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput', [
*
* @return {Object}
*/
getOrderProcess: function () {
getOrderProcess: function() {
var OrderProcessNode = this.getElm().getParent(
'[data-qui="package/quiqqer/order/bin/frontend/controls/OrderProcess"]'
);
......@@ -224,19 +266,19 @@ define('package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput', [
*
* @return {Promise}
*/
removeCouponsFromOrder: function () {
removeCouponsFromOrder: function() {
if (!this.isInOrder()) {
return Promise.resolve();
}
var self = this;
return new Promise(function (resolve) {
return new Promise(function(resolve) {
var OrderProcess = self.getOrderProcess();
OrderProcess.Loader.show();
OrderProcess.getOrder().then(function (orderHash) {
QUIAjax.get('package_quiqqer_coupons_ajax_frontend_removeCoupons', function () {
OrderProcess.getOrder().then(function(orderHash) {
QUIAjax.get('package_quiqqer_coupons_ajax_frontend_removeCoupons', function() {
resolve();
OrderProcess.reload();
}, {
......
{
"pre-commit": {
"enabled": true,
"actions": [
{
"action": "\\CaptainHook\\App\\Hook\\PHP\\Action\\Linting"
},
{
"action": "composer test"
}
]
}
}
\ No newline at end of file
{
"name": "quiqqer/coupons",
"type": "quiqqer-module",
"description": "Coupons for QUIQQER",
"license": "GPL-3.0+",
"authors": [
{
"name": "Patrick M\u00fcller",
"email": "support@pcsg.de",
"homepage": "https://www.pcsg.de",
"role": "Developer"
"name": "quiqqer/coupons",
"type": "quiqqer-module",
"description": "Coupons for QUIQQER",
"license": "GPL-3.0+",
"authors": [
{
"name": "Patrick Müller",
"email": "support@pcsg.de",
"homepage": "https://www.pcsg.de",
"role": "Developer"
}
],
"support": {
"email": "support@pcsg.de"
},
"require": {
"quiqqer/core": "^2",
"quiqqer/erp": "^3.2",
"quiqqer/discount": "^2",
"quiqqer/products": "^2",
"quiqqer/order": "^2"
},
"autoload": {
"psr-4": {
"QUI\\ERP\\Coupons\\": "src/QUI/ERP/Coupons"
}
},
"scripts": {
"test": [
"@dev:lint",
"@dev:phpunit"
],
"dev:phpunit": "./tools/phpunit",
"dev:lint": [
"@dev:lint:phpstan",
"@dev:lint:style"
],
"dev:lint:phpstan": "./tools/phpstan",
"dev:lint:style": "./tools/phpcs",
"dev:lint:style:fix": "./tools/phpcbf",
"dev:init": [
"@dev:init:check-requirements",
"@dev:init:tools",
"@dev:init:git-hooks"
],
"dev:init:check-requirements": [
"which composer > /dev/null || (echo 'Error: composer has to be globally installed'; exit 1)",
"which phive > /dev/null || (echo 'Error: PHIVE has to be globally installed'; exit 1)"
],
"dev:init:tools": "phive install --temporary",
"dev:init:git-hooks": "./tools/captainhook install --only-enabled --force"
},
"scripts-aliases": {
"test": [
"dev:test"
]
},
"scripts-descriptions": {
"test": "Runs linting, static analysis, and unit tests.",
"dev:phpunit": "Run PHPUnit test suites",
"dev:lint": "Run PHPStan and code style check",
"dev:lint:phpstan": "Run PHPStan",
"dev:lint:style": "Run code style check (PHP_CodeSniffer)",
"dev:lint:style:fix": "Try to fix code style errors automatically",
"dev:init": "Initialize the developer tooling (tools and git hooks)",
"dev:init:check-requirements": "Check if the necessary requirements are met",
"dev:init:tools": "Install all developer tools (requires PHIVE)",
"dev:init:git-hooks": "Install all git hooks (may require tools to be installed)"
}
],
"support": {
"email": "support@pcsg.de"
},
"require": {
"quiqqer/core": "^2",
"quiqqer/erp": "^3.2",
"quiqqer/discount": "^2",
"quiqqer/products": "^2"
},
"autoload": {
"psr-4": {
"QUI\\ERP\\Coupons\\": "src/QUI/ERP/Coupons"
}
}
}
}
\ No newline at end of file
......@@ -42,4 +42,7 @@
<event on="onQuiqqerOrderSuccessful" fire="\QUI\ERP\Coupons\Events::removeCouponsFromSession"/>
<event on="onQuiqqer::order::orderProcessFinish" fire="\QUI\ERP\Coupons\Events::removeCouponsFromSession"/>
<event on="onQuiqqerMigrationV2" fire="\QUI\ERP\Coupons\Events::onQuiqqerMigrationV2"/>
<!-- simple order compatibility -->
<event on="onQuiqqer::simple::order::basket::middle" fire="\QUI\ERP\Coupons\Events::templateOrderSimpleOrder"/>
</events>
<?xml version="1.0"?>
<ruleset>
<!-- Use PSR-12 ruleset -->
<rule ref="PSR12"/>
<!-- Only scan *.php files -->
<arg name="extensions" value="php"/>
<!-- Ignore warnings -->
<arg name="warning-severity" value="0"/>
<!-- Process 64 (or number of CPU cores) files in parallel -->
<arg name="parallel" value="64"/>
<!-- Output relative file paths, by setting the current folder as the basepath -->
<arg name="basepath" value="."/>
<!-- Show colored output -->
<arg name="colors"/>
<!-- Scan everything in the current folder -->
<file>.</file>
</ruleset>
parameters:
ignoreErrors:
-
message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\PriceFactorInterface\\:\\:setVat\\(\\)\\.$#"
count: 1
path: ajax/backend/getCouponPrice.php
-
message: "#^Dead catch \\- Exception is never thrown in the try block\\.$#"
count: 1
path: ajax/delete.php
-
message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\PriceFactorInterface\\:\\:setVat\\(\\)\\.$#"
count: 1
path: src/QUI/ERP/Coupons/CouponCode.php
-
message: "#^Method QUI\\\\ERP\\\\Coupons\\\\CouponCode\\:\\:getDiscounts\\(\\) should return array\\<QUI\\\\ERP\\\\Discount\\\\Discount\\> but returns array\\<int\\<0, max\\>, QUI\\\\CRUD\\\\Child\\>\\.$#"
count: 1
path: src/QUI/ERP/Coupons/CouponCode.php
-
message: "#^Offset 'standard' on array\\{title\\: array\\{de\\: 'Gutschein \\- Versand', en\\: 'Coupon delivery'\\}, type\\: 'ProductAttributeList', public\\: true, standard\\: false, requiredField\\: true, options\\: array\\{entries\\: array\\{array\\{title\\: array\\{de\\: 'per E \\- Mail', en\\: 'via email'\\}, sum\\: 0, type\\: 2, selected\\: true, userinput\\: false\\}, array\\{title\\: array\\{de\\: 'per Post', en\\: 'via mail'\\}, sum\\: 0, type\\: 2, selected\\: false, userinput\\: false\\}\\}\\}\\}\\|array\\{title\\: array\\{de\\: 'Gutschein Wert', en\\: 'Coupon amount'\\}, type\\: 'FloatType', public\\: false, standard\\: false, requiredField\\: true\\}\\|array\\{title\\: array\\{de\\: 'Gutschein\\-Code als…', en\\: 'Provide coupon code…'\\}, description\\: array\\{de\\: 'Der Gutschein wird…', en\\: 'The coupon is also…'\\}, type\\: 'BoolType', public\\: false, standard\\: false, requiredField\\: false\\}\\|array\\{title\\: array\\{de\\: 'Gutschein\\-Code ist…', en\\: 'Coupon code is…'\\}, description\\: array\\{de\\: 'Übertragbare…', en\\: 'Transferable…'\\}, type\\: 'BoolType', public\\: false, standard\\: false, requiredField\\: false\\}\\|array\\{title\\: array\\{de\\: 'Gutschein\\-Code per…', en\\: 'Send coupon code…'\\}, description\\: array\\{de\\: 'Der Gutschein\\-Code…', en\\: 'The coupon code is…'\\}, type\\: 'BoolType', public\\: false, standard\\: false, requiredField\\: false\\}\\|array\\{title\\: array\\{de\\: 'Gutschein\\-Code…', en\\: 'Coupon code…'\\}, type\\: 'IntType', public\\: false, standard\\: false, requiredField\\: true\\}\\|array\\{title\\: array\\{de\\: 'Gutschein…', en\\: 'Coupon description'\\}, description\\: array\\{de\\: 'Diese Beschreibung…', en\\: 'This description…'\\}, type\\: 'InputMultiLang', public\\: false, standard\\: false, requiredField\\: false\\}\\|array\\{title\\: array\\{de\\: 'Ist Einzweck…', en\\: 'Is single purpose…'\\}, description\\: array\\{de\\: 'Einzweck\\-Gutscheine…', en\\: 'Single\\-purpose…'\\}, type\\: 'BoolType', public\\: false, standard\\: false, requiredField\\: false\\}\\|array\\{title\\: array\\{de\\: 'Kunde darf…', en\\: 'Customer can choose…'\\}, description\\: array\\{de\\: 'Ist diese Funktion…', en\\: 'if this option is…'\\}, type\\: 'BoolType', public\\: false, standard\\: false, requiredField\\: false\\} in empty\\(\\) always exists and is always falsy\\.$#"
count: 1
path: src/QUI/ERP/Coupons/Events.php
-
message: "#^Parameter \\#1 \\$id of static method QUI\\\\ERP\\\\Coupons\\\\Handler\\:\\:getCouponCode\\(\\) expects int, string\\|false given\\.$#"
count: 1
path: src/QUI/ERP/Coupons/Handler.php
-
message: "#^Call to method createPDF\\(\\) on an unknown class QUI\\\\HtmlToPdf\\\\Document\\.$#"
count: 1
path: src/QUI/ERP/Coupons/Products/Handler.php
-
message: "#^Call to method setAttribute\\(\\) on an unknown class QUI\\\\HtmlToPdf\\\\Document\\.$#"
count: 7
path: src/QUI/ERP/Coupons/Products/Handler.php
-
message: "#^Call to method setContentHTML\\(\\) on an unknown class QUI\\\\HtmlToPdf\\\\Document\\.$#"
count: 1
path: src/QUI/ERP/Coupons/Products/Handler.php
-
message: "#^Call to method setFooterHTML\\(\\) on an unknown class QUI\\\\HtmlToPdf\\\\Document\\.$#"
count: 1
path: src/QUI/ERP/Coupons/Products/Handler.php
-
message: "#^Call to method setHeaderHTML\\(\\) on an unknown class QUI\\\\HtmlToPdf\\\\Document\\.$#"
count: 1
path: src/QUI/ERP/Coupons/Products/Handler.php
-
message: "#^Instantiated class QUI\\\\HtmlToPdf\\\\Document not found\\.$#"
count: 1
path: src/QUI/ERP/Coupons/Products/Handler.php
-
message: "#^Negated boolean expression is always false\\.$#"
count: 1
path: src/QUI/ERP/Coupons/Products/Handler.php
-
message: "#^Parameter \\#1 \\$key of method QUI\\\\ERP\\\\Accounting\\\\Article\\:\\:getCustomField\\(\\) expects string, int given\\.$#"
count: 1
path: src/QUI/ERP/Coupons/Products/Handler.php
......@@ -2,7 +2,7 @@ includes:
- phpstan-baseline.neon
parameters:
level: 1
level: 5
paths:
- src
- ajax
......
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="tests/phpunit-bootstrap.php">
<testsuites>
<testsuite name="Tests">
<directory>tests/</directory>
</testsuite>
</testsuites>
</phpunit>
......@@ -27,6 +27,7 @@
use function is_string;
use function json_decode;
use function json_encode;
use function method_exists;
/**
* Class Events
......@@ -63,12 +64,12 @@ public static function onAdminLoadFooter(): void
*
* @param Collector $Collector
* @param mixed $Basket
* @param AbstractOrder|null $Order
* @param mixed $Order
*/
public static function templateOrderProcessBasketEnd(
Collector $Collector,
mixed $Basket,
AbstractOrder $Order = null
mixed $Order = null
): void {
if (
!($Basket instanceof Basket)
......@@ -96,6 +97,26 @@ public static function templateOrderProcessBasketEnd(
);
}
public static function templateOrderSimpleOrder(
Collector $Collector,
AbstractOrder $Order
): void {
if ($Order instanceof QUI\ERP\Order\OrderInProcess && isset($_GET['coupon'])) {
try {
$code = Handler::sanitizeCode($_GET['coupon']);
$CouponCode = Handler::getCouponCodeByCode($code);
$CouponCode->checkRedemption(QUI::getUserBySession());
$CouponCode->addToOrder($Order);
} catch (Exception) {
}
}
$Collector->append(
'<div data-qui="package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput"></div>'
);
}
/**
* @param QUI\ERP\Order\OrderProcess $OrderProcess
* @throws QUI\ERP\Order\Exception
......@@ -193,7 +214,9 @@ public static function onQuiqqerOrderBasketRemovePos(
$Order->setData('quiqqer-coupons', $orderCoupons);
try {
$Order->save();
if (method_exists($Order, 'save')) {
$Order->save();
}
} catch (QUI\Exception) {
}
}
......
<?php
if (!defined('QUIQQER_SYSTEM')) {
define('QUIQQER_SYSTEM', true);
}
if (!defined('QUIQQER_AJAX')) {
define('QUIQQER_AJAX', true);
}
require_once __DIR__ . '/../../../../bootstrap.php';