Closed (works as designed)
Project:
Ubercart
Version:
6.x-2.0-rc7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Oct 2009 at 16:52 UTC
Updated:
21 Nov 2009 at 12:15 UTC
Please check my comment about the missing "break" in the code below (uc_payment_pack.module)
function uc_payment_method_cod($op, &$arg1) {
switch ($op) {
case 'order-submit':
if ($arg1->payment_method == 'cod' &&
($max = variable_get('uc_cod_max_order', 0)) > 0 &&
is_numeric($max) &&
$arg1->order_total > $max) {
$result[] = array(
'pass' => FALSE,
'message' => t('Your final order total exceeds the maximum for COD payment. Please go back and select a different method of payment.')
);
$_SESSION['expanded_panes'][] = 'payment';
return $result;
}
// I guess a "break;" is missing from here!
case 'order-save':
db_query("DELETE FROM {uc_payment_cod} WHERE order_id = %d", $arg1->order_id);
db_query("INSERT INTO {uc_payment_cod} VALUES (%d, %d, %d, %d)",
$arg1->order_id, $arg1->payment_details['delivery_month'],
$arg1->payment_details['delivery_day'], $arg1->payment_details['delivery_year']);
break;
Comments
Comment #1
Island Usurper commentedActually, I think it's meant to fall through there, but only because of the DELETE query in the 'order-save' part. This means that both order-submit and order-save can be run, but only one payment is actually entered on the order.
Comment #2
gabor_h commentedYes, you are right. Thanks.