New command: 'cash' to fake a checkout without any user paying for it.
This commit is contained in:
parent
c756ebe08b
commit
05544439b9
1 changed files with 12 additions and 1 deletions
|
@ -1,6 +1,17 @@
|
|||
#!perl
|
||||
|
||||
sub command { NEXT }
|
||||
HELP "cash" => "Checkout without a user account";
|
||||
|
||||
sub command {
|
||||
my ($self, $cart, $command) = @_;
|
||||
|
||||
return NEXT if $command ne 'cash';
|
||||
|
||||
call_hooks("checkout", $cart, 'cash', 0); # Fake checkout
|
||||
$cart->empty;
|
||||
|
||||
return ACCEPT;
|
||||
}
|
||||
|
||||
sub hook_checkout {
|
||||
my ($class, $cart, $user, $transaction_id) = @_;
|
||||
|
|
Loading…
Add table
Reference in a new issue