I was wondering is there a way i can modify the cod.php file so that you are not able to select cash on delivery if the order is above thirty pounds ?
I was wondering is there a way i can modify the cod.php file so that you are not able to select cash on delivery if the order is above thirty pounds ?
if anyone could help that would be great !!!! ive been trying to solve this for a wile really need it to be done !! :)
Try this modification havent tested it but it should work.
Replace lines 66 - 72
with this codeCode:// disable the module if the order only contains virtual products if ($this->enabled == true) { if ($order->content_type != 'physical') { $this->enabled = false; } } }
($totalsum should be in your main currency, $transaction_amount is the currency selected by the customer)
Code:$my_currency = select_pp_currency(); $totalsum = $order->info['total']; $transaction_amount = ($totalsum * $currencies->get_value($my_currency)); // disable the module if the order only contains virtual products OR order total is more than 30 if ($this->enabled == true) { if ($order->content_type != 'physical') { $this->enabled = false; } elseif ($totalsum > 30) { $this->enabled = false; } } }
Visit Qacaq.com, your Online Jewelry Store in Malaysia .
Qacaq.com Australia - Your Gemstone Jewelry Store in Australia was launched.
thanks for the response :)
i did the modifications however the page just goes blank now so i think there is something small with the code causing the problem any ideas ??
it might be my eyes, but looks like there is one extra squigly bracket ....that might be the problem
Code:$newd = ($_SESSION['cart']->show_total()); // disable the module if the order only contains virtual products OR order total is more than 30 if ($this->enabled == true) { if ($order->content_type != 'physical') { $this->enabled = false; } elseif ($newd > 30) { $this->enabled = false; } } }
got it working with a small mod thankyou :)
Bookmarks