diff --git a/docs/upgrades/packages-7.8.2/shopping-cart-collateral-items_my-purchases-default.wgpkg b/docs/upgrades/packages-7.8.2/shopping-cart-collateral-items_my-purchases-default.wgpkg new file mode 100644 index 000000000..2e7f06819 Binary files /dev/null and b/docs/upgrades/packages-7.8.2/shopping-cart-collateral-items_my-purchases-default.wgpkg differ diff --git a/docs/upgrades/packages-7.8.2/shopping-cart-collateral-items_my-purchases-detail-default.wgpkg b/docs/upgrades/packages-7.8.2/shopping-cart-collateral-items_my-purchases-detail-default.wgpkg new file mode 100644 index 000000000..e0261ffe5 Binary files /dev/null and b/docs/upgrades/packages-7.8.2/shopping-cart-collateral-items_my-purchases-detail-default.wgpkg differ diff --git a/lib/WebGUI/Shop/TransactionItem.pm b/lib/WebGUI/Shop/TransactionItem.pm index da0a4b321..97aa66abc 100644 --- a/lib/WebGUI/Shop/TransactionItem.pm +++ b/lib/WebGUI/Shop/TransactionItem.pm @@ -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}); } diff --git a/lib/WebGUI/i18n/English/Shop.pm b/lib/WebGUI/i18n/English/Shop.pm index 7b0f30d32..018dd39cc 100644 --- a/lib/WebGUI/i18n/English/Shop.pm +++ b/lib/WebGUI/i18n/English/Shop.pm @@ -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| + }, };