Post by dharam81 » Tue Sep 02, 2014 12:05 pm

Hi,

as paypal dont support INR so how to hide paypal express checkout option if store currency is INR?

dk

Active Member

Posts

Joined
Mon Apr 30, 2012 8:26 pm

Post by pprmkr » Tue Sep 02, 2014 3:46 pm

Edit catalog/model/payment/pp_express.php

Before:

Code: Select all

$method_data = array();
Add:

Code: Select all

		if($this->currency->getCode() == 'INR') {
			$status = false;
		}

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by dharam81 » Tue Sep 02, 2014 4:08 pm

pprmkr wrote:Edit catalog/model/payment/pp_express.php

Before:

Code: Select all

$method_data = array();
Add:

Code: Select all

		if($this->currency->getCode() == 'INR') {
			$status = false;
		}
Hi, i tried exactly but get below error on checkout page.

if ($this->config->get('pp_express_total') > $total) {
$status = false;
} elseif (!$this->config->get('pp_express_geo_zone_id')) {
$status = true;
} elseif ($query->num_rows) {
$status = true;
} elseif ($this->currency->getCode() = 'INR') {
$status = FALSE;
} else {
$status = false;
}

$method_data = array();



Fatal error: Can't use method return value in write context in /home/public_html/catalog/model/payment/pp_express.php on line 92

Active Member

Posts

Joined
Mon Apr 30, 2012 8:26 pm

Post by pprmkr » Tue Sep 02, 2014 4:47 pm

Where did I mention:

Code: Select all

} elseif ($this->currency->getCode() = 'INR') {
$status = FALSE;
You cannot set any value on the function getCode() !
I did not instruct to use elseif !

Just follow my instruction and put the lines:

Code: Select all

      if($this->currency->getCode() == 'INR') {
         $status = false;
      }
Before:

Code: Select all

$method_data = array();

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by dharam81 » Thu Sep 04, 2014 4:52 am

thanks pprmkr

its working now.

you are star :)

Active Member

Posts

Joined
Mon Apr 30, 2012 8:26 pm

Post by tahirshoukat » Mon Aug 06, 2018 9:55 pm

Hi, i tried exactly but get below error on checkout page.

if ($this->config->get('pp_express_total') > $total) {
$status = false;
} elseif (!$this->config->get('pp_express_geo_zone_id')) {
$status = true;
} elseif ($query->num_rows) {
$status = true;
} else {
$status = false;
}

if($this->currency->getCode() == 'INR') {
$status = false;
}

$method_data = array();

Fatal error: Call to undefined method Cart\Currency::getCode() in /home/sanajewe/public_html/vqmod/vqcache/vq2-catalog_model_payment_pp_express.php on line 76

Newbie

Posts

Joined
Thu Jan 18, 2018 4:48 pm

Post by straightlight » Mon Aug 06, 2018 11:14 pm

Replace:

Code: Select all

if($this->currency->getCode() == 'INR') {
with:

Code: Select all

if (strtoupper($this->config->get('config_currency')) == 'INR') {

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by tahirshoukat » Thu Aug 09, 2018 8:50 pm

Thanks buddy it's worked perfectly! but now i have installed this Extension https://www.opencart.com/index.php?rout ... load_id=56 and it's shows again.

I know this is because of XML file i uploaded for "PayPal payment Standard & Express in local currency" can you pls guide me where i have to change the code in my xml file.

The file is Attached below:

Newbie

Posts

Joined
Thu Jan 18, 2018 4:48 pm

Post by straightlight » Fri Aug 10, 2018 4:53 am

Contact the extension developer to resolved this issue.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 8 guests