Jump to content

Sage Pay - England only

Recommended Posts

Hello - I am trying to get Sage pay to only show for people that use the English section of our website - I have managed to make this happen for another payment method (Buckaroo) - Buckaroo only shows for our customers in the Netherlands.


However - When I insert the code it makes it NOT show for all countries - does anyone have an idea why? Code below:

// class constructor    
	function sage_pay_form() 
	global $order;
	$this->signature = 'sage_pay|sage_pay_form|1.2|2.2';
	$this->code = 'sage_pay_form';
	$this->enabled = ((MODULE_PAYMENT_SAGE_PAY_FORM_STATUS == 'True') ? true : false);
	if (isset($order) && $order->info["currency"] != 'GBP') {
			$this->enabled = false;
		if (isset($order) && $order->delivery["country"]['title'] != 'English') {$this->enabled = false;
	// Disable method if shipping costs not calculated yet
	if ($order->info['shipping_to_quote']){
		$this->enabled = false;	

the Currency or Delivery section should be ok - included both for scope.


Thanks for the help.

Edited by Nathaniel

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now