From feaf2ffa6d13c26bbbc265d59a00b6d986aefd38 Mon Sep 17 00:00:00 2001 From: dilip kumar Date: Tue, 23 Mar 2021 10:57:18 +0530 Subject: [PATCH 1/2] changes added --- .../extension/payment/pp_standard.php | 28 +++++++++++++------ .../extension/payment/pp_standard.twig | 2 +- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/upload/catalog/controller/extension/payment/pp_standard.php b/upload/catalog/controller/extension/payment/pp_standard.php index ba82fbdf0a7..02f84d8497e 100644 --- a/upload/catalog/controller/extension/payment/pp_standard.php +++ b/upload/catalog/controller/extension/payment/pp_standard.php @@ -76,20 +76,30 @@ public function index() { } else { $data['discount_amount_cart'] -= $total; } + if ($this->cart->hasShipping()) { - $data['no_shipping'] = 2; + $data['no_shipping'] = 2; + $data['address_override'] = 1; + $data['first_name'] = html_entity_decode($order_info['shipping_firstname'], ENT_QUOTES, 'UTF-8'); + $data['last_name'] = html_entity_decode($order_info['shipping_lastname'], ENT_QUOTES, 'UTF-8'); + $data['address1'] = html_entity_decode($order_info['shipping_address_1'], ENT_QUOTES, 'UTF-8'); + $data['address2'] = html_entity_decode($order_info['shipping_address_2'], ENT_QUOTES, 'UTF-8'); + $data['city'] = html_entity_decode($order_info['shipping_city'], ENT_QUOTES, 'UTF-8'); + $data['zip'] = html_entity_decode($order_info['shipping_postcode'], ENT_QUOTES, 'UTF-8'); + $data['country'] = $order_info['shipping_iso_code_2']; } else { - $data['no_shipping'] = 1; + $data['no_shipping'] = 1; + $data['address_override'] = 0; + $data['first_name'] = html_entity_decode($order_info['payment_firstname'], ENT_QUOTES, 'UTF-8'); + $data['last_name'] = html_entity_decode($order_info['payment_lastname'], ENT_QUOTES, 'UTF-8'); + $data['address1'] = html_entity_decode($order_info['payment_address_1'], ENT_QUOTES, 'UTF-8'); + $data['address2'] = html_entity_decode($order_info['payment_address_2'], ENT_QUOTES, 'UTF-8'); + $data['city'] = html_entity_decode($order_info['payment_city'], ENT_QUOTES, 'UTF-8'); + $data['zip'] = html_entity_decode($order_info['payment_postcode'], ENT_QUOTES, 'UTF-8'); + $data['country'] = $order_info['payment_iso_code_2']; } $data['currency_code'] = $order_info['currency_code']; - $data['first_name'] = html_entity_decode($order_info['payment_firstname'], ENT_QUOTES, 'UTF-8'); - $data['last_name'] = html_entity_decode($order_info['payment_lastname'], ENT_QUOTES, 'UTF-8'); - $data['address1'] = html_entity_decode($order_info['payment_address_1'], ENT_QUOTES, 'UTF-8'); - $data['address2'] = html_entity_decode($order_info['payment_address_2'], ENT_QUOTES, 'UTF-8'); - $data['city'] = html_entity_decode($order_info['payment_city'], ENT_QUOTES, 'UTF-8'); - $data['zip'] = html_entity_decode($order_info['payment_postcode'], ENT_QUOTES, 'UTF-8'); - $data['country'] = $order_info['payment_iso_code_2']; $data['email'] = $order_info['email']; $data['invoice'] = $this->session->data['order_id'] . ' - ' . html_entity_decode($order_info['payment_firstname'], ENT_QUOTES, 'UTF-8') . ' ' . html_entity_decode($order_info['payment_lastname'], ENT_QUOTES, 'UTF-8'); $data['lc'] = $this->session->data['language']; diff --git a/upload/catalog/view/theme/default/template/extension/payment/pp_standard.twig b/upload/catalog/view/theme/default/template/extension/payment/pp_standard.twig index 8d2dba76de8..c0e7c33ab68 100644 --- a/upload/catalog/view/theme/default/template/extension/payment/pp_standard.twig +++ b/upload/catalog/view/theme/default/template/extension/payment/pp_standard.twig @@ -31,7 +31,7 @@ - + From 3bf9d61017b51e416a6807ce65c6162ab767b324 Mon Sep 17 00:00:00 2001 From: dilip kumar Date: Tue, 23 Mar 2021 11:06:06 +0530 Subject: [PATCH 2/2] changes added --- .../extension/payment/pp_standard.php | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/upload/catalog/controller/extension/payment/pp_standard.php b/upload/catalog/controller/extension/payment/pp_standard.php index 02f84d8497e..d78ec92cc4d 100644 --- a/upload/catalog/controller/extension/payment/pp_standard.php +++ b/upload/catalog/controller/extension/payment/pp_standard.php @@ -77,26 +77,26 @@ public function index() { $data['discount_amount_cart'] -= $total; } - if ($this->cart->hasShipping()) { - $data['no_shipping'] = 2; + if ($this->cart->hasShipping()) { + $data['no_shipping'] = 2; $data['address_override'] = 1; - $data['first_name'] = html_entity_decode($order_info['shipping_firstname'], ENT_QUOTES, 'UTF-8'); - $data['last_name'] = html_entity_decode($order_info['shipping_lastname'], ENT_QUOTES, 'UTF-8'); - $data['address1'] = html_entity_decode($order_info['shipping_address_1'], ENT_QUOTES, 'UTF-8'); - $data['address2'] = html_entity_decode($order_info['shipping_address_2'], ENT_QUOTES, 'UTF-8'); - $data['city'] = html_entity_decode($order_info['shipping_city'], ENT_QUOTES, 'UTF-8'); - $data['zip'] = html_entity_decode($order_info['shipping_postcode'], ENT_QUOTES, 'UTF-8'); - $data['country'] = $order_info['shipping_iso_code_2']; + $data['first_name'] = html_entity_decode($order_info['shipping_firstname'], ENT_QUOTES, 'UTF-8'); + $data['last_name'] = html_entity_decode($order_info['shipping_lastname'], ENT_QUOTES, 'UTF-8'); + $data['address1'] = html_entity_decode($order_info['shipping_address_1'], ENT_QUOTES, 'UTF-8'); + $data['address2'] = html_entity_decode($order_info['shipping_address_2'], ENT_QUOTES, 'UTF-8'); + $data['city'] = html_entity_decode($order_info['shipping_city'], ENT_QUOTES, 'UTF-8'); + $data['zip'] = html_entity_decode($order_info['shipping_postcode'], ENT_QUOTES, 'UTF-8'); + $data['country'] = $order_info['shipping_iso_code_2']; } else { - $data['no_shipping'] = 1; + $data['no_shipping'] = 1; $data['address_override'] = 0; - $data['first_name'] = html_entity_decode($order_info['payment_firstname'], ENT_QUOTES, 'UTF-8'); - $data['last_name'] = html_entity_decode($order_info['payment_lastname'], ENT_QUOTES, 'UTF-8'); - $data['address1'] = html_entity_decode($order_info['payment_address_1'], ENT_QUOTES, 'UTF-8'); - $data['address2'] = html_entity_decode($order_info['payment_address_2'], ENT_QUOTES, 'UTF-8'); - $data['city'] = html_entity_decode($order_info['payment_city'], ENT_QUOTES, 'UTF-8'); - $data['zip'] = html_entity_decode($order_info['payment_postcode'], ENT_QUOTES, 'UTF-8'); - $data['country'] = $order_info['payment_iso_code_2']; + $data['first_name'] = html_entity_decode($order_info['payment_firstname'], ENT_QUOTES, 'UTF-8'); + $data['last_name'] = html_entity_decode($order_info['payment_lastname'], ENT_QUOTES, 'UTF-8'); + $data['address1'] = html_entity_decode($order_info['payment_address_1'], ENT_QUOTES, 'UTF-8'); + $data['address2'] = html_entity_decode($order_info['payment_address_2'], ENT_QUOTES, 'UTF-8'); + $data['city'] = html_entity_decode($order_info['payment_city'], ENT_QUOTES, 'UTF-8'); + $data['zip'] = html_entity_decode($order_info['payment_postcode'], ENT_QUOTES, 'UTF-8'); + $data['country'] = $order_info['payment_iso_code_2']; } $data['currency_code'] = $order_info['currency_code'];