Don't show intermediate cart results
Also, move "Done:" display from users plugin to global messages
This commit is contained in:
parent
807d255b53
commit
5d8ff672f1
3 changed files with 9 additions and 9 deletions
|
@ -41,6 +41,14 @@ sub hook_cart_changed($class, $cart, @) {
|
|||
}
|
||||
}
|
||||
|
||||
sub hook_checkout($class, $cart, $user, $transaction_id, @) {
|
||||
if ($cart->changed) {
|
||||
say "Done:";
|
||||
$cart->display;
|
||||
}
|
||||
say "Transaction ID: $transaction_id";
|
||||
}
|
||||
|
||||
sub hook_abort($class, $cart, @) {
|
||||
say "\e[1;4mABORTING TRANSACTION.\e[0m";
|
||||
}
|
||||
|
|
|
@ -22,14 +22,6 @@ sub command :Tab(list,ls,shame,log,USERS) ($self, $cart, $command, @) {
|
|||
return ACCEPT;
|
||||
}
|
||||
|
||||
sub hook_checkout($class, $cart, $user, $transaction_id, @) {
|
||||
if ($cart->changed) {
|
||||
say "Done:";
|
||||
$cart->display;
|
||||
}
|
||||
say "Transaction ID: $transaction_id";
|
||||
}
|
||||
|
||||
sub list($self) {
|
||||
require RevBank::TextEditor;
|
||||
|
||||
|
|
2
revbank
2
revbank
|
@ -55,7 +55,7 @@ my $retry; # reason (text)
|
|||
my @retry; # (@accepted, $rejected, [@trailing])
|
||||
|
||||
OUTER: for (;;) {
|
||||
if (not @words or $words[0] eq "\0SEPARATOR") {
|
||||
if (not @words) {
|
||||
call_hooks("cart_changed", $cart) if $cart->changed;
|
||||
print "\n";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue