swissup/module-breeze-webkul-order-by-whatsapp-bot

WebkulOrderByWhatsapp 集成

安装: 9

依赖: 0

建议: 0

安全: 0

星级: 1

关注者: 3

分支: 0

开放问题: 0

语言:JavaScript

类型:magento2-module

1.0.1 2024-07-12 09:46 UTC

This package is auto-updated.

Last update: 2024-09-12 10:12:23 UTC


README

与 Webkul_OrderByWhatsappBot 5.0.4 测试过

安装

composer require swissup/module-breeze-webkul-order-by-whatsapp-bot
bin/magento module:enable Swissup_BreezeWebkulOrderByWhatsappBot

所需补丁

Webkul/OrderByWhatsappBot/view/frontend/web/js/view/product-view-button.js

@@ -27,6 +27,7 @@
     return Component.extend({
         defaults: {
+            popUp: null,
             template: 'Webkul_OrderByWhatsappBot/whatsapp-button',
             shippingFormTemplate: 'Webkul_OrderByWhatsappBot/shipping-address/form',
             buttonText: window.whatsappConfig.pageViewButtonTitle,
@@ -55,7 +55,7 @@
             var self = this;
             this._super();

-            this.isFormPopUpVisible.subscribe(function(value) {
+            this.isFormPopUpVisibleSubscriber = this.isFormPopUpVisible.subscribe(function(value) {
@@ -149,7 +150,7 @@
             var self = this,
                 buttons;

-            if (!popUp) {
+            if (!this.popUp) {
                 buttons = this.popUpForm.options.buttons;
                 this.popUpForm.options.buttons = [{
                         text: buttons.save.text ? buttons.save.text : $t('Save Address'),
@@ -174,10 +175,10 @@
                 this.popUpForm.options.keyEventHandlers = {
                     escapeKey: this.onClosePopUp.bind(this)
                 };
-                popUp = modal(this.popUpForm.options, $(this.popUpForm.element));
+                this.popUp = modal(this.popUpForm.options, $(this.popUpForm.element));
             }

-            return popUp;
+            return this.popUp;
         },

Webkul/OrderByWhatsappBot/view/frontend/web/js/view/cart/whatsapp-checkout.js

@@ -26,6 +26,7 @@
     var popUp = null;
     return Component.extend({
         defaults: {
+            popUp: null,
             template: 'Webkul_OrderByWhatsappBot/whatsapp-cart-page',
             shippingFormTemplate: 'Webkul_OrderByWhatsappBot/shipping-address/form',
             buttonText: $t('Buy Now'),
@@ -53,7 +54,7 @@
             var self = this;
             this._super();

-            this.isFormPopUpVisible.subscribe(function(value) {
+            this.isFormPopUpVisibleSubscriber = this.isFormPopUpVisible.subscribe(function(value) {
                 if (value) {
                     self.getPopUp().openModal();
                 }
@@ -136,7 +137,7 @@
             var self = this,
                 buttons;

-            if (!popUp) {
+            if (!this.popUp) {
                 buttons = this.popUpForm.options.buttons;
                 this.popUpForm.options.buttons = [{
                         text: buttons.save.text ? buttons.save.text : $t('Save Address'),
@@ -159,10 +160,10 @@
                 this.popUpForm.options.keyEventHandlers = {
                     escapeKey: this.onClosePopUp.bind(this)
                 };
-                popUp = modal(this.popUpForm.options, $(this.popUpForm.element));
+                this.popUp = modal(this.popUpForm.options, $(this.popUpForm.element));
             }

-            return popUp;
+            return this.popUp;
         },