Do provide final cart when no pending cart was ever shown...
This commit is contained in:
parent
f4eb91a22b
commit
bb8c52b593
3 changed files with 6 additions and 3 deletions
|
@ -147,7 +147,6 @@ sub user {
|
||||||
croak "User can only be set once" if defined $self->{user};
|
croak "User can only be set once" if defined $self->{user};
|
||||||
|
|
||||||
$self->{user} = $new;
|
$self->{user} = $new;
|
||||||
$self->attribute('changed', 1);
|
|
||||||
$_->{description} =~ s/\$you/$new/g for $self, @{ $self->{contras} };
|
$_->{description} =~ s/\$you/$new/g for $self, @{ $self->{contras} };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,10 @@ sub command :Tab(list,ls,shame,USERS) {
|
||||||
sub hook_checkout {
|
sub hook_checkout {
|
||||||
my ($class, $cart, $user, $transaction_id) = @_;
|
my ($class, $cart, $user, $transaction_id) = @_;
|
||||||
|
|
||||||
|
if ($cart->changed) {
|
||||||
|
say "Done:";
|
||||||
|
$cart->display;
|
||||||
|
}
|
||||||
say "Transaction ID: $transaction_id";
|
say "Transaction ID: $transaction_id";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
revbank
4
revbank
|
@ -127,8 +127,8 @@ call_hooks("startup");
|
||||||
OUTER: for (;;) {
|
OUTER: for (;;) {
|
||||||
print "\n" if not @words;
|
print "\n" if not @words;
|
||||||
|
|
||||||
if (not @words and $cart->changed) {
|
if (not @words) {
|
||||||
call_hooks("cart_changed", $cart);
|
call_hooks("cart_changed", $cart) if $cart->changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $split_input = 1;
|
my $split_input = 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue