Make display of failed transactions more obvious in the Account/Shop plugin.
This commit is contained in:
parent
b8b7dc2875
commit
0ee4a7fa90
4 changed files with 21 additions and 3 deletions
Binary file not shown.
Binary file not shown.
|
|
@ -265,7 +265,8 @@ The status of this item. The default is 'NotShipped'. Other statuses include: Ca
|
|||
sub update {
|
||||
my ($self, $newProperties) = @_;
|
||||
my $id = id $self;
|
||||
my $session = $self->transaction->session;
|
||||
my $transaction = $self->transaction;
|
||||
my $session = $transaction->session;
|
||||
my $taxDriver = WebGUI::Shop::Tax->getDriver( $session );
|
||||
|
||||
if (exists $newProperties->{item}) {
|
||||
|
|
@ -296,7 +297,7 @@ sub update {
|
|||
$newProperties->{ taxConfiguration } =
|
||||
to_json( $taxDriver->getTransactionTaxData( $sku, $address ) || '{}' );
|
||||
|
||||
unless ($sku->isShippingRequired) {
|
||||
if (!$sku->isShippingRequired && $transaction->get('isSuccessful')) {
|
||||
$newProperties->{orderStatus} = 'Shipped';
|
||||
}
|
||||
}
|
||||
|
|
@ -310,7 +311,7 @@ sub update {
|
|||
if (exists $newProperties->{options} && ref($newProperties->{options}) eq "HASH") {
|
||||
$properties{$id}{options} = JSON->new->encode($newProperties->{options});
|
||||
}
|
||||
$properties{$id}{lastUpdated} = WebGUI::DateTime->new($self->transaction->session,time())->toDatabase;
|
||||
$properties{$id}{lastUpdated} = WebGUI::DateTime->new($session,time())->toDatabase;
|
||||
$self->transaction->session->db->setRow("transactionItem","itemId",$properties{$id});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -621,6 +621,12 @@ our $I18N = {
|
|||
context => q|field label|
|
||||
},
|
||||
|
||||
'Status' => {
|
||||
message => q|Status|,
|
||||
lastUpdated => 0,
|
||||
context => q|Whether a transaction was successful, or not.|
|
||||
},
|
||||
|
||||
'payment method' => {
|
||||
message => q|Payment Method|,
|
||||
lastUpdated => 0,
|
||||
|
|
@ -1695,6 +1701,17 @@ our $I18N = {
|
|||
context => q|commerce setting help|
|
||||
},
|
||||
|
||||
'Success' => {
|
||||
message => q|Success|,
|
||||
lastUpdated => 0,
|
||||
context => q|commerce setting help|
|
||||
},
|
||||
|
||||
'Failed' => {
|
||||
message => q|Failure|,
|
||||
lastUpdated => 0,
|
||||
context => q|commerce setting help|
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue