It's the right file.
Q1. Where in the code are you placing your additions?
Q2. Have you verified that the check for the customerID is matching? (I suggest changing
if (strstr($_SESSION['customers_id'],'3739')){
to
if (!strstr($_SESSION['customers_id'],'3739')){
.... This will/should cause the *opposite* to what you want... In other words if the code is working it will disable COD for everyone except customer with the id '3739'
This will verify that the toggle/switch itself is working, which in turn means there is something not working with your customerID check.
Cheers
RodG
Last edited by RodG; 15 Jun 2014 at 04:48 PM.
Perhaps I did not quite clearly explained my story.
I want to all have the ability to choose for COD.
However, I want to disable it for one customer with id specified.
In answer to your question, I place it in the next place in my file:
// $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
// only show COD if Store Pickup
if (strstr($_SESSION['shipping']['id'],'storepickup')){
$this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
}
if (strstr($_SESSION['shipping']['id'],'freeshipper')){
$this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
}
Line 23 - 30 in my file. After this i place my code.
Question 2:
I have verify my customer_id because i use my test-account in the store.
I see that I have called the wrong file.
It is not the COD, but it is the moneyorder.php.
My mistake, but when I use the following code:
With the ! than the option is not showing at allCode:if (!strstr($_SESSION['customers_id'],'3739')){ $this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'False') ? true : false); }