mostly working transaction manager

fixed many bugs
This commit is contained in:
JT Smith 2008-05-19 22:17:08 +00:00
parent 6174d6995e
commit ca9278190e
10 changed files with 211 additions and 89 deletions

View file

@ -532,8 +532,8 @@ sub convertTransactionLog {
shippingCode varchar(35), shippingCode varchar(35),
shippingPhoneNumber varchar(35), shippingPhoneNumber varchar(35),
shippingTrackingNumber varchar(255), shippingTrackingNumber varchar(255),
shippingStatus varchar(35) not null default 'NotShipped', orderStatus varchar(35) not null default 'NotShipped',
shippingDate datetime, lastUpdated datetime,
quantity int not null default 1, quantity int not null default 1,
price float, price float,
vendorId varchar(22) binary not null default 'defaultvendor000000000', vendorId varchar(22) binary not null default 'defaultvendor000000000',
@ -566,8 +566,8 @@ sub convertTransactionLog {
configuredTitle => $oldItem->{itemName}, configuredTitle => $oldItem->{itemName},
options => '{}', options => '{}',
shippingTrackingNumber => $oldTranny->{trackingNumber}, shippingTrackingNumber => $oldTranny->{trackingNumber},
shippingStatus => $oldTranny->{shippingStatus}, orderStatus => $oldTranny->{shippingStatus},
shippingDate => $oldTranny->{completionDate}, lastUpdated => $oldTranny->{completionDate},
quantity => $oldItem->{quantity}, quantity => $oldItem->{quantity},
price => $oldItem->{amount}, price => $oldItem->{amount},
vendorId => "defaultvendor000000000", vendorId => "defaultvendor000000000",

View file

@ -63,7 +63,9 @@ The content handler for this package.
sub handler { sub handler {
my ($session) = @_; my ($session) = @_;
my $output = undef; my $output = undef;
my $function = "www_".$session->form->get("shop"); my $shop = $session->form->get("shop");
return $output unless ($shop);
my $function = "www_".$shop;
if ($function ne "www_" && (my $sub = __PACKAGE__->can($function))) { if ($function ne "www_" && (my $sub = __PACKAGE__->can($function))) {
$output = $sub->($session); $output = $sub->($session);
} }

View file

@ -773,9 +773,7 @@ sub www_viewItem {
if (WebGUI::Error->caught()) { if (WebGUI::Error->caught()) {
return $self->www_view; return $self->www_view;
} }
my $sku = $item->getSku; return $item->getSku->www_view;
$sku->applyOptions($item->get("options"));
return $sku->www_view;
} }

View file

@ -160,7 +160,6 @@ Returns the WebGUI::Shop::Address object that is attached to this item for shipp
sub getShippingAddress { sub getShippingAddress {
my $self = shift; my $self = shift;
my $addressId = $self->get("shippingAddressId") || $self->cart->get("shippingAddressId"); my $addressId = $self->get("shippingAddressId") || $self->cart->get("shippingAddressId");
$self->cart->session->errorHandler->warn("address id: ". $addressId);
return $self->cart->getAddressBook->getAddress($addressId); return $self->cart->getAddressBook->getAddress($addressId);
} }

View file

@ -496,7 +496,7 @@ sub processTransaction {
my $cart = $self->getCart; my $cart = $self->getCart;
my $transaction = WebGUI::Shop::Transaction->create($self->session,{ my $transaction = WebGUI::Shop::Transaction->create($self->session,{
paymentMethod => $self, paymentMethod => $self,
# paymentAddress => $paymentAddress, paymentAddress => $paymentAddress,
cart => $cart, cart => $cart,
}); });
my ($success, $transactionCode, $statusCode, $statusMessage) = $self->processPayment( $transaction ); my ($success, $transactionCode, $statusCode, $statusMessage) = $self->processPayment( $transaction );

View file

@ -18,15 +18,6 @@ sub canCheckoutCart {
return 1; return 1;
} }
#-------------------------------------------------------------------
sub credentialsOkay {
my $self = shift;
return 0 unless $self->getBillingAddress;
return 1;
}
#------------------------------------------------------------------- #-------------------------------------------------------------------
sub definition { sub definition {
@ -73,15 +64,11 @@ sub definition {
} }
#------------------------------------------------------------------- #-------------------------------------------------------------------
sub getBillingAddress { sub getAddress {
my $self = shift; my ($self, $addressId) = @_;
my $session = $self->session;
my $addressId = $session->scratch->get('ShopPayDriverCash_billingAddress');
if ($addressId) { if ($addressId) {
return $self->getCart->getAddressBook->getAddress( $addressId ); return $self->getCart->getAddressBook->getAddress( $addressId );
} }
# No billing address selected yet so return undef. # No billing address selected yet so return undef.
return undef; return undef;
} }
@ -154,9 +141,9 @@ sub www_displayStatus {
#------------------------------------------------------------------- #-------------------------------------------------------------------
sub www_getCredentials { sub www_getCredentials {
my $self = shift; my ($self, $addressId) = @_;
my $session = $self->session; my $session = $self->session;
$addressId = $session->form->process('addressId') if ($addressId eq "");
# Generate the json string that defines where the address book posts the selected address # Generate the json string that defines where the address book posts the selected address
my $callbackParams = { my $callbackParams = {
url => $session->url->page, url => $session->url->page,
@ -178,11 +165,7 @@ sub www_getCredentials {
. WebGUI::Form::formFooter( $session); . WebGUI::Form::formFooter( $session);
# Get billing address # Get billing address
my $billingAddress = eval { $self->getBillingAddress }; my $billingAddress = eval { $self->getAddress($addressId) };
if ( WebGUI::Error->caught('WebGUI::Error::ObjectNotFound') ) {
# The stored address id is invalid, so remove it
$session->scratch->delete('ShopPayDriverCash_billingAddress');
}
my $billingAddressHtml; my $billingAddressHtml;
if ($billingAddress) { if ($billingAddress) {
@ -192,6 +175,7 @@ sub www_getCredentials {
# Generate 'Proceed' button # Generate 'Proceed' button
my $proceedButton = WebGUI::Form::formHeader( $session ) my $proceedButton = WebGUI::Form::formHeader( $session )
. $self->getDoFormTags('pay') . $self->getDoFormTags('pay')
. WebGUI::Form::hidden($session, {name=>"addressId", value=>$addressId})
. WebGUI::Form::submit( $session, { value => 'Pay' } ) . WebGUI::Form::submit( $session, { value => 'Pay' } )
. WebGUI::Form::formFooter( $session); . WebGUI::Form::formFooter( $session);
@ -211,7 +195,8 @@ sub www_pay {
return "" unless $self->canCheckoutCart; return "" unless $self->canCheckoutCart;
# Make sure all required credentials have been supplied # Make sure all required credentials have been supplied
return $self->www_getCredentials unless $self->credentialsOkay; my $billingAddress = $self->getAddress( $session->form->process('addressId') );
return $self->www_getCredentials unless $billingAddress;
# Generate a receipt and send it if enabled. # Generate a receipt and send it if enabled.
if ( $self->get('sendReceipt') ) { if ( $self->get('sendReceipt') ) {
@ -233,7 +218,6 @@ sub www_pay {
$receipt->queue; $receipt->queue;
} }
my $billingAddress = $self->getBillingAddress( $session->scratch->get( 'ShopPayDriverCash_billingAddressId' ) );
# Complete the transaction # Complete the transaction
my $transaction = $self->processTransaction( $billingAddress ); my $transaction = $self->processTransaction( $billingAddress );
@ -246,10 +230,7 @@ sub www_pay {
sub www_setBillingAddress { sub www_setBillingAddress {
my $self = shift; my $self = shift;
my $session = $self->session; my $session = $self->session;
return $self->www_getCredentials($session->form->process('addressId'));
$session->scratch->set( 'ShopPayDriverCash_billingAddress', $session->form->process('addressId') );
return $self->www_getCredentials;
} }
1; 1;

View file

@ -124,22 +124,22 @@ sub _generatePaymentRequestXML {
# Check if recurring payments have a unique transaction # Check if recurring payments have a unique transaction
#### TODO: Throw the correct Exception Class #### TODO: Throw the correct Exception Class
WebGUI::Error::InvalidParam->throw( error => 'Recurring transaction mixed with other transactions' ) WebGUI::Error::InvalidParam->throw( error => 'Recurring transaction mixed with other transactions' )
if ( (scalar @{ $items } > 1) && (grep { $_->get('isRecurring') } @{ $items }) ); if ( (scalar @{ $items } > 1) && (grep { $_->getSku->isRecurring } @{ $items }) );
foreach my $item (@{ $transaction->getItems }) { foreach my $item (@{ $items }) {
my $sku = $item->getSku; my $sku = $item->getSku;
####TODO: How to handle intial payment? ####TODO: How to handle intial payment?
if ( $item->get('isRecurring') ) { if ( $sku->isRecurring ) {
$recurringData->{ RecurRecipe } = $self->resolveRecurRecipe( $sku->get('recurInterval') ); $recurringData->{ RecurRecipe } = $self->resolveRecurRecipe( $sku->getRecurInterval );
$recurringData->{ RecurReps } = 99999; $recurringData->{ RecurReps } = 99999;
$recurringData->{ RecurTotal } = $sku->getPrice; $recurringData->{ RecurTotal } = $item->get('price');
$recurringData->{ RecurDesc } = $sku->get('title'); $recurringData->{ RecurDesc } = $item->get('configuredTitle');
} }
push @{ $orderItems->{ Item } }, { push @{ $orderItems->{ Item } }, {
Description => $sku->get('title'), Description => $item->get('configuredTitle'),
Cost => $sku->getPrice, Cost => $item->get('price'),
Qty => $item->get('quantity'), Qty => $item->get('quantity'),
} }
} }

View file

@ -649,8 +649,11 @@ sub www_view {
#render page #render page
my $output = q{ my $output = q{
<style type="text/css"> <style type="text/css">
#transactionDetail th { vertical-align: top; margin-right: 10px; border-right: 1px solid #eeeeee; text-align: left;} .transactionDetail {float: left; margin-right: 25px;}
.smallAddress { font-size: 60%; } .transactionDetail th { vertical-align: top; margin-right: 10px; border-right: 1px solid #eeeeee; text-align: left;}
.smallAddress { font-size: 50%; }
.successfulTransaction { color: #008000; };
.failedTransaction { color: #800000; };
</style>}; </style>};
unless ($print) { unless ($print) {
$output .= q{ $output .= q{
@ -658,13 +661,36 @@ sub www_view {
}; };
} }
$output .= q{ $output .= q{
<table id="transactionDetail"> <table class="transactionDetail">
<tr> <tr>
<th>}. $i18n->get("transaction id") .q{</th><td>}. $transaction->getId .q{</td> <th>}. $i18n->get("transaction id") .q{</th><td>}. $transaction->getId . '<br />'. $transaction->get('transactionCode').q{</td>
</tr> </tr>
<tr> <tr>
<th>}. $i18n->get("order number") .q{</th><td>}. $transaction->get('orderNumber') .q{</td> <th>}. $i18n->get("order number") .q{</th><td>}. $transaction->get('orderNumber') .q{</td>
</tr> </tr>
<tr>
<th>}. $i18n->get("date") .q{</th><td>}. $transaction->get('dateOfPurchase') .q{</td>
</tr>
<tr>
<th>}. $i18n->get("username") .q{</th><td><a href="}.$url->page('op=editUser;uid='.$transaction->get('userId')).q{">}. $transaction->get('username') .q{</a></td>
</tr>
<tr>
<th>}. $i18n->get("price") .q{</th><td><b>}. sprintf("%.2f", $transaction->get('amount')) .q{</b></td>
</tr>
<tr>
<th>}. $i18n->get("in shop credit used") .q{</th><td>}. sprintf("%.2f", $transaction->get('shopCreditDeduction')) .q{</td>
</tr>
<tr>
<th>}. $i18n->get("taxes") .q{</th><td>}. sprintf("%.2f", $transaction->get('taxes')) .q{</td>
</tr>
</table>
<table class="transactionDetail">
<tr>
<th>}. $i18n->get("shipping method") .q{</th><td><a href="}.$url->page('shop=ship;method=do;do=edit;driverId='.$transaction->get('shippingDriverId')).q{">}. $transaction->get('shippingDriverLabel') .q{</a></td>
</tr>
<tr>
<th>}. $i18n->get("shipping amount") .q{</th><td>}. sprintf("%.2f", $transaction->get('shippingPrice')) .q{</td>
</tr>
<tr> <tr>
<th>}. $i18n->get("shipping address") .q{</th><td>}. $transaction->formatAddress({ <th>}. $i18n->get("shipping address") .q{</th><td>}. $transaction->formatAddress({
name => $transaction->get('shippingAddressName'), name => $transaction->get('shippingAddressName'),
@ -678,6 +704,14 @@ sub www_view {
phoneNumber => $transaction->get('shippingPhoneNumber'), phoneNumber => $transaction->get('shippingPhoneNumber'),
}) .q{</td> }) .q{</td>
</tr> </tr>
</table>
<table class="transactionDetail">
<tr>
<th>}. $i18n->get("payment method") .q{</th><td><a href="}.$url->page('shop=pay;method=do;do=edit;paymentGatewayId='.$transaction->get('paymentDriverId')).q{">}. $transaction->get('paymentDriverLabel') .q{</a></td>
</tr>
<tr>
<th>}. $i18n->get("status message") .q{</th><td class="}.(($transaction->get("isSuccessful")) ? 'successfulTransaction' : 'failedTransaction' ).q{">}. $transaction->get('statusCode') .': '.$transaction->get('statusMessage').q{</td>
</tr>
<tr> <tr>
<th>}. $i18n->get("payment address") .q{</th><td>}. $transaction->formatAddress({ <th>}. $i18n->get("payment address") .q{</th><td>}. $transaction->formatAddress({
name => $transaction->get('paymentAddressName'), name => $transaction->get('paymentAddressName'),
@ -691,10 +725,8 @@ sub www_view {
phoneNumber => $transaction->get('paymentPhoneNumber'), phoneNumber => $transaction->get('paymentPhoneNumber'),
}) .q{</td> }) .q{</td>
</tr> </tr>
<tr>
<th>}. $i18n->get("price") .q{</th><td>}. sprintf("%.2f", $transaction->get('amount')) .q{</td>
</tr>
</table> </table>
<div style="clear:both;"></div>
}; };
# item detail # item detail
@ -702,13 +734,14 @@ sub www_view {
<div id="transactionItemWrapper" class=" yui-skin-sam"> <table id="transactionItems"> <div id="transactionItemWrapper" class=" yui-skin-sam"> <table id="transactionItems">
<thead> <thead>
<tr> <tr>
<th>Item</th> <th>}.$i18n->get('date').q{</th>
<th>Price</th> <th>}.$i18n->get('item').q{</th>
<th>Quantity</th> <th>}.$i18n->get('price').q{</th>
<th>Status</th> <th>}.$i18n->get('quantity').q{</th>
<th>Address</th> <th>}.$i18n->get('shipping address').q{</th>
<th>Date</th> <th>}.$i18n->get('order status').q{</th>
<th>Tracking #</th> <th>}.$i18n->get('tracking number').q{</th>
<th>}.$i18n->get('manage').q{</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -717,10 +750,11 @@ sub www_view {
my $sku = $item->getSku; my $sku = $item->getSku;
$output .= q{ $output .= q{
<tr> <tr>
<form>
<td>}.$item->get('lastUpdated').q{</td>
<td><a href="}.$sku->getUrl('shop=transaction;method=viewItem;transactionId='.$transaction->getId.';itemId='.$item->getId).q{">}.$item->get('configuredTitle').q{</a></td> <td><a href="}.$sku->getUrl('shop=transaction;method=viewItem;transactionId='.$transaction->getId.';itemId='.$item->getId).q{">}.$item->get('configuredTitle').q{</a></td>
<td>}.$transaction->formatCurrency($item->get('price')).q{</td> <td>}.$transaction->formatCurrency($item->get('price')).q{</td>
<td>}.$item->get('quantity').q{</td> <td>}.$item->get('quantity').q{</td>
<td>}.$item->get('shippingStatus').q{</td>
}; };
if ($item->get('shippingAddressId') eq $transaction->get('shippingAddressId')) { if ($item->get('shippingAddressId') eq $transaction->get('shippingAddressId')) {
$output .= q{<td></td>}; $output .= q{<td></td>};
@ -740,9 +774,26 @@ sub www_view {
}) .q{</td> }) .q{</td>
}; };
} }
if ($item->get('orderStatus') eq 'Cancelled') {
$output .= q{<td>}.$i18n->get($item->get('orderStatus')).q{</td>};
}
else {
$output .= q{<td>}.WebGUI::Form::selectBox($session, {
name => "orderStatus",
value => $item->get('orderStatus'),
options => {
NotShipped => $i18n->get('NotShipped'),
Shipped => $i18n->get('Shipped'),
Backordered => $i18n->get('Backordered'),
},
}).q{</td>};
}
$output .= q{ $output .= q{
<td>}.$item->get('shippingDate').q{</td> <td>}.WebGUI::Form::text($session, {name=>"shippingTrackingNumber", size=>15, value=>$item->get('shippingTrackingNumber')}).q{</td>
<td>}.$item->get('shippingTrackingNumber').q{</td> <td>}.WebGUI::Form::submit($session, {value=>$i18n->get('update'), extras=>' '})
.WebGUI::Form::submit($session, {value=>$i18n->get('refund'), extras=>q|onclick="this.form.method.value='refundItem'"|})
.q{</td>
</form>
</tr> </tr>
}; };
} }
@ -752,40 +803,41 @@ sub www_view {
}; };
# render data table # render data table
$output .= <<STOP; $output .= q|
<script type="text/javascript"> <script type="text/javascript">
YAHOO.util.Event.addListener(window, "load", function() { YAHOO.util.Event.addListener(window, "load", function() {
YAHOO.example.EnhanceFromMarkup = new function() { YAHOO.example.EnhanceFromMarkup = new function() {
var myColumnDefs = [ var myColumnDefs = [
{key:"item",sortable:true}, {key:"date",sortable:true,label:'|.$i18n->get('date').q|'},
{key:"price",sortable:true}, {key:"item",sortable:true,label:'|.$i18n->get('item').q|'},
{key:"quantity",formatter:YAHOO.widget.DataTable.formatNumber,sortable:true}, {key:"price",sortable:true,label:'|.$i18n->get('price').q|'},
{key:"status",sortable:true}, {key:"quantity",formatter:YAHOO.widget.DataTable.formatNumber,sortable:true,label:'|.$i18n->get('quantity').q|'},
{key:"address"}, {key:"address",label:'|.$i18n->get('shipping address').q|'},
{key:"date",sortable:true,formatter:YAHOO.widget.DataTable.formatDate}, {key:"status",sortable:true,label:'|.$i18n->get('order status').q|'},
{key:"tracking"} {key:"tracking",label:'|.$i18n->get('tracking number').q|'},
{key:"manage",label:'|.$i18n->get('manage').q|'}
]; ];
this.myDataSource = new YAHOO.util.DataSource(YAHOO.util.Dom.get("transactionItems")); this.myDataSource = new YAHOO.util.DataSource(YAHOO.util.Dom.get("transactionItems"));
this.myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; this.myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
this.myDataSource.responseSchema = { this.myDataSource.responseSchema = {
fields: [ fields: [
{key:"date"},
{key:"item"}, {key:"item"},
{key:"price", parser:this.parseNumberFromCurrency}, {key:"price", parser:this.parseNumberFromCurrency},
{key:"quantity", parser:YAHOO.util.DataSource.parseNumber}, {key:"quantity", parser:YAHOO.util.DataSource.parseNumber},
{key:"status"},
{key:"address"}, {key:"address"},
{key:"date", parser:YAHOO.util.DataSource.parseDate}, {key:"status"},
{key:"tracking"} {key:"tracking"},
{key:"manage"}
] ]
}; };
this.myDataTable = new YAHOO.widget.DataTable("transactionItemWrapper", myColumnDefs, this.myDataSource,{}); this.myDataTable = new YAHOO.widget.DataTable("transactionItemWrapper", myColumnDefs, this.myDataSource,{});
}; };
}); });
</script> </script>
STOP |;
# send output # send output
if ($print) { if ($print) {
@ -794,4 +846,23 @@ STOP
return $admin->getAdminConsole->render($output, $i18n->get('transactions')); return $admin->getAdminConsole->render($output, $i18n->get('transactions'));
} }
#-------------------------------------------------------------------
=head2 www_viewItem ( )
Displays the configured item.
=cut
sub www_viewItem {
my ($class, $session) = @_;
my $self = __PACKAGE__->new($session, $session->form->get("transactionId"));
my $item = eval { $self->getItem($session->form->get("itemId")) };
if (WebGUI::Error->caught()) {
return $class->www_view($session);
}
return $item->getSku->www_view;
}
1; 1;

View file

@ -149,7 +149,7 @@ sub issueCredit {
my $credit = WebGUI::Shop::Credit->new($self->transaction->session, $self->transaction->get('userId')); my $credit = WebGUI::Shop::Credit->new($self->transaction->session, $self->transaction->get('userId'));
$credit->adjust($self->get('price'), "Issued credit on sku ".$self->get('assetId')." for transaction item ".$self->getId." on transaction ".$self->transaction->getId); $credit->adjust($self->get('price'), "Issued credit on sku ".$self->get('assetId')." for transaction item ".$self->getId." on transaction ".$self->transaction->getId);
$self->getSku->onRefund($self); $self->getSku->onRefund($self);
$self->update({shippingStatus=>'Cancelled'}); $self->update({orderStatus=>'Cancelled'});
} }
#------------------------------------------------------------------- #-------------------------------------------------------------------
@ -251,9 +251,9 @@ shippingCode shippingPhoneNumber quantity price vendorId
A tracking number that is used by the shipping method for this transaction. A tracking number that is used by the shipping method for this transaction.
=head4 shippingStatus =head4 orderStatus
The status of this item. The default is 'NotShipped'. Other statuses include: Cancelled, BackOrdered, Shipped The status of this item. The default is 'NotShipped'. Other statuses include: Cancelled, Backordered, Shipped
=cut =cut
@ -266,9 +266,8 @@ sub update {
$newProperties->{ options } = $sku->getOptions; $newProperties->{ options } = $sku->getOptions;
$newProperties->{ assetId } = $sku->getId; $newProperties->{ assetId } = $sku->getId;
$newProperties->{ price } = $sku->getPrice; $newProperties->{ price } = $sku->getPrice;
$newProperties->{ configuredTitle } = $sku->getConfiguredTitle; $newProperties->{ configuredTitle } = $item->get('configuredTitle');
$newProperties->{ isRecurring } = $sku->isRecurring; $newProperties->{ quantity } = $item->get('quantity');
$newProperties->{ recurInterval } = $sku->getRecurInterval if $sku->isRecurring;
my $address = $item->getShippingAddress; my $address = $item->getShippingAddress;
$newProperties->{ shippingAddressId } = $address->getId; $newProperties->{ shippingAddressId } = $address->getId;
$newProperties->{ shippingAddressName } = $address->get('name'); $newProperties->{ shippingAddressName } = $address->get('name');
@ -280,9 +279,11 @@ sub update {
$newProperties->{ shippingCountry } = $address->get('country'); $newProperties->{ shippingCountry } = $address->get('country');
$newProperties->{ shippingCode } = $address->get('code'); $newProperties->{ shippingCode } = $address->get('code');
$newProperties->{ shippingPhoneNumber } = $address->get('phoneNumber'); $newProperties->{ shippingPhoneNumber } = $address->get('phoneNumber');
$newProperties->{ quantity } = $item->get('quantity'); unless ($sku->isShippingRequired) {
$newProperties->{orderStatus} = 'Shipped';
}
} }
my @fields = (qw(assetId configuredTitle options shippingAddressId shippingTrackingNumber shippingStatus my @fields = (qw(assetId configuredTitle options shippingAddressId shippingTrackingNumber orderStatus
shippingName shippingAddress1 shippingAddress2 shippingAddress3 shippingCity shippingState shippingName shippingAddress1 shippingAddress2 shippingAddress3 shippingCity shippingState
shippingCountry shippingCode shippingPhoneNumber quantity price vendorId)); shippingCountry shippingCode shippingPhoneNumber quantity price vendorId));
foreach my $field (@fields) { foreach my $field (@fields) {
@ -291,9 +292,7 @@ sub update {
if (exists $newProperties->{options} && ref($newProperties->{options}) eq "HASH") { if (exists $newProperties->{options} && ref($newProperties->{options}) eq "HASH") {
$properties{$id}{options} = JSON->new->utf8->encode($newProperties->{options}); $properties{$id}{options} = JSON->new->utf8->encode($newProperties->{options});
} }
if (exists $newProperties->{shippingStatus}) { $properties{$id}{lastUpdated} = WebGUI::DateTime->new($self->transaction->session,time())->toDatabase;
$properties{$id}{shippingDate} = WebGUI::DateTime->new($self->transaction->session,time())->toDatabase;
}
$self->transaction->session->db->setRow("transactionItem","itemId",$properties{$id}); $self->transaction->session->db->setRow("transactionItem","itemId",$properties{$id});
} }

View file

@ -45,18 +45,72 @@ our $I18N = {
context => q|field label| context => q|field label|
}, },
'tracking number' => {
message => q|Tracking #|,
lastUpdated => 0,
context => q|field label|
},
'order status' => {
message => q|Order Status|,
lastUpdated => 0,
context => q|field label|
},
'Shipped' => {
message => q|Shipped|,
lastUpdated => 0,
context => q|field label|
},
'NotShipped' => {
message => q|Not Shipped|,
lastUpdated => 0,
context => q|field label|
},
'Backordered' => {
message => q|Backordered|,
lastUpdated => 0,
context => q|field label|
},
'Cancelled' => {
message => q|Cancelled|,
lastUpdated => 0,
context => q|field label|
},
'vendors' => { 'vendors' => {
message => q|Vendors|, message => q|Vendors|,
lastUpdated => 0, lastUpdated => 0,
context => q|admin function label| context => q|admin function label|
}, },
'update' => {
message => q|Update|,
lastUpdated => 0,
context => q|button label|
},
'refund' => {
message => q|Refund|,
lastUpdated => 0,
context => q|button label|
},
'date' => { 'date' => {
message => q|Date|, message => q|Date|,
lastUpdated => 0, lastUpdated => 0,
context => q|field label| context => q|field label|
}, },
'manage' => {
message => q|Manage|,
lastUpdated => 0,
context => q|field label|
},
'order number' => { 'order number' => {
message => q|Order #|, message => q|Order #|,
lastUpdated => 0, lastUpdated => 0,
@ -81,6 +135,18 @@ our $I18N = {
context => q|field label| context => q|field label|
}, },
'shipping method' => {
message => q|Shipping Method|,
lastUpdated => 0,
context => q|field label|
},
'shipping amount' => {
message => q|Shipping Amount|,
lastUpdated => 0,
context => q|field label|
},
'add shipper' => { 'add shipper' => {
message => q|Add Shipping Method|, message => q|Add Shipping Method|,
lastUpdated => 0, lastUpdated => 0,
@ -213,6 +279,12 @@ our $I18N = {
context => q|a label in the cart| context => q|a label in the cart|
}, },
'in shop credit used' => {
message => q|In-Shop Credit Used|,
lastUpdated => 0,
context => q|a label in the transaction|
},
'country' => { 'country' => {
message => q|Country|, message => q|Country|,
lastUpdated => 0, lastUpdated => 0,