diff --git a/mails/en/order_canceled.txt b/mails/en/order_canceled.txt
index e4cdf1bf2..f55f183fb 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.
+
+{payment_module_detail_text}
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..dc79ab0b5 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 @@
+{payment_module_detail_html}
diff --git a/mails/en/order_return_state.txt b/mails/en/order_return_state.txt
index 1264fff3f..a316e8533 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}"
+{payment_module_detail_text}
+
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.html b/mails/en/outofstock.html
index 0548ffee4..2d91504a6 100644
--- a/mails/en/outofstock.html
+++ b/mails/en/outofstock.html
@@ -4,51 +4,51 @@
Message from {shop_name}
-
-
-
@@ -99,6 +99,7 @@
+{payment_module_detail_html}
diff --git a/mails/en/outofstock.txt b/mails/en/outofstock.txt
index d58bfc6b4..2e0a4901c 100644
--- a/mails/en/outofstock.txt
+++ b/mails/en/outofstock.txt
@@ -1,23 +1,25 @@
-[/{shop_url}]
+[/{shop_url}]
Hi {firstname} {lastname},
Thanks for your order with the reference {order_name} from
-{shop_name}.
+{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.
+and rest assured that we are working hard to rectify this.
+
+{payment_module_detail_text}
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.html b/mails/en/payment.html
index 7399da068..350a14174 100644
--- a/mails/en/payment.html
+++ b/mails/en/payment.html
@@ -4,51 +4,51 @@
Message from {shop_name}
-
-
-
@@ -99,6 +99,7 @@
+{payment_module_detail_html}
diff --git a/mails/en/payment.txt b/mails/en/payment.txt
index 6323378c5..052ea3bb3 100644
--- a/mails/en/payment.txt
+++ b/mails/en/payment.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.
+
+{payment_module_detail_text}
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..b68020cf4 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 @@
+{payment_module_detail_html}
diff --git a/mails/en/payment_error.txt b/mails/en/payment_error.txt
index 3acfd2e01..554c3a739 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.
+
+{payment_module_detail_text}
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/preparation.html
index 74c521419..89c5474c5 100644
--- a/mails/en/preparation.html
+++ b/mails/en/preparation.html
@@ -4,51 +4,51 @@
Message from {shop_name}
-
-
-
@@ -98,6 +98,7 @@
+{payment_module_detail_html}
diff --git a/mails/en/preparation.txt b/mails/en/preparation.txt
index 9afbc8754..c179d78a5 100644
--- a/mails/en/preparation.txt
+++ b/mails/en/preparation.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}.
+
+{payment_module_detail_text}
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..5c35597e2 100644
--- a/mails/en/refund.html
+++ b/mails/en/refund.html
@@ -4,51 +4,51 @@
Message from {shop_name}
-
-
-
@@ -98,6 +98,7 @@
+{payment_module_detail_html}
diff --git a/mails/en/refund.txt b/mails/en/refund.txt
index ea70e1a01..8b372810b 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}.
+
+{payment_module_detail_text}
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 17b995091..a7df7fbe2 100644
--- a/modules/bankwire/bankwire.php
+++ b/modules/bankwire/bankwire.php
@@ -74,11 +74,26 @@ 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 = PaymentModule::PAYMENT_TYPE_REMOTE_PAYMENT;
+ }
+
+ public function getMailContent($id_order_state, $id_lang)
+ {
+ if (Configuration::get('PS_OS_AWATING') == $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'))
+ ));
+ return array(
+ '{payment_module_detail_html}' => $this->context->smarty->fetch(
+ $this->local_path.'mails/'.Language::getIsoById($id_lang).'/mail_template_html.tpl'
+ ),
+ '{payment_module_detail_text}' => $this->context->smarty->fetch(
+ $this->local_path.'mails/'.Language::getIsoById($id_lang).'/mail_template_text.tpl'
+ )
+ );
+ }
}
public function install()
@@ -195,9 +210,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_AWATING'),
)
)) {
$objCart = new Cart($objOrder->id_cart);
diff --git a/modules/bankwire/controllers/front/validation.php b/modules/bankwire/controllers/front/validation.php
index f20681e1d..5045f4827 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_AWATING'), $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/mails/en/index.php b/modules/bankwire/mails/en/index.php
new file mode 100644
index 000000000..8d2cf16fe
--- /dev/null
+++ b/modules/bankwire/mails/en/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/mails/en/mail_template_html.tpl b/modules/bankwire/mails/en/mail_template_html.tpl
new file mode 100644
index 000000000..68756bdf3
--- /dev/null
+++ b/modules/bankwire/mails/en/mail_template_html.tpl
@@ -0,0 +1,26 @@
+
+
+
+
+ | |
+
+
+
+ {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}
+
+
+ |
+ |
+
+
+ |
+
+
+
+
\ No newline at end of file
diff --git a/modules/bankwire/mails/en/mail_template_text.tpl b/modules/bankwire/mails/en/mail_template_text.tpl
new file mode 100644
index 000000000..6b2de81ca
--- /dev/null
+++ b/modules/bankwire/mails/en/mail_template_text.tpl
@@ -0,0 +1,6 @@
+{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/bankwire/mails/index.php b/modules/bankwire/mails/index.php
new file mode 100644
index 000000000..8d2cf16fe
--- /dev/null
+++ b/modules/bankwire/mails/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/cheque.php b/modules/cheque/cheque.php
index e85bc146e..133f9219c 100644
--- a/modules/cheque/cheque.php
+++ b/modules/cheque/cheque.php
@@ -69,11 +69,27 @@ 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 = PaymentModule::PAYMENT_TYPE_REMOTE_PAYMENT;
+ }
+
+ public function getMailContent($id_order_state, $id_lang)
+ {
+ if (Configuration::get('PS_OS_AWATING') == $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'))
+ ));
+ return array(
+ '{payment_module_detail_html}' => $this->context->smarty->fetch(
+ $this->local_path.'mails/'.Language::getIsoById($id_lang).'/mail_template_html.tpl'
+ ),
+ '{payment_module_detail_text}' => $this->context->smarty->fetch(
+ $this->local_path.'mails/'.Language::getIsoById($id_lang).'/mail_template_text.tpl'
+ )
+ );
+ }
+ return false;
}
public function install()
@@ -177,9 +193,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_AWATING')
)
)) {
$objCart = new Cart($objOrder->id_cart);
diff --git a/modules/cheque/controllers/front/validation.php b/modules/cheque/controllers/front/validation.php
index 8fb8401f1..008e2f063 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_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/mails/en/index.php b/modules/cheque/mails/en/index.php
new file mode 100644
index 000000000..8d2cf16fe
--- /dev/null
+++ b/modules/cheque/mails/en/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/mails/en/mail_template_html.tpl b/modules/cheque/mails/en/mail_template_html.tpl
new file mode 100644
index 000000000..f2b778ba0
--- /dev/null
+++ b/modules/cheque/mails/en/mail_template_html.tpl
@@ -0,0 +1,25 @@
+
+
+
+
+ | |
+
+
+
+ {l s='Here are the bank details for your check:' mod='cheque'}
+
+
+ {l s='Amount:' mod='cheque'} {literal}{total_paid}{/literal}
+ {l s='Payable to the order of:' mod='cheque'} {$cheque_name}
+ {l s='Please mail your check to:' mod='cheque'} {$cheque_address_html}
+
+
+ |
+ |
+
+
+ |
+
+
+
+
\ No newline at end of file
diff --git a/modules/cheque/mails/en/mail_template_text.tpl b/modules/cheque/mails/en/mail_template_text.tpl
new file mode 100644
index 000000000..38f153c11
--- /dev/null
+++ b/modules/cheque/mails/en/mail_template_text.tpl
@@ -0,0 +1,5 @@
+{l s='Here are the bank details for your check:' mod='cheque'}
+
+{l s='Amount:' mod='cheque'} {literal}{total_paid}{/literal}
+{l s='Payable to the order of:' mod='cheque'} {$cheque_name}
+{l s='Please mail your check to:' mod='cheque'} {$cheque_address}
diff --git a/modules/cheque/mails/index.php b/modules/cheque/mails/index.php
new file mode 100644
index 000000000..8d2cf16fe
--- /dev/null
+++ b/modules/cheque/mails/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/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/controllers/front/payment.php b/modules/qlopaypalcommerce/controllers/front/payment.php
index 9412e26f1..4fa88eeb2 100644
--- a/modules/qlopaypalcommerce/controllers/front/payment.php
+++ b/modules/qlopaypalcommerce/controllers/front/payment.php
@@ -138,7 +138,7 @@ class QloPaypalCommercePaymentModuleFrontController extends ModuleFrontControlle
$orderStatus = Configuration::get('PS_OS_PAYMENT');
}
} else {
- $orderStatus = Configuration::get('PS_OS_PAYPAL_COMMERCE_AWAITING');
+ $orderStatus = Configuration::get('PS_OS_AWATING');
}
// create order for the payment
diff --git a/modules/qlopaypalcommerce/qlopaypalcommerce.php b/modules/qlopaypalcommerce/qlopaypalcommerce.php
index ef46d73ef..bdb5b8517 100644
--- a/modules/qlopaypalcommerce/qlopaypalcommerce.php
+++ b/modules/qlopaypalcommerce/qlopaypalcommerce.php
@@ -91,6 +91,8 @@ class QloPaypalCommerce extends PaymentModule
}
parent::__construct();
+
+ $this->payment_type = PaymentModule::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()
From 02b81c50cb20b9dbe007196596a9b6a58b234c91 Mon Sep 17 00:00:00 2001
From: Shreesh Arora
Date: Tue, 27 Sep 2022 11:55:31 +0530
Subject: [PATCH 02/14] updated order status cheque module | added missing
licence
---
.../bankwire/mails/en/mail_template_html.tpl | 18 ++++++++++++++++++
.../bankwire/mails/en/mail_template_text.tpl | 18 ++++++++++++++++++
.../cheque/controllers/front/validation.php | 2 +-
modules/cheque/mails/en/mail_template_html.tpl | 18 ++++++++++++++++++
modules/cheque/mails/en/mail_template_text.tpl | 18 ++++++++++++++++++
5 files changed, 73 insertions(+), 1 deletion(-)
diff --git a/modules/bankwire/mails/en/mail_template_html.tpl b/modules/bankwire/mails/en/mail_template_html.tpl
index 68756bdf3..f0df3ea06 100644
--- a/modules/bankwire/mails/en/mail_template_html.tpl
+++ b/modules/bankwire/mails/en/mail_template_html.tpl
@@ -1,3 +1,21 @@
+{*
+* 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
+*}
diff --git a/modules/bankwire/mails/en/mail_template_text.tpl b/modules/bankwire/mails/en/mail_template_text.tpl
index 6b2de81ca..c15a111f6 100644
--- a/modules/bankwire/mails/en/mail_template_text.tpl
+++ b/modules/bankwire/mails/en/mail_template_text.tpl
@@ -1,3 +1,21 @@
+{*
+* 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}
diff --git a/modules/cheque/controllers/front/validation.php b/modules/cheque/controllers/front/validation.php
index 008e2f063..b31e3451f 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_PAYMENT'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);
+ $this->module->validateOrder((int)$cart->id, Configuration::get('PS_OS_AWATING'), $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/mails/en/mail_template_html.tpl b/modules/cheque/mails/en/mail_template_html.tpl
index f2b778ba0..8fb0d1891 100644
--- a/modules/cheque/mails/en/mail_template_html.tpl
+++ b/modules/cheque/mails/en/mail_template_html.tpl
@@ -1,3 +1,21 @@
+{*
+* 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
+*}
diff --git a/modules/cheque/mails/en/mail_template_text.tpl b/modules/cheque/mails/en/mail_template_text.tpl
index 38f153c11..ece2eaffa 100644
--- a/modules/cheque/mails/en/mail_template_text.tpl
+++ b/modules/cheque/mails/en/mail_template_text.tpl
@@ -1,3 +1,21 @@
+{*
+* 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'}
{l s='Amount:' mod='cheque'} {literal}{total_paid}{/literal}
From da494b89d9f6fa877fa8031462fc5115c9cc0b4e Mon Sep 17 00:00:00 2001
From: Shreesh Arora
Date: Wed, 23 Nov 2022 15:52:26 +0530
Subject: [PATCH 03/14] update configuration key for statuses
---
install/data/xml/configuration.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/install/data/xml/configuration.xml b/install/data/xml/configuration.xml
index b549e3245..eba6f6a01 100644
--- a/install/data/xml/configuration.xml
+++ b/install/data/xml/configuration.xml
@@ -407,10 +407,10 @@
11
-
+
9
-
+
10
+
+ 9
+
10
-
- 7
+
+ 10
11
-
- 9
-
-
- 10
+
+ 11
-
- 7
-
-
- 11
-
-
- 8
-
0
@@ -611,9 +614,6 @@
gridhtml
-
- 10
-
100
@@ -650,9 +650,6 @@
http://www.qloapps.com
-
- store.jpg
-
jpg
@@ -668,26 +665,6 @@
-
- Your company
-
-
- Address line 1
-City
-Country
-
-
- 0123-456-789
-
-
- pub@qloapps.com
-
-
- 0123-456-789
-
-
- pub@qloapps.com
-
1
@@ -709,18 +686,6 @@ Country
5
-
- 535
-
-
- 1300
-
-
- 7700
-
-
- 1
-
m
From fdd1974d632ad3ab16bc080bdda7c14d57df228f Mon Sep 17 00:00:00 2001
From: Shreesh Arora
Date: Wed, 7 Dec 2022 11:47:23 +0530
Subject: [PATCH 05/14] update partial payment addition in payement table
---
classes/order/OrderHistory.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/classes/order/OrderHistory.php b/classes/order/OrderHistory.php
index d9f47288c..0f5716ade 100644
--- a/classes/order/OrderHistory.php
+++ b/classes/order/OrderHistory.php
@@ -326,6 +326,8 @@ class OrderHistoryCore extends ObjectModel
&& $order->total_paid_real < $order->advance_paid_amount
) {
$rest_paid = $order->advance_paid_amount - $order->total_paid_real;
+ } else {
+ break;
}
$payment = new OrderPayment();
$payment->order_reference = Tools::substr($order->reference, 0, 9);
From 879be11fbd41f5b16a54073276068fdbcbc69f66 Mon Sep 17 00:00:00 2001
From: Shreesh Arora
Date: Wed, 7 Dec 2022 15:36:20 +0530
Subject: [PATCH 06/14] update code
---
classes/PaymentModule.php | 17 ++++++-----------
classes/order/Order.php | 2 +-
classes/order/OrderHistory.php | 12 ++++++------
config/config.inc.php | 2 +-
controllers/admin/AdminOrdersController.php | 2 +-
controllers/front/ParentOrderController.php | 2 +-
install/data/xml/configuration.xml | 4 ++--
install/langs/bg/data/order_state.xml | 2 +-
install/langs/bn/data/order_state.xml | 2 +-
install/langs/br/data/order_state.xml | 2 +-
install/langs/cs/data/order_state.xml | 2 +-
install/langs/de/data/order_state.xml | 2 +-
install/langs/en/data/order_state.xml | 2 +-
install/langs/es/data/order_state.xml | 2 +-
install/langs/fa/data/order_state.xml | 2 +-
install/langs/fr/data/order_state.xml | 2 +-
install/langs/he/data/order_state.xml | 2 +-
install/langs/hr/data/order_state.xml | 2 +-
install/langs/hu/data/order_state.xml | 2 +-
install/langs/id/data/order_state.xml | 2 +-
install/langs/it/data/order_state.xml | 2 +-
install/langs/lt/data/order_state.xml | 2 +-
install/langs/mk/data/order_state.xml | 2 +-
install/langs/nl/data/order_state.xml | 2 +-
install/langs/no/data/order_state.xml | 2 +-
install/langs/pl/data/order_state.xml | 2 +-
install/langs/pt/data/order_state.xml | 2 +-
install/langs/qc/data/order_state.xml | 2 +-
install/langs/ro/data/order_state.xml | 2 +-
install/langs/ru/data/order_state.xml | 2 +-
install/langs/si/data/order_state.xml | 2 +-
install/langs/sr/data/order_state.xml | 2 +-
install/langs/sv/data/order_state.xml | 2 +-
install/langs/tw/data/order_state.xml | 2 +-
install/langs/vn/data/order_state.xml | 2 +-
install/langs/zh/data/order_state.xml | 2 +-
modules/bankwire/bankwire.php | 4 ++--
.../bankwire/controllers/front/validation.php | 2 +-
modules/cheque/cheque.php | 4 ++--
modules/cheque/controllers/front/validation.php | 2 +-
.../controllers/front/payment.php | 2 +-
41 files changed, 54 insertions(+), 59 deletions(-)
diff --git a/classes/PaymentModule.php b/classes/PaymentModule.php
index 75fbe8c84..d1433cf41 100644
--- a/classes/PaymentModule.php
+++ b/classes/PaymentModule.php
@@ -26,22 +26,17 @@
abstract class PaymentModuleCore extends Module
{
- /** @var int Current order's id */
- public $currentOrder;
- public $currencies = true;
- public $currencies_mode = 'checkbox';
-
const DEBUG_MODE = false;
const PAYMENT_TYPE_ONLINE = 1;
const PAYMENT_TYPE_PAY_AT_HOTEL = 2;
const PAYMENT_TYPE_REMOTE_PAYMENT = 3;
- public function __construct()
- {
- parent::__construct();
- $this->payment_type = PaymentModule::PAYMENT_TYPE_REMOTE_PAYMENT;
- }
+ /** @var int Current order's id */
+ public $currentOrder;
+ public $currencies = true;
+ public $currencies_mode = 'checkbox';
+ public $payment_type = PaymentModule::PAYMENT_TYPE_REMOTE_PAYMENT;
public function install()
{
@@ -443,7 +438,7 @@ abstract class PaymentModuleCore extends Module
$transaction_id = null;
}
- if (!isset($order) || !Validate::isLoadedObject($order) || !$order->addOrderPayment($amount_paid, null, PaymentModule::PAYMENT_TYPE_ONLINE , $transaction_id)) {
+ if (!isset($order) || !Validate::isLoadedObject($order) || !$order->addOrderPayment($amount_paid, null, $this->payment_type, $transaction_id)) {
PrestaShopLogger::addLog('PaymentModule::validateOrder - Cannot save Order Payment', 3, null, 'Cart', (int)$id_cart, true);
throw new PrestaShopException('Can\'t save Order Payment');
}
diff --git a/classes/order/Order.php b/classes/order/Order.php
index e8fabab7a..4ff1c33d1 100644
--- a/classes/order/Order.php
+++ b/classes/order/Order.php
@@ -1612,7 +1612,7 @@ class OrderCore extends ObjectModel
$payment_module = Module::getInstanceByName($this->module);
$payment_module->orderSource = $this->source;
$customer = new Customer($this->id_customer);
- $payment_module->validateOrder($this->id_cart, Configuration::get('PS_OS_AWATING_REMOTE_PAYMENT'), $this->total_paid, $this->payment, null, array(), null, false, $customer->secure_key);
+ $payment_module->validateOrder($this->id_cart, Configuration::get('PS_OS_AWAITING_REMOTE_PAYMENT'), $this->total_paid, $this->payment, null, array(), null, false, $customer->secure_key);
$this->id = $payment_module->currentOrder;
return true;
}
diff --git a/classes/order/OrderHistory.php b/classes/order/OrderHistory.php
index 0f5716ade..9d121f109 100644
--- a/classes/order/OrderHistory.php
+++ b/classes/order/OrderHistory.php
@@ -322,12 +322,12 @@ class OrderHistoryCore extends ObjectModel
/** @var OrderInvoice $invoice */
$rest_paid = $invoice->getRestPaid();
if ($rest_paid > 0) {
- if (Configuration::get('PS_OS_PARTIAL_PAYMENT') == $new_os->id
- && $order->total_paid_real < $order->advance_paid_amount
- ) {
- $rest_paid = $order->advance_paid_amount - $order->total_paid_real;
- } else {
- break;
+ if (Configuration::get('PS_OS_PARTIAL_PAYMENT') == $new_os->id) {
+ if ($order->total_paid_real < $order->advance_paid_amount) {
+ $rest_paid = $order->advance_paid_amount - $order->total_paid_real;
+ } else {
+ break;
+ }
}
$payment = new OrderPayment();
$payment->order_reference = Tools::substr($order->reference, 0, 9);
diff --git a/config/config.inc.php b/config/config.inc.php
index 674ddc01e..01fd793b7 100644
--- a/config/config.inc.php
+++ b/config/config.inc.php
@@ -238,7 +238,7 @@ $context->link = new Link($https_link, $https_link);
* USE : Configuration::get() method in order to getting the id of order status
*/
-define('_PS_OS_AWATING_', Configuration::get('PS_OS_AWATING'));
+define('_PS_OS_AWAITING_', Configuration::get('PS_OS_AWAITING'));
define('_PS_OS_PAYMENT_', Configuration::get('PS_OS_PAYMENT'));
define('_PS_OS_PROCESSING_', Configuration::get('PS_OS_PROCESSING'));
define('_PS_OS_CANCELED_', Configuration::get('PS_OS_CANCELED'));
diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php
index 36f4505b6..908c3bcc7 100644
--- a/controllers/admin/AdminOrdersController.php
+++ b/controllers/admin/AdminOrdersController.php
@@ -232,7 +232,7 @@ class AdminOrdersControllerCore extends AdminController
$this->addJqueryPlugin(array('autocomplete', 'fancybox', 'typewatch'));
$defaults_order_state = array(
- 'awating' => (int)Configuration::get('PS_OS_AWATING'),
+ 'awaiting' => (int)Configuration::get('PS_OS_AWAITING'),
'other' => (int)Configuration::get('PS_OS_PAYMENT'));
$payment_modules = array();
foreach (PaymentModule::getInstalledPaymentModules() as $p_module) {
diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php
index 9f05ead7a..a8faded59 100644
--- a/controllers/front/ParentOrderController.php
+++ b/controllers/front/ParentOrderController.php
@@ -182,7 +182,7 @@ class ParentOrderControllerCore extends FrontController
// order status payment accepted if no amount is pending for the booking
if ($dueAmount > 0) {
- $orderStatus = Configuration::get('PS_OS_AWATING');
+ $orderStatus = Configuration::get('PS_OS_AWAITING');
} else {
$orderStatus = Configuration::get('PS_OS_PAYMENT');
}
diff --git a/install/data/xml/configuration.xml b/install/data/xml/configuration.xml
index 663fc7dfe..f29eb051e 100644
--- a/install/data/xml/configuration.xml
+++ b/install/data/xml/configuration.xml
@@ -374,7 +374,7 @@
1
-
+
1
@@ -410,7 +410,7 @@
-
+
9
diff --git a/install/langs/bg/data/order_state.xml b/install/langs/bg/data/order_state.xml
index 516a2e42d..d0a50242d 100644
--- a/install/langs/bg/data/order_state.xml
+++ b/install/langs/bg/data/order_state.xml
@@ -2,7 +2,7 @@
Awaiting payment
- awating
+ awaiting
Payment accepted
diff --git a/install/langs/bn/data/order_state.xml b/install/langs/bn/data/order_state.xml
index 80a3dad08..f1a4e311b 100644
--- a/install/langs/bn/data/order_state.xml
+++ b/install/langs/bn/data/order_state.xml
@@ -2,7 +2,7 @@
অপেক্ষমান পেমেন্ট
- awating
+ awaiting
পেমেন্ট গৃহীত
diff --git a/install/langs/br/data/order_state.xml b/install/langs/br/data/order_state.xml
index e62b8510d..3ae673a3a 100644
--- a/install/langs/br/data/order_state.xml
+++ b/install/langs/br/data/order_state.xml
@@ -2,7 +2,7 @@
Aguardando pagamento
- awating
+ awaiting
Pagamento aceito
diff --git a/install/langs/cs/data/order_state.xml b/install/langs/cs/data/order_state.xml
index d21deb508..2e1edf045 100644
--- a/install/langs/cs/data/order_state.xml
+++ b/install/langs/cs/data/order_state.xml
@@ -2,7 +2,7 @@
Čeká se na platbu
- awating
+ awaiting
Platba byla přijata
diff --git a/install/langs/de/data/order_state.xml b/install/langs/de/data/order_state.xml
index 933b00906..9ae40deda 100644
--- a/install/langs/de/data/order_state.xml
+++ b/install/langs/de/data/order_state.xml
@@ -2,7 +2,7 @@
Warten auf Zahlung
- awating
+ awaiting
Zahlung eingegangen
diff --git a/install/langs/en/data/order_state.xml b/install/langs/en/data/order_state.xml
index 7b4a5dc43..c153a1108 100644
--- a/install/langs/en/data/order_state.xml
+++ b/install/langs/en/data/order_state.xml
@@ -2,7 +2,7 @@
Awaiting payment
- awating
+ awaiting
Payment accepted
diff --git a/install/langs/es/data/order_state.xml b/install/langs/es/data/order_state.xml
index 565f0779c..8b9745b2c 100644
--- a/install/langs/es/data/order_state.xml
+++ b/install/langs/es/data/order_state.xml
@@ -2,7 +2,7 @@
Pago pendiente
- awating
+ awaiting
Pago aceptado
diff --git a/install/langs/fa/data/order_state.xml b/install/langs/fa/data/order_state.xml
index 39fea76ad..5e9ec1b7f 100644
--- a/install/langs/fa/data/order_state.xml
+++ b/install/langs/fa/data/order_state.xml
@@ -2,7 +2,7 @@
منتظر پرداخت
- awating
+ awaiting
پرداخت تایید شده
diff --git a/install/langs/fr/data/order_state.xml b/install/langs/fr/data/order_state.xml
index 26b248c5c..ba12392d2 100644
--- a/install/langs/fr/data/order_state.xml
+++ b/install/langs/fr/data/order_state.xml
@@ -2,7 +2,7 @@
En attente paiement
- awating
+ awaiting
Paiement accepté
diff --git a/install/langs/he/data/order_state.xml b/install/langs/he/data/order_state.xml
index 979587b98..634c885ff 100644
--- a/install/langs/he/data/order_state.xml
+++ b/install/langs/he/data/order_state.xml
@@ -2,7 +2,7 @@
ממתין לתשלום
- awating
+ awaiting
התקבל תשלום
diff --git a/install/langs/hr/data/order_state.xml b/install/langs/hr/data/order_state.xml
index 516a2e42d..d0a50242d 100644
--- a/install/langs/hr/data/order_state.xml
+++ b/install/langs/hr/data/order_state.xml
@@ -2,7 +2,7 @@
Awaiting payment
- awating
+ awaiting
Payment accepted
diff --git a/install/langs/hu/data/order_state.xml b/install/langs/hu/data/order_state.xml
index b3de46b6f..0e91466b0 100644
--- a/install/langs/hu/data/order_state.xml
+++ b/install/langs/hu/data/order_state.xml
@@ -2,7 +2,7 @@
Awaiting payment
- awating
+ awaiting
Payment accepted
diff --git a/install/langs/id/data/order_state.xml b/install/langs/id/data/order_state.xml
index 4ea433084..bdae92ed7 100644
--- a/install/langs/id/data/order_state.xml
+++ b/install/langs/id/data/order_state.xml
@@ -2,7 +2,7 @@
Menunggu pembayaran
- awating
+ awaiting
Pembayaran diterima
diff --git a/install/langs/it/data/order_state.xml b/install/langs/it/data/order_state.xml
index 5cfee9455..15d5c299a 100644
--- a/install/langs/it/data/order_state.xml
+++ b/install/langs/it/data/order_state.xml
@@ -2,7 +2,7 @@
In attesa del pagamento
- awating
+ awaiting
Pagamento accettato
diff --git a/install/langs/lt/data/order_state.xml b/install/langs/lt/data/order_state.xml
index 2b08f4065..9ef37e7e8 100644
--- a/install/langs/lt/data/order_state.xml
+++ b/install/langs/lt/data/order_state.xml
@@ -2,7 +2,7 @@
Awaiting payment
- awating
+ awaiting
Payment accepted
diff --git a/install/langs/mk/data/order_state.xml b/install/langs/mk/data/order_state.xml
index ca1a854bd..391f50dd5 100644
--- a/install/langs/mk/data/order_state.xml
+++ b/install/langs/mk/data/order_state.xml
@@ -2,7 +2,7 @@
Awaiting payment
- awating
+ awaiting
Payment accepted
diff --git a/install/langs/nl/data/order_state.xml b/install/langs/nl/data/order_state.xml
index c6f6c0913..647699164 100644
--- a/install/langs/nl/data/order_state.xml
+++ b/install/langs/nl/data/order_state.xml
@@ -2,7 +2,7 @@
In afwachting van betaling
- awating
+ awaiting
Betaling aanvaard
diff --git a/install/langs/no/data/order_state.xml b/install/langs/no/data/order_state.xml
index a004b1c0c..2773dbfb1 100644
--- a/install/langs/no/data/order_state.xml
+++ b/install/langs/no/data/order_state.xml
@@ -2,7 +2,7 @@
Awaiting payment
- awating
+ awaiting
Payment accepted
diff --git a/install/langs/pl/data/order_state.xml b/install/langs/pl/data/order_state.xml
index ca080d6a8..332776b28 100644
--- a/install/langs/pl/data/order_state.xml
+++ b/install/langs/pl/data/order_state.xml
@@ -2,7 +2,7 @@
czekać na wypłatę
- awating
+ awaiting
Płatność zaakceptowana
diff --git a/install/langs/pt/data/order_state.xml b/install/langs/pt/data/order_state.xml
index f7aade7cd..096b89ee3 100644
--- a/install/langs/pt/data/order_state.xml
+++ b/install/langs/pt/data/order_state.xml
@@ -2,7 +2,7 @@
A aguardar pagamento
- awating
+ awaiting
Pagamento aceite
diff --git a/install/langs/qc/data/order_state.xml b/install/langs/qc/data/order_state.xml
index d7f557e94..2d77c9d36 100644
--- a/install/langs/qc/data/order_state.xml
+++ b/install/langs/qc/data/order_state.xml
@@ -2,7 +2,7 @@
En attente de paiement
- awating
+ awaiting
Paiement accepté
diff --git a/install/langs/ro/data/order_state.xml b/install/langs/ro/data/order_state.xml
index 5b71d7e9f..fd6dd8ac7 100644
--- a/install/langs/ro/data/order_state.xml
+++ b/install/langs/ro/data/order_state.xml
@@ -2,7 +2,7 @@
În așteptarea plății
- awating
+ awaiting
Plată acceptată
diff --git a/install/langs/ru/data/order_state.xml b/install/langs/ru/data/order_state.xml
index b1013155e..087d333ee 100644
--- a/install/langs/ru/data/order_state.xml
+++ b/install/langs/ru/data/order_state.xml
@@ -2,7 +2,7 @@
Ожидание оплаты
- awating
+ awaiting
Платеж принят
diff --git a/install/langs/si/data/order_state.xml b/install/langs/si/data/order_state.xml
index 2b08f4065..9ef37e7e8 100644
--- a/install/langs/si/data/order_state.xml
+++ b/install/langs/si/data/order_state.xml
@@ -2,7 +2,7 @@
Awaiting payment
- awating
+ awaiting
Payment accepted
diff --git a/install/langs/sr/data/order_state.xml b/install/langs/sr/data/order_state.xml
index ca1a854bd..391f50dd5 100644
--- a/install/langs/sr/data/order_state.xml
+++ b/install/langs/sr/data/order_state.xml
@@ -2,7 +2,7 @@
Awaiting payment
- awating
+ awaiting
Payment accepted
diff --git a/install/langs/sv/data/order_state.xml b/install/langs/sv/data/order_state.xml
index 516a2e42d..d0a50242d 100644
--- a/install/langs/sv/data/order_state.xml
+++ b/install/langs/sv/data/order_state.xml
@@ -2,7 +2,7 @@
Awaiting payment
- awating
+ awaiting
Payment accepted
diff --git a/install/langs/tw/data/order_state.xml b/install/langs/tw/data/order_state.xml
index e1f17f3c0..9717de91a 100644
--- a/install/langs/tw/data/order_state.xml
+++ b/install/langs/tw/data/order_state.xml
@@ -2,7 +2,7 @@
等待付款
- awating
+ awaiting
付款完成
diff --git a/install/langs/vn/data/order_state.xml b/install/langs/vn/data/order_state.xml
index 3b241bb62..f8ed3a75f 100644
--- a/install/langs/vn/data/order_state.xml
+++ b/install/langs/vn/data/order_state.xml
@@ -2,7 +2,7 @@
Đang chờ thanh toán
- awating
+ awaiting
Thanh toán được chấp nhận
diff --git a/install/langs/zh/data/order_state.xml b/install/langs/zh/data/order_state.xml
index 45eb14182..a0e6204e6 100644
--- a/install/langs/zh/data/order_state.xml
+++ b/install/langs/zh/data/order_state.xml
@@ -2,7 +2,7 @@
Awaiting payment
- awating
+ awaiting
Payment accepted
diff --git a/modules/bankwire/bankwire.php b/modules/bankwire/bankwire.php
index a7df7fbe2..757c776bb 100644
--- a/modules/bankwire/bankwire.php
+++ b/modules/bankwire/bankwire.php
@@ -79,7 +79,7 @@ class bankwire extends PaymentModule
public function getMailContent($id_order_state, $id_lang)
{
- if (Configuration::get('PS_OS_AWATING') == $id_order_state) {
+ if (Configuration::get('PS_OS_AWAITING') == $id_order_state) {
$this->context->smarty->assign(array(
'bankwire_owner' => Configuration::get('BANK_WIRE_OWNER'),
'bankwire_details' => nl2br(Configuration::get('BANK_WIRE_DETAILS')),
@@ -210,7 +210,7 @@ class bankwire extends PaymentModule
if (in_array(
$orderState,
array(
- Configuration::get('PS_OS_AWATING'),
+ Configuration::get('PS_OS_AWAITING'),
)
)) {
$objCart = new Cart($objOrder->id_cart);
diff --git a/modules/bankwire/controllers/front/validation.php b/modules/bankwire/controllers/front/validation.php
index 5045f4827..3a083da57 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_AWATING'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);
+ $this->module->validateOrder($cart->id, Configuration::get('PS_OS_AWAITING'), $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/cheque/cheque.php b/modules/cheque/cheque.php
index 133f9219c..3271e95d6 100644
--- a/modules/cheque/cheque.php
+++ b/modules/cheque/cheque.php
@@ -74,7 +74,7 @@ class Cheque extends PaymentModule
public function getMailContent($id_order_state, $id_lang)
{
- if (Configuration::get('PS_OS_AWATING') == $id_order_state) {
+ if (Configuration::get('PS_OS_AWAITING') == $id_order_state) {
$this->context->smarty->assign(array(
'cheque_name' => Configuration::get('CHEQUE_NAME'),
'cheque_address' => Configuration::get('CHEQUE_ADDRESS'),
@@ -193,7 +193,7 @@ class Cheque extends PaymentModule
if (in_array(
$orderState,
array(
- Configuration::get('PS_OS_AWATING')
+ Configuration::get('PS_OS_AWAITING')
)
)) {
$objCart = new Cart($objOrder->id_cart);
diff --git a/modules/cheque/controllers/front/validation.php b/modules/cheque/controllers/front/validation.php
index b31e3451f..044a53183 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_AWATING'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);
+ $this->module->validateOrder((int)$cart->id, Configuration::get('PS_OS_AWAITING'), $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/qlopaypalcommerce/controllers/front/payment.php b/modules/qlopaypalcommerce/controllers/front/payment.php
index 4fa88eeb2..d06c1d06c 100644
--- a/modules/qlopaypalcommerce/controllers/front/payment.php
+++ b/modules/qlopaypalcommerce/controllers/front/payment.php
@@ -138,7 +138,7 @@ class QloPaypalCommercePaymentModuleFrontController extends ModuleFrontControlle
$orderStatus = Configuration::get('PS_OS_PAYMENT');
}
} else {
- $orderStatus = Configuration::get('PS_OS_AWATING');
+ $orderStatus = Configuration::get('PS_OS_AWAITING');
}
// create order for the payment
From 9defea68e2e4582e249d0a8efc5603e7f6144e47 Mon Sep 17 00:00:00 2001
From: Shreesh Arora
Date: Wed, 7 Dec 2022 15:38:43 +0530
Subject: [PATCH 07/14] updated mail file name
---
mails/en/{awating.html => awaiting.html} | 0
mails/en/{awating.txt => awaiting.txt} | 0
2 files changed, 0 insertions(+), 0 deletions(-)
rename mails/en/{awating.html => awaiting.html} (100%)
rename mails/en/{awating.txt => awaiting.txt} (100%)
diff --git a/mails/en/awating.html b/mails/en/awaiting.html
similarity index 100%
rename from mails/en/awating.html
rename to mails/en/awaiting.html
diff --git a/mails/en/awating.txt b/mails/en/awaiting.txt
similarity index 100%
rename from mails/en/awating.txt
rename to mails/en/awaiting.txt
From 9d36f46487553a940bc2092c79993229d88d945f Mon Sep 17 00:00:00 2001
From: Shreesh Arora
Date: Wed, 7 Dec 2022 15:59:45 +0530
Subject: [PATCH 08/14] updated remote payment configuration
---
install/data/xml/order_state.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/install/data/xml/order_state.xml b/install/data/xml/order_state.xml
index cbc8a1978..dfb33ad16 100644
--- a/install/data/xml/order_state.xml
+++ b/install/data/xml/order_state.xml
@@ -32,7 +32,7 @@
-
+
From bfe131a4f9fd11d3c38bb4a4f2cb322a21041659 Mon Sep 17 00:00:00 2001
From: Shreesh Arora
Date: Mon, 26 Dec 2022 19:38:59 +0530
Subject: [PATCH 09/14] updated add order payment function call
---
.../themes/default/template/controllers/orders/_documents.tpl | 2 +-
.../default/template/controllers/orders/helpers/view/view.tpl | 4 ++--
classes/PaymentModule.php | 2 +-
classes/order/Order.php | 2 +-
controllers/admin/AdminOrdersController.php | 4 ++--
js/admin/orders.js | 4 ++--
mails/en/awaiting.html | 2 +-
mails/en/awaiting.txt | 4 ++--
8 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/admin/themes/default/template/controllers/orders/_documents.tpl b/admin/themes/default/template/controllers/orders/_documents.tpl
index 6d7e49034..8b1436d34 100644
--- a/admin/themes/default/template/controllers/orders/_documents.tpl
+++ b/admin/themes/default/template/controllers/orders/_documents.tpl
@@ -112,7 +112,7 @@
{if !isset($document->is_delivery)}
{if $document->getRestPaid()}
-
+
{l s='Enter payment'}
diff --git a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl
index e8ee4da7d..4510e72d1 100644
--- a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl
+++ b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl
@@ -470,7 +470,7 @@
-
diff --git a/mails/en/awaiting.txt b/mails/en/awaiting.txt
index acd54716a..0cec17845 100644
--- a/mails/en/awaiting.txt
+++ b/mails/en/awaiting.txt
@@ -18,6 +18,6 @@ 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}] section on our shop.
-{shop_name} [/{shop_url}] powered by PrestaShop(tm)
-[http://www.prestashop.com/]
+{shop_name} [/{shop_url}] powered by Webkul(tm)
+[https://webkul.com]
From 41c01c6d5482203e3ae37bf8a30840653b117e62 Mon Sep 17 00:00:00 2001
From: Shreesh Arora
Date: Tue, 27 Dec 2022 13:38:45 +0530
Subject: [PATCH 10/14] undo partial payment order status changes
---
classes/order/OrderHistory.php | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/classes/order/OrderHistory.php b/classes/order/OrderHistory.php
index 9d121f109..73531efe7 100644
--- a/classes/order/OrderHistory.php
+++ b/classes/order/OrderHistory.php
@@ -312,7 +312,7 @@ class OrderHistoryCore extends ObjectModel
}
// set orders as paid
- if ($new_os->paid == 1 || (Configuration::get('PS_OS_PARTIAL_PAYMENT') == $new_os->id && $new_os->logable == 1)) {
+ if ($new_os->paid == 1) {
$invoices = $order->getInvoicesCollection();
if ($order->total_paid != 0) {
$payment_method = Module::getInstanceByName($order->module);
@@ -322,13 +322,6 @@ class OrderHistoryCore extends ObjectModel
/** @var OrderInvoice $invoice */
$rest_paid = $invoice->getRestPaid();
if ($rest_paid > 0) {
- if (Configuration::get('PS_OS_PARTIAL_PAYMENT') == $new_os->id) {
- if ($order->total_paid_real < $order->advance_paid_amount) {
- $rest_paid = $order->advance_paid_amount - $order->total_paid_real;
- } else {
- break;
- }
- }
$payment = new OrderPayment();
$payment->order_reference = Tools::substr($order->reference, 0, 9);
$payment->id_currency = $order->id_currency;
From be780220dc9a09aebedae64cbffde54575001858 Mon Sep 17 00:00:00 2001
From: Shreesh Arora
Date: Tue, 27 Dec 2022 14:55:33 +0530
Subject: [PATCH 11/14] update order status name
---
classes/Hook.php | 2 +-
classes/order/OrderHistory.php | 2 +-
config/config.inc.php | 6 +++---
controllers/admin/AdminOrdersController.php | 4 ++--
controllers/front/ParentOrderController.php | 4 ++--
install/data/xml/configuration.xml | 6 +++---
install/data/xml/order_state.xml | 2 +-
install/langs/bg/data/order_state.xml | 10 +++++-----
install/langs/bn/data/order_state.xml | 10 +++++-----
install/langs/br/data/order_state.xml | 10 +++++-----
install/langs/cs/data/order_state.xml | 10 +++++-----
install/langs/de/data/order_state.xml | 10 +++++-----
install/langs/en/data/order_state.xml | 10 +++++-----
install/langs/es/data/order_state.xml | 10 +++++-----
install/langs/fa/data/order_state.xml | 10 +++++-----
install/langs/fr/data/order_state.xml | 10 +++++-----
install/langs/he/data/order_state.xml | 10 +++++-----
install/langs/hr/data/order_state.xml | 10 +++++-----
install/langs/hu/data/order_state.xml | 10 +++++-----
install/langs/id/data/order_state.xml | 8 ++++----
install/langs/it/data/order_state.xml | 8 ++++----
install/langs/lt/data/order_state.xml | 10 +++++-----
install/langs/mk/data/order_state.xml | 10 +++++-----
install/langs/nl/data/order_state.xml | 8 ++++----
install/langs/no/data/order_state.xml | 10 +++++-----
install/langs/pl/data/order_state.xml | 10 +++++-----
install/langs/pt/data/order_state.xml | 10 +++++-----
install/langs/qc/data/order_state.xml | 8 ++++----
install/langs/ro/data/order_state.xml | 10 +++++-----
install/langs/ru/data/order_state.xml | 10 +++++-----
install/langs/si/data/order_state.xml | 10 +++++-----
install/langs/sr/data/order_state.xml | 10 +++++-----
install/langs/sv/data/order_state.xml | 10 +++++-----
install/langs/tw/data/order_state.xml | 10 +++++-----
install/langs/vn/data/order_state.xml | 10 +++++-----
install/langs/zh/data/order_state.xml | 10 +++++-----
mails/en/{awaiting.html => awaiting_payment.html} | 0
mails/en/{awaiting.txt => awaiting_payment.txt} | 0
mails/en/{payment.html => payment_accepted.html} | 0
mails/en/{payment.txt => payment_accepted.txt} | 0
modules/bankwire/bankwire.php | 4 ++--
modules/bankwire/controllers/front/validation.php | 2 +-
modules/cheque/cheque.php | 4 ++--
modules/cheque/controllers/front/validation.php | 2 +-
.../classes/WkPaypalCommerceWebhook.php | 8 ++++----
.../qlopaypalcommerce/controllers/front/payment.php | 6 +++---
46 files changed, 167 insertions(+), 167 deletions(-)
rename mails/en/{awaiting.html => awaiting_payment.html} (100%)
rename mails/en/{awaiting.txt => awaiting_payment.txt} (100%)
rename mails/en/{payment.html => payment_accepted.html} (100%)
rename mails/en/{payment.txt => payment_accepted.txt} (100%)
diff --git a/classes/Hook.php b/classes/Hook.php
index 4483ced1b..356d7b5b5 100644
--- a/classes/Hook.php
+++ b/classes/Hook.php
@@ -638,7 +638,7 @@ class HookCore extends ObjectModel
$order = new Order((int)$id_order);
$new_os = new OrderState((int)$new_order_status_id, $order->id_lang);
- $return = ((int)$new_os->id == Configuration::get('PS_OS_PAYMENT')) ? Hook::exec('paymentConfirm', array('id_order' => (int)($order->id))) : true;
+ $return = ((int)$new_os->id == Configuration::get('PS_OS_PAYMENT_ACCEPTED')) ? Hook::exec('paymentConfirm', array('id_order' => (int)($order->id))) : true;
$return = Hook::exec('updateOrderStatus', array('newOrderStatus' => $new_os, 'id_order' => (int)($order->id))) && $return;
return $return;
}
diff --git a/classes/order/OrderHistory.php b/classes/order/OrderHistory.php
index 73531efe7..6ea97d187 100644
--- a/classes/order/OrderHistory.php
+++ b/classes/order/OrderHistory.php
@@ -97,7 +97,7 @@ class OrderHistoryCore extends ObjectModel
$old_os = $order->getCurrentOrderState();
// executes hook
- if (in_array($new_os->id, array(Configuration::get('PS_OS_PAYMENT'), Configuration::get('PS_OS_WS_PAYMENT')))) {
+ if (in_array($new_os->id, array(Configuration::get('PS_OS_PAYMENT_ACCEPTED'), Configuration::get('PS_OS_WS_PAYMENT')))) {
Hook::exec('actionPaymentConfirmation', array('id_order' => (int)$order->id), null, false, true, false, $order->id_shop);
}
diff --git a/config/config.inc.php b/config/config.inc.php
index 525ecb249..1c46634a1 100644
--- a/config/config.inc.php
+++ b/config/config.inc.php
@@ -240,14 +240,14 @@ $context->link = new Link($https_link, $https_link);
* USE : Configuration::get() method in order to getting the id of order status
*/
-define('_PS_OS_AWAITING_', Configuration::get('PS_OS_AWAITING'));
-define('_PS_OS_PAYMENT_', Configuration::get('PS_OS_PAYMENT'));
+define('_PS_OS_AWAITING_PAYMENT_', Configuration::get('PS_OS_AWAITING_PAYMENT'));
+define('_PS_OS_PAYMENT_ACCEPTED_', Configuration::get('PS_OS_PAYMENT_ACCEPTED'));
define('_PS_OS_PROCESSING_', Configuration::get('PS_OS_PROCESSING'));
define('_PS_OS_CANCELED_', Configuration::get('PS_OS_CANCELED'));
define('_PS_OS_REFUND_', Configuration::get('PS_OS_REFUND'));
define('_PS_OS_ERROR_', Configuration::get('PS_OS_ERROR'));
define('_PS_OS_OVERBOOKING_', Configuration::get('PS_OS_OVERBOOKING'));
-define('_PS_OS_PARTIAL_PAYMENT_', Configuration::get('PS_OS_PARTIAL_PAYMENT'));
+define('_PS_OS_PARTIAL_PAYMENT_ACCEPTED_', Configuration::get('PS_OS_PARTIAL_PAYMENT_ACCEPTED'));
if (!defined('_MEDIA_SERVER_1_')) {
define('_MEDIA_SERVER_1_', Configuration::get('PS_MEDIA_SERVER_1'));
diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php
index dbe0543b4..05395ec7b 100644
--- a/controllers/admin/AdminOrdersController.php
+++ b/controllers/admin/AdminOrdersController.php
@@ -232,8 +232,8 @@ class AdminOrdersControllerCore extends AdminController
$this->addJqueryPlugin(array('autocomplete', 'fancybox', 'typewatch'));
$defaults_order_state = array(
- 'awaiting' => (int)Configuration::get('PS_OS_AWAITING'),
- 'other' => (int)Configuration::get('PS_OS_PAYMENT'));
+ 'awaiting_payment' => (int)Configuration::get('PS_OS_AWAITING_PAYMENT'),
+ 'other' => (int)Configuration::get('PS_OS_PAYMENT_ACCEPTED'));
$payment_modules = array();
foreach (PaymentModule::getInstalledPaymentModules() as $p_module) {
$payment_modules[] = Module::getInstanceById((int)$p_module['id_module']);
diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php
index a8faded59..eb2bf17d7 100644
--- a/controllers/front/ParentOrderController.php
+++ b/controllers/front/ParentOrderController.php
@@ -182,9 +182,9 @@ class ParentOrderControllerCore extends FrontController
// order status payment accepted if no amount is pending for the booking
if ($dueAmount > 0) {
- $orderStatus = Configuration::get('PS_OS_AWAITING');
+ $orderStatus = Configuration::get('PS_OS_AWAITING_PAYMENT');
} else {
- $orderStatus = Configuration::get('PS_OS_PAYMENT');
+ $orderStatus = Configuration::get('PS_OS_PAYMENT_ACCEPTED');
}
$order->validateOrder($this->context->cart->id, $orderStatus, 0, Tools::displayError('Free order', false), null, array(), null, false, $this->context->cart->secure_key);
diff --git a/install/data/xml/configuration.xml b/install/data/xml/configuration.xml
index 52d07c2ed..145d8b8a1 100644
--- a/install/data/xml/configuration.xml
+++ b/install/data/xml/configuration.xml
@@ -377,10 +377,10 @@
1
-
+
1
-
+
2
@@ -404,7 +404,7 @@
7
-
+
8
| | | | | | | | |