Originally Posted by
Reesy
Code:
$this->enabled = (MODULE_XYZS == 'True');
if (preg_match('SOMETHING HERE)) {
$this->enabled = false;
}
Hello,
Theres a LOT of credit card Fraud about right now
Can anyone kindly help with the one line of code above to block a payment module if its the customers first order?
PHP Code:
$this->enabled = (MODULE_XYZS == 'True');
$numberOrders = zen_count_customer_orders();
if ($numberOrders == 0) {
$this->enabled = false;
}
the method, zen_count_customer_orders, looks at all orders including cancelled orders. if that does not work for you, one might need to create a new function, or do something else.
hope that helps.
Bookmarks