Originally Posted by
mdo82
Maybe I should start a new topic for clarity?
No, it's probably best to leave it here,
Originally Posted by
mdo82
If I put the following code in my file:
Code:
if (strstr($_SESSION['customers_id'],'3739')){
$this->enabled = false;
}
The option for selecting "moneyorder" is not showing at all if i put (!strstr in the code.
Without the !strstr the option is showing for everyone.
Including for customer 3739.
This is telling me that the 'if' check isn't functioning as expected.
Try this:
Find the line of code that reads:
Code:
$this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True') ? true : false);
Then add the following code immediately after it
Code:
if(($_SESSION['customer_id']) == "3739") $this->enabled = false ;
I've confirmed/verified that this works. There is no need to use 'strstr' because you are looking for an exact match. If you do use the 'strstr' ) and assuming it works) it would *also* match customerID's '123739' and '3739123' as well as all other customers with '3739' as *part* (substring) of their Id, which *isn't* what you want.
Cheers
RodG
Bookmarks