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

fix: consider currency change

Übergeordneter 51bcb4f7
No related branches found
No related tags found
2 Merge Requests!7feat: article list in basket designed,!5feat: article list in basket designed
......@@ -12,7 +12,7 @@ define('package/quiqqer/order-simple-checkout/bin/frontend/controls/SimpleChecko
return new Class({
Extends: QUIControl,
Type : 'package/quiqqer/order-simple-checkout/bin/frontend/controls/SimpleCheckout',
Type: 'package/quiqqer/order-simple-checkout/bin/frontend/controls/SimpleCheckout',
Binds: [
'update',
......@@ -29,13 +29,17 @@ define('package/quiqqer/order-simple-checkout/bin/frontend/controls/SimpleChecko
this.$Delivery = null;
this.$Shipping = null;
this.$Payment = null;
this.Loader = null;
this.$Payment = null;
this.Loader = null;
this.addEvents({
onImport: this.$onImport,
onInject: this.$onInject
});
QUI.addEvent('onQuiqqerCurrencyChange', (Instance, curr) => {
this.setCurrency(curr.code);
});
},
$onImport: function() {
......@@ -56,8 +60,8 @@ define('package/quiqqer/order-simple-checkout/bin/frontend/controls/SimpleChecko
], (LoginWindow) => {
new LoginWindow({
redirect: false,
reload : false,
events : {
reload: false,
events: {
onSuccess: () => {
window.location.reload();
}
......@@ -71,8 +75,8 @@ define('package/quiqqer/order-simple-checkout/bin/frontend/controls/SimpleChecko
if (LoginNode) {
require(['package/quiqqer/frontend-users/bin/frontend/controls/login/Login'], (Login) => {
new Login({
redirect : false,
reload : false,
redirect: false,
reload: false,
onSuccess: () => {
this.getElm().setStyle('minHeight', this.getElm().getSize().y);
this.Loader.show();
......@@ -94,7 +98,7 @@ define('package/quiqqer/order-simple-checkout/bin/frontend/controls/SimpleChecko
]).then((instances) => {
this.$Delivery = instances[0];
this.$Shipping = instances[1];
this.$Payment = instances[2];
this.$Payment = instances[2];
if (!this.$Delivery && !this.$Shipping && !this.$Payment) {
this.Loader.hide();
......@@ -190,8 +194,8 @@ define('package/quiqqer/order-simple-checkout/bin/frontend/controls/SimpleChecko
},
{
'package': 'quiqqer/order-simple-checkout',
products : JSON.encode(this.getAttribute('products')),
onError : reject
products: JSON.encode(this.getAttribute('products')),
onError: reject
}
);
});
......@@ -234,9 +238,9 @@ define('package/quiqqer/order-simple-checkout/bin/frontend/controls/SimpleChecko
return new Promise((resolve, reject) => {
QUIAjax.post('package_quiqqer_order-simple-checkout_ajax_frontend_setCurrency', resolve, {
'package': 'quiqqer/order-simple-checkout',
currency : currency,
currency: currency,
orderHash: this.getAttribute('orderHash'),
onError : reject
onError: reject
});
}).then(() => {
return this.$refreshBasket();
......
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