Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sage Pay - England only


Nathaniel

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->title = MODULE_PAYMENT_SAGE_PAY_FORM_TEXT_TITLE;
	$this->public_title = MODULE_PAYMENT_SAGE_PAY_FORM_TEXT_PUBLIC_TITLE;
	$this->description = MODULE_PAYMENT_SAGE_PAY_FORM_TEXT_DESCRIPTION;
	$this->sort_order = MODULE_PAYMENT_SAGE_PAY_FORM_SORT_ORDER;
	$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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...