diff --git a/mails/en/order_canceled.txt b/mails/en/order_canceled.txt
index e4cdf1bf2..c84dd4476 100644
--- a/mails/en/order_canceled.txt
+++ b/mails/en/order_canceled.txt
@@ -1,19 +1,21 @@
-[/{shop_url}]
+[/{shop_url}]
-Hi {firstname} {lastname},
+Hi {firstname} {lastname},
Your order with the reference {order_name} from {shop_name} has
-been canceled.
+been canceled.
+
+{extra_mail_content_txt}
You can review your order and download your invoice from the
"Order history" [/{history_url}] section of your customer account by
-clicking "My account" [/{my_account_url}] on our shop.
+clicking "My account" [/{my_account_url}] on our shop.
If you have a guest account, you can follow your order via the
"Guest Tracking" [/{guest_tracking_url}?id_order={order_name}] section
-on our shop.
+on our shop.
{shop_name} [/{shop_url}] powered by Webkul(tm)
-[https://webkul.com]
+[https://webkul.com]
diff --git a/mails/en/order_return_state.html b/mails/en/order_return_state.html
index f5bcb1f43..7abe9b4d7 100644
--- a/mails/en/order_return_state.html
+++ b/mails/en/order_return_state.html
@@ -4,51 +4,51 @@
Message from {shop_name}
-
-
-
@@ -99,6 +99,7 @@
+{extra_mail_content_html}
diff --git a/mails/en/order_return_state.txt b/mails/en/order_return_state.txt
index 1264fff3f..33d61642f 100644
--- a/mails/en/order_return_state.txt
+++ b/mails/en/order_return_state.txt
@@ -1,15 +1,17 @@
-[/{shop_url}]
+[/{shop_url}]
-Hi {firstname} {lastname},
+Hi {firstname} {lastname},
We have updated the progress on your return #{id_order_return}, the
new status is: "{state_order_return}"
+{extra_mail_content_txt}
+
You can review your order and download your invoice from the
"Order history" [/{history_url}] section of your customer account by
-clicking "My account" [/{my_account_url}] on our shop.
+clicking "My account" [/{my_account_url}] on our shop.
{shop_name} [/{shop_url}] powered by Webkul(tm)
-[https://webkul.com]
+[https://webkul.com]
diff --git a/mails/en/outofstock.txt b/mails/en/outofstock.txt
deleted file mode 100644
index d58bfc6b4..000000000
--- a/mails/en/outofstock.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-
-[/{shop_url}]
-
-Hi {firstname} {lastname},
-
-Thanks for your order with the reference {order_name} from
-{shop_name}.
-
-Unfortunately, one or more items are currently out of stock. This
-may cause a slight delay in your delivery. Please accept our apologies
-and rest assured that we are working hard to rectify this.
-
-You can review your order and download your invoice from the
-"Order history" [/{history_url}] section of your customer account by
-clicking "My account" [/{my_account_url}] on our shop.
-
-If you have a guest account, you can follow your order via the
-"Guest Tracking" [/{guest_tracking_url}?id_order={order_name}] section
-on our shop.
-
-{shop_name} [/{shop_url}] powered by Webkul(tm)
-[https://webkul.com]
-
diff --git a/mails/en/payment.html b/mails/en/payment_accepted.html
similarity index 88%
rename from mails/en/payment.html
rename to mails/en/payment_accepted.html
index 7399da068..8c337c44e 100644
--- a/mails/en/payment.html
+++ b/mails/en/payment_accepted.html
@@ -4,51 +4,51 @@
Message from {shop_name}
-
-
-
@@ -99,6 +99,7 @@
+{extra_mail_content_html}
diff --git a/mails/en/payment.txt b/mails/en/payment_accepted.txt
similarity index 67%
rename from mails/en/payment.txt
rename to mails/en/payment_accepted.txt
index 6323378c5..41e7d6bb8 100644
--- a/mails/en/payment.txt
+++ b/mails/en/payment_accepted.txt
@@ -1,21 +1,23 @@
-[/{shop_url}]
+[/{shop_url}]
Hi {firstname} {lastname},
-Thank you for shopping with {shop_name}!
+Thank you for shopping with {shop_name}!
Your payment for order with the reference {order_name} was
-successfully processed.
+successfully processed.
+
+{extra_mail_content_txt}
You can review your order and download your invoice from the
"Order history" [/{history_url}] section of your customer account by
-clicking "My account" [/{my_account_url}] on our shop.
+clicking "My account" [/{my_account_url}] on our shop.
If you have a guest account, you can follow your order via the
"Guest Tracking" [/{guest_tracking_url}?id_order={order_name}] section
-on our shop.
+on our shop.
{shop_name} [/{shop_url}] powered by Webkul(tm)
-[https://webkul.com]
+[https://webkul.com]
diff --git a/mails/en/payment_error.html b/mails/en/payment_error.html
index 318bb0662..3f4de0e93 100644
--- a/mails/en/payment_error.html
+++ b/mails/en/payment_error.html
@@ -4,51 +4,51 @@
Message from {shop_name}
-
-
-
@@ -100,6 +100,7 @@
+{extra_mail_content_html}
diff --git a/mails/en/payment_error.txt b/mails/en/payment_error.txt
index 3acfd2e01..bf15780d7 100644
--- a/mails/en/payment_error.txt
+++ b/mails/en/payment_error.txt
@@ -1,22 +1,24 @@
-[/{shop_url}]
+[/{shop_url}]
-Hi {firstname} {lastname},
+Hi {firstname} {lastname},
There is a problem with your payment for {shop_name} order with the
reference {order_name}. Please contact us at your earliest
convenience.
-WE CANNOT SHIP YOUR ORDER UNTIL WE RECEIVE YOUR PAYMENT.
+WE CANNOT SHIP YOUR ORDER UNTIL WE RECEIVE YOUR PAYMENT.
+
+{extra_mail_content_txt}
You can review your order and download your invoice from the
"Order history" [/{history_url}] section of your customer account by
-clicking "My account" [/{my_account_url}] on our shop.
+clicking "My account" [/{my_account_url}] on our shop.
If you have a guest account, you can follow your order via the
"Guest Tracking" [/{guest_tracking_url}?id_order={order_name}] section
-on our shop.
+on our shop.
{shop_name} [/{shop_url}] powered by Webkul(tm)
-[https://webkul.com]
+[https://webkul.com]
diff --git a/mails/en/preparation.html b/mails/en/processing.html
similarity index 88%
rename from mails/en/preparation.html
rename to mails/en/processing.html
index 74c521419..febfe804b 100644
--- a/mails/en/preparation.html
+++ b/mails/en/processing.html
@@ -4,51 +4,51 @@
Message from {shop_name}
-
-
-
@@ -98,6 +98,7 @@
+{extra_mail_content_html}
diff --git a/mails/en/preparation.txt b/mails/en/processing.txt
similarity index 67%
rename from mails/en/preparation.txt
rename to mails/en/processing.txt
index 9afbc8754..979df0e4b 100644
--- a/mails/en/preparation.txt
+++ b/mails/en/processing.txt
@@ -1,19 +1,21 @@
-[/{shop_url}]
+[/{shop_url}]
-Hi {firstname} {lastname},
+Hi {firstname} {lastname},
We are currently processing your {shop_name} order with the
-reference {order_name}.
+reference {order_name}.
+
+{extra_mail_content_txt}
You can review your order and download your invoice from the
"Order history" [/{history_url}] section of your customer account by
-clicking "My account" [/{my_account_url}] on our shop.
+clicking "My account" [/{my_account_url}] on our shop.
If you have a guest account, you can follow your order via the
"Guest Tracking" [/{guest_tracking_url}?id_order={order_name}] section
-on our shop.
+on our shop.
{shop_name} [/{shop_url}] powered by Webkul(tm)
-[https://webkul.com]
+[https://webkul.com]
diff --git a/mails/en/refund.html b/mails/en/refund.html
index d6c3f9c0f..40a9d7715 100644
--- a/mails/en/refund.html
+++ b/mails/en/refund.html
@@ -4,51 +4,51 @@
Message from {shop_name}
-
-
-
@@ -98,6 +98,7 @@
+{extra_mail_content_html}
diff --git a/mails/en/refund.txt b/mails/en/refund.txt
index ea70e1a01..7c1a7e414 100644
--- a/mails/en/refund.txt
+++ b/mails/en/refund.txt
@@ -1,19 +1,21 @@
-[/{shop_url}]
+[/{shop_url}]
-Hi {firstname} {lastname},
+Hi {firstname} {lastname},
We have processed your {shop_name} refund for order with the
-reference {order_name}.
+reference {order_name}.
+
+{extra_mail_content_txt}
You can review your order and download your invoice from the
"Order history" [/{history_url}] section of your customer account by
-clicking "My account" [/{my_account_url}] on our shop.
+clicking "My account" [/{my_account_url}] on our shop.
If you have a guest account, you can follow your order via the
"Guest Tracking" [/{guest_tracking_url}?id_order={order_name}] section
-on our shop.
+on our shop.
{shop_name} [/{shop_url}] powered by Webkul(tm)
-[https://webkul.com]
+[https://webkul.com]
diff --git a/modules/bankwire/bankwire.php b/modules/bankwire/bankwire.php
index ec154b7af..f617c8601 100644
--- a/modules/bankwire/bankwire.php
+++ b/modules/bankwire/bankwire.php
@@ -74,11 +74,29 @@ class Bankwire extends PaymentModule
$this->warning = $this->l('No currency has been set for this module.');
}
- $this->extra_mail_vars = array(
- '{bankwire_owner}' => Configuration::get('BANK_WIRE_OWNER'),
- '{bankwire_details}' => nl2br(Configuration::get('BANK_WIRE_DETAILS')),
- '{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS'))
- );
+ $this->payment_type = OrderPayment::PAYMENT_TYPE_REMOTE_PAYMENT;
+ }
+
+ public function getExtraMailContent($id_order_state, $order)
+ {
+ if (Configuration::get('PS_OS_AWAITING_PAYMENT') == $id_order_state) {
+ $this->context->smarty->assign(array(
+ 'bankwire_owner' => Configuration::get('BANK_WIRE_OWNER'),
+ 'bankwire_details' => nl2br(Configuration::get('BANK_WIRE_DETAILS')),
+ 'bankwire_address' => nl2br(Configuration::get('BANK_WIRE_ADDRESS')),
+ 'lang' => new Language($order->id_lang)
+ ));
+
+ return array(
+ '{extra_mail_content_html}' => $this->context->smarty->fetch(
+ $this->local_path.'views/templates/mail/mail_template_html.tpl'
+ ),
+ '{extra_mail_content_txt}' => $this->context->smarty->fetch(
+ $this->local_path.'views/templates/mail/mail_template_text.tpl'
+ )
+ );
+ }
+ return array();
}
public function install()
@@ -195,9 +213,7 @@ class Bankwire extends PaymentModule
if (in_array(
$orderState,
array(
- Configuration::get('PS_OS_BANKWIRE'),
- Configuration::get('PS_OS_OUTOFSTOCK'),
- Configuration::get('PS_OS_OUTOFSTOCK_UNPAID')
+ Configuration::get('PS_OS_AWAITING_PAYMENT'),
)
)) {
$objCart = new Cart($objOrder->id_cart);
diff --git a/modules/bankwire/controllers/front/validation.php b/modules/bankwire/controllers/front/validation.php
index f20681e1d..c96ff78ec 100644
--- a/modules/bankwire/controllers/front/validation.php
+++ b/modules/bankwire/controllers/front/validation.php
@@ -77,7 +77,7 @@ class BankwireValidationModuleFrontController extends ModuleFrontController
'{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS'))
);
- $this->module->validateOrder($cart->id, Configuration::get('PS_OS_BANKWIRE'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);
+ $this->module->validateOrder($cart->id, Configuration::get('PS_OS_AWAITING_PAYMENT'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);
Tools::redirect('index.php?controller=order-confirmation&id_cart='.$cart->id.'&id_module='.$this->module->id.'&id_order='.$this->module->currentOrder.'&key='.$customer->secure_key);
}
}
diff --git a/modules/bankwire/views/templates/mail/index.php b/modules/bankwire/views/templates/mail/index.php
new file mode 100644
index 000000000..8d2cf16fe
--- /dev/null
+++ b/modules/bankwire/views/templates/mail/index.php
@@ -0,0 +1,29 @@
+
+* @copyright 2010-2022 Webkul IN
+* @license https://store.webkul.com/license.html
+*/
+
+header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
+header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
+
+header('Cache-Control: no-store, no-cache, must-revalidate');
+header('Cache-Control: post-check=0, pre-check=0', false);
+header('Pragma: no-cache');
+
+header('Location: ../../../');
+exit;
diff --git a/modules/bankwire/views/templates/mail/mail_template_html.tpl b/modules/bankwire/views/templates/mail/mail_template_html.tpl
new file mode 100644
index 000000000..ac5f35d46
--- /dev/null
+++ b/modules/bankwire/views/templates/mail/mail_template_html.tpl
@@ -0,0 +1,44 @@
+{*
+* 2010-2022 Webkul.
+*
+* NOTICE OF LICENSE
+*
+* All right is reserved,
+* Please go through this link for complete license : https://store.webkul.com/license.html
+*
+* DISCLAIMER
+*
+* Do not edit or add to this file if you wish to upgrade this module to newer
+* versions in the future. If you wish to customize this module for your
+* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
+*
+* @author Webkul IN
+* @copyright 2010-2022 Webkul IN
+* @license https://store.webkul.com/license.html
+*}
+
+
+
+
+ | |
+
+
+
+ {l s='Here are the bank details for your transfer:' mod='bankwire' lang=$lang}
+
+
+ {l s='Amount:' mod='bankwire' lang=$lang} {literal}{total_paid}{/literal}
+ {l s='Account owner:' mod='bankwire' lang=$lang} {$bankwire_owner}
+ {l s='Account details:' mod='bankwire' lang=$lang} {$bankwire_details}
+ {l s='Bank address:' mod='bankwire' lang=$lang} {$bankwire_address}
+
+
+ |
+ |
+
+
+ |
+
+
+
+
\ No newline at end of file
diff --git a/modules/bankwire/views/templates/mail/mail_template_text.tpl b/modules/bankwire/views/templates/mail/mail_template_text.tpl
new file mode 100644
index 000000000..c15a111f6
--- /dev/null
+++ b/modules/bankwire/views/templates/mail/mail_template_text.tpl
@@ -0,0 +1,24 @@
+{*
+* 2010-2022 Webkul.
+*
+* NOTICE OF LICENSE
+*
+* All right is reserved,
+* Please go through this link for complete license : https://store.webkul.com/license.html
+*
+* DISCLAIMER
+*
+* Do not edit or add to this file if you wish to upgrade this module to newer
+* versions in the future. If you wish to customize this module for your
+* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
+*
+* @author Webkul IN
+* @copyright 2010-2022 Webkul IN
+* @license https://store.webkul.com/license.html
+*}
+{l s='Here are the bank details for your transfer:' mod='bankwire'}
+
+{l s='Amount:' mod='bankwire'} {literal}{total_paid}{/literal}
+{l s='Account owner:' mod='bankwire'} {$bankwire_owner}
+{l s='Account details:' mod='bankwire'} {$bankwire_details}
+{l s='Bank address:' mod='bankwire'} {$bankwire_address}
diff --git a/modules/cheque/cheque.php b/modules/cheque/cheque.php
index f76be3229..dc5ffa669 100644
--- a/modules/cheque/cheque.php
+++ b/modules/cheque/cheque.php
@@ -69,11 +69,29 @@ class Cheque extends PaymentModule
$this->warning = $this->l('No currency has been set for this module.');
}
- $this->extra_mail_vars = array(
- '{cheque_name}' => Configuration::get('CHEQUE_NAME'),
- '{cheque_address}' => Configuration::get('CHEQUE_ADDRESS'),
- '{cheque_address_html}' => str_replace("\n", ' ', Configuration::get('CHEQUE_ADDRESS'))
- );
+ $this->payment_type = OrderPayment::PAYMENT_TYPE_REMOTE_PAYMENT;
+ }
+
+ public function getExtraMailContent($id_order_state, $order)
+ {
+ if (Configuration::get('PS_OS_AWAITING_PAYMENT') == $id_order_state) {
+ $this->context->smarty->assign(array(
+ 'cheque_name' => Configuration::get('CHEQUE_NAME'),
+ 'cheque_address' => Configuration::get('CHEQUE_ADDRESS'),
+ 'cheque_address_html' => str_replace("\n", ' ', Configuration::get('CHEQUE_ADDRESS')),
+ 'lang' => new Language($order->id_lang)
+ ));
+
+ return array(
+ '{extra_mail_content_html}' => $this->context->smarty->fetch(
+ $this->local_path.'views/templates/mail/mail_template_html.tpl'
+ ),
+ '{extra_mail_content_txt}' => $this->context->smarty->fetch(
+ $this->local_path.'views/templates/mail/mail_template_text.tpl'
+ )
+ );
+ }
+ return array();
}
public function install()
@@ -177,9 +195,7 @@ class Cheque extends PaymentModule
if (in_array(
$orderState,
array(
- Configuration::get('PS_OS_CHEQUE'),
- Configuration::get('PS_OS_OUTOFSTOCK'),
- Configuration::get('PS_OS_OUTOFSTOCK_UNPAID')
+ Configuration::get('PS_OS_AWAITING_PAYMENT')
)
)) {
$objCart = new Cart($objOrder->id_cart);
diff --git a/modules/cheque/controllers/front/validation.php b/modules/cheque/controllers/front/validation.php
index 8fb8401f1..6f75120a9 100644
--- a/modules/cheque/controllers/front/validation.php
+++ b/modules/cheque/controllers/front/validation.php
@@ -77,7 +77,7 @@ class ChequeValidationModuleFrontController extends ModuleFrontController
'{cheque_address}' => Configuration::get('CHEQUE_ADDRESS'),
'{cheque_address_html}' => str_replace("\n", ' ', Configuration::get('CHEQUE_ADDRESS')));
- $this->module->validateOrder((int)$cart->id, Configuration::get('PS_OS_CHEQUE'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);
+ $this->module->validateOrder((int)$cart->id, Configuration::get('PS_OS_AWAITING_PAYMENT'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);
Tools::redirect('index.php?controller=order-confirmation&id_cart='.(int)$cart->id.'&id_module='.(int)$this->module->id.'&id_order='.$this->module->currentOrder.'&key='.$customer->secure_key);
}
}
diff --git a/modules/cheque/views/templates/mail/index.php b/modules/cheque/views/templates/mail/index.php
new file mode 100644
index 000000000..8d2cf16fe
--- /dev/null
+++ b/modules/cheque/views/templates/mail/index.php
@@ -0,0 +1,29 @@
+
+* @copyright 2010-2022 Webkul IN
+* @license https://store.webkul.com/license.html
+*/
+
+header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
+header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
+
+header('Cache-Control: no-store, no-cache, must-revalidate');
+header('Cache-Control: post-check=0, pre-check=0', false);
+header('Pragma: no-cache');
+
+header('Location: ../../../');
+exit;
diff --git a/modules/cheque/views/templates/mail/mail_template_html.tpl b/modules/cheque/views/templates/mail/mail_template_html.tpl
new file mode 100644
index 000000000..d6ade1dac
--- /dev/null
+++ b/modules/cheque/views/templates/mail/mail_template_html.tpl
@@ -0,0 +1,43 @@
+{*
+* 2010-2022 Webkul.
+*
+* NOTICE OF LICENSE
+*
+* All right is reserved,
+* Please go through this link for complete license : https://store.webkul.com/license.html
+*
+* DISCLAIMER
+*
+* Do not edit or add to this file if you wish to upgrade this module to newer
+* versions in the future. If you wish to customize this module for your
+* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
+*
+* @author Webkul IN
+* @copyright 2010-2022 Webkul IN
+* @license https://store.webkul.com/license.html
+*}
+
+
+
+
+ | |
+
+
+
+ {l s='Here are the bank details for your check:' mod='cheque' lang=$lang}
+
+
+ {l s='Amount:' mod='cheque' lang=$lang} {literal}{total_paid}{/literal}
+ {l s='Payable to the order of:' mod='cheque' lang=$lang} {$cheque_name}
+ {l s='Please mail your check to:' mod='cheque' lang=$lang} {$cheque_address_html}
+
+
+ |
+ |
+
+
+ |
+
+
+
+
\ No newline at end of file
diff --git a/modules/cheque/views/templates/mail/mail_template_text.tpl b/modules/cheque/views/templates/mail/mail_template_text.tpl
new file mode 100644
index 000000000..adc2c0ac6
--- /dev/null
+++ b/modules/cheque/views/templates/mail/mail_template_text.tpl
@@ -0,0 +1,23 @@
+{*
+* 2010-2022 Webkul.
+*
+* NOTICE OF LICENSE
+*
+* All right is reserved,
+* Please go through this link for complete license : https://store.webkul.com/license.html
+*
+* DISCLAIMER
+*
+* Do not edit or add to this file if you wish to upgrade this module to newer
+* versions in the future. If you wish to customize this module for your
+* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
+*
+* @author Webkul IN
+* @copyright 2010-2022 Webkul IN
+* @license https://store.webkul.com/license.html
+*}
+{l s='Here are the bank details for your check:' mod='cheque' lang=$lang}
+
+{l s='Amount:' mod='cheque' lang=$lang} {literal}{total_paid}{/literal}
+{l s='Payable to the order of:' mod='cheque' lang=$lang} {$cheque_name}
+{l s='Please mail your check to:' mod='cheque' lang=$lang} {$cheque_address}
diff --git a/modules/qlopaypalcommerce/classes/WkPaypalCommerceDb.php b/modules/qlopaypalcommerce/classes/WkPaypalCommerceDb.php
index 60b54c0bb..8c19bfe1a 100644
--- a/modules/qlopaypalcommerce/classes/WkPaypalCommerceDb.php
+++ b/modules/qlopaypalcommerce/classes/WkPaypalCommerceDb.php
@@ -130,61 +130,4 @@ class WkPaypalCommerceDb
),
);
}
-
- public function createPaypalAwaitingOrderState()
- {
- $orderStatus = new OrderState();
- $orderStatus->invoice = 0;
- $orderStatus->send_email = 0;
- $orderStatus->module_name = 'qlopaypalcommerce';
- $orderStatus->color = '#ff8942';
- $orderStatus->unremovable = 1;
-
- foreach (Language::getLanguages(false) as $lang) {
- $orderStatus->name[$lang['id_lang']] = 'PayPal Payment Awaiting';
- $orderStatus->template[$lang['id_lang']] = '';
- }
-
- if ($orderStatus->save()) {
- $source = _PS_MODULE_DIR_.'qlopaypalcommerce/views/img/1.gif';
- $destination = _PS_ORDER_STATE_IMG_DIR_.$orderStatus->id.'.gif';
- Tools::copy($source, $destination);
-
- Configuration::updateValue('PS_OS_PAYPAL_COMMERCE_AWAITING', $orderStatus->id);
-
- return true;
- }
-
- return false;
- }
-
- public function createPartialPaymentOrderState()
- {
- if (!Configuration::get('PS_OS_PARTIAL_PAYMENT')) {
- $objOrderState = new OrderState();
- $objOrderState->name = array();
-
- foreach (Language::getLanguages() as $language) {
- $objOrderState->name[$language['id_lang']] = 'Partial Payment Accepted';
- }
- $objOrderState->module_name = 'qlopaypalcommerce';
- $objOrderState->send_email = false;
- $objOrderState->unremovable = false;
- $objOrderState->color = '#AAFFA4';
- $objOrderState->hidden = false;
- $objOrderState->delivery = false;
- $objOrderState->logable = true;
- $objOrderState->invoice = true;
-
- if ($objOrderState->save()) {
- $source = _PS_MODULE_DIR_.'qlopaypalcommerce/logo.gif';
- $destination = _PS_ORDER_STATE_IMG_DIR_.$objOrderState->id.'.gif';
- Tools::copy($source, $destination);
-
- Configuration::updateValue('PS_OS_PARTIAL_PAYMENT', (int) $objOrderState->id);
- }
- }
-
- return true;
- }
}
diff --git a/modules/qlopaypalcommerce/classes/WkPaypalCommerceWebhook.php b/modules/qlopaypalcommerce/classes/WkPaypalCommerceWebhook.php
index d4c542e9b..5bd2182be 100644
--- a/modules/qlopaypalcommerce/classes/WkPaypalCommerceWebhook.php
+++ b/modules/qlopaypalcommerce/classes/WkPaypalCommerceWebhook.php
@@ -95,9 +95,9 @@ class WkPaypalCommerceWebhook
$cartID = $transactionData['id_cart'];
$objCart = new Cart($cartID);
if ($objCart->is_advance_payment) {
- $orderStatus = Configuration::get('PS_OS_PARTIAL_PAYMENT');
+ $orderStatus = Configuration::get('PS_OS_PARTIAL_PAYMENT_ACCEPTED');
} else {
- $orderStatus = Configuration::get('PS_OS_PAYMENT');
+ $orderStatus = Configuration::get('PS_OS_PAYMENT_ACCEPTED');
}
if ($orders = WkPaypalCommerceHelper::getOrdersByCartId($cartID)) {
foreach ($orders as $order) {
@@ -125,9 +125,9 @@ class WkPaypalCommerceWebhook
$cartID = $transactionData['id_cart'];
$objCart = new Cart($cartID);
if ($objCart->is_advance_payment) {
- $orderStatus = Configuration::get('PS_OS_PARTIAL_PAYMENT');
+ $orderStatus = Configuration::get('PS_OS_PARTIAL_PAYMENT_ACCEPTED');
} else {
- $orderStatus = Configuration::get('PS_OS_PAYMENT');
+ $orderStatus = Configuration::get('PS_OS_PAYMENT_ACCEPTED');
}
if ($orders = WkPaypalCommerceHelper::getOrdersByCartId($cartID)) {
foreach ($orders as $order) {
diff --git a/modules/qlopaypalcommerce/controllers/front/payment.php b/modules/qlopaypalcommerce/controllers/front/payment.php
index 9412e26f1..507f53c0c 100644
--- a/modules/qlopaypalcommerce/controllers/front/payment.php
+++ b/modules/qlopaypalcommerce/controllers/front/payment.php
@@ -133,12 +133,12 @@ class QloPaypalCommercePaymentModuleFrontController extends ModuleFrontControlle
// set order status
if ($returnData['data']['status'] == 'COMPLETED') {
if ($cart->is_advance_payment) {
- $orderStatus = Configuration::get('PS_OS_PARTIAL_PAYMENT');
+ $orderStatus = Configuration::get('PS_OS_PARTIAL_PAYMENT_ACCEPTED');
} else {
- $orderStatus = Configuration::get('PS_OS_PAYMENT');
+ $orderStatus = Configuration::get('PS_OS_PAYMENT_ACCEPTED');
}
} else {
- $orderStatus = Configuration::get('PS_OS_PAYPAL_COMMERCE_AWAITING');
+ $orderStatus = Configuration::get('PS_OS_AWAITING_PAYMENT');
}
// create order for the payment
diff --git a/modules/qlopaypalcommerce/qlopaypalcommerce.php b/modules/qlopaypalcommerce/qlopaypalcommerce.php
index ef46d73ef..b54e043c9 100644
--- a/modules/qlopaypalcommerce/qlopaypalcommerce.php
+++ b/modules/qlopaypalcommerce/qlopaypalcommerce.php
@@ -91,6 +91,8 @@ class QloPaypalCommerce extends PaymentModule
}
parent::__construct();
+
+ $this->payment_type = OrderPayment::PAYMENT_TYPE_ONLINE;
}
public function getContent()
@@ -534,8 +536,6 @@ class QloPaypalCommerce extends PaymentModule
{
$objModuleDb = new WkPaypalCommerceDb();
if (!parent::install()
- || !$objModuleDb->createPartialPaymentOrderState()
- || !$objModuleDb->createPaypalAwaitingOrderState()
|| !$objModuleDb->createTables()
|| !$this->callInstallTab()
|| !$this->registerModuleHooks()
| | | | | |