Ajeh:
Find the setting for the $this->enabled in the Payment module, such as, for example, PayPal Express:
/includes/modules/payment/paypalwpp.php
you would add the code in RED to disable the PayPal Express payment module when Store Pickup is selected ...
$this->enabled = (MODULE_PAYMENT_PAYPALWPP_STATUS == 'True');
[B] if (preg_match('#(storepickup)#i', $_SESSION['shipping']['id'])) {
$this->enabled = false;
}
[/B]
>
> Note: PayPal Express is a much more reliable payment method than PayPal IPN ...
Please forgive me, I'm going to take a stab at reversing the logic for my needs... I would like to hide cod for all the shipping options, and ONLY show it when a local pickup is chosen.
Would this be what I would do (I'm using 1.5.4 if that matters):
/includes/modules/payment/cod.php
$this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
[B] if (preg_match('#(storepickup)#i', $_SESSION['shipping']['id'])) {
$this->enabled = true;
}
[/B]
I "Think" I'm reversing the logic since I'm putting the code into the cod module, and hopefully only enabling it if the storepickup is chosen... And I copied the $this statement from my current cod.php file (which looked a little different then the quoted one, I'm guessing changes for 1.5.4?). In any case before I go hacking away and screwing something up, the question is if the above "should" work?