Extra newline
This commit is contained in:
parent
a2fd94241a
commit
32470ff92b
1 changed files with 7 additions and 0 deletions
|
@ -171,6 +171,7 @@ sub hook_checkout_prepare($class, $cart, $username, $transaction_id, @) {
|
||||||
+ $avail == 0 ? "0 deposit tokens"
|
+ $avail == 0 ? "0 deposit tokens"
|
||||||
: $avail == 1 ? "only 1 deposit token"
|
: $avail == 1 ? "only 1 deposit token"
|
||||||
: "only $avail deposit tokens";
|
: "only $avail deposit tokens";
|
||||||
|
|
||||||
_warn "you have $only of type $type ($addon->{description}).";
|
_warn "you have $only of type $type ($addon->{description}).";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,6 +179,12 @@ sub hook_checkout_prepare($class, $cart, $username, $transaction_id, @) {
|
||||||
_write $username, $tokens_by_type, $is_new if $tokens_changed;
|
_write $username, $tokens_by_type, $is_new if $tokens_changed;
|
||||||
|
|
||||||
return ABORT if %warnings_by_type and not $cart->size;
|
return ABORT if %warnings_by_type and not $cart->size;
|
||||||
|
|
||||||
|
if (%warnings_by_type and $cart->changed) { # resets 'changed' attr.
|
||||||
|
print "\n"; # Between warnings and transaction overview
|
||||||
|
$cart->changed(1); # restore attribute
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue