Add the order date to the receipt; change wording for delivery date 
from "Today" to "As soon as possible".

        Patch by foxfirefey. 

diffs (55 lines):

diff -r eab3a4c6e042 -r db4d076be069 bin/upgrading/en.dat
--- a/bin/upgrading/en.dat      Sat Jan 02 03:27:19 2010 +0000
+++ b/bin/upgrading/en.dat      Sat Jan 02 03:55:00 2010 +0000
@@ -4561,7 +4561,7 @@ widget.shopcart.btn.discard=Discard Enti
 
 widget.shopcart.btn.removeselected=Remove Selected Items
 
-widget.shopcart.deliverydate.today=Today
+widget.shopcart.deliverydate.asap=As soon as possible
 
 widget.shopcart.error.nocart=Unable to get a shopping cart for you.  Please 
try again later.
 
diff -r eab3a4c6e042 -r db4d076be069 cgi-bin/LJ/Widget/ShopCart.pm
--- a/cgi-bin/LJ/Widget/ShopCart.pm     Sat Jan 02 03:27:19 2010 +0000
+++ b/cgi-bin/LJ/Widget/ShopCart.pm     Sat Jan 02 03:55:00 2010 +0000
@@ -68,7 +68,7 @@ sub render_body {
             $ret .= "<td>" . $class->html_check( name => 'remove_' . 
$item->id, value => 1 ) . "</td>"
         }
         $ret .= "<td>" . $item->name_html . "</td>";
-        $ret .= "<td>" . ( $item->deliverydate ? $item->deliverydate : 
$class->ml( 'widget.shopcart.deliverydate.today' ) ) . "</td>";
+        $ret .= "<td>" . ( $item->deliverydate ? $item->deliverydate : 
$class->ml( 'widget.shopcart.deliverydate.asap' ) ) . "</td>";
         $ret .= "<td>" . $item->t_html( admin => $opts{admin} ) . "</td>";
         $ret .= "<td>" . $item->from_html . "</td>";
         $ret .= "<td>" . ( $item->random ? 'Y' : 'N' ) . "</td>" if 
$opts{admin};
diff -r eab3a4c6e042 -r db4d076be069 htdocs/shop/receipt.bml
--- a/htdocs/shop/receipt.bml   Sat Jan 02 03:27:19 2010 +0000
+++ b/htdocs/shop/receipt.bml   Sat Jan 02 03:55:00 2010 +0000
@@ -35,6 +35,7 @@ _c?>
 
     my $state = $cart->state;
     my $paymentmethod = $cart->paymentmethod;
+    my $orderdate = DateTime->from_epoch( epoch => $cart->starttime );
 
     # cart cannot be in open, closed, or checkout state
     return BML::redirect( "$LJ::SITEROOT/shop/cart" )
@@ -66,7 +67,8 @@ _c?>
     };
     $ret .= "<h1>$title</h1>";
     $ret .= "<p>" . BML::ml( '.cart.status', { status => 
$ML{".cart.status.$state"} } ) . "<br />";
-    $ret .= BML::ml( '.cart.paymentmethod', { paymentmethod => 
$ML{".cart.paymentmethod.$paymentmethod"} } ) . "</p>";
+    $ret .= BML::ml( '.cart.paymentmethod', { paymentmethod => 
$ML{".cart.paymentmethod.$paymentmethod"} } ) . "</br />";
+    $ret .= BML::ml( '.cart.date', { date => $orderdate->strftime( "%F %r %Z" 
) }) . "</p>";
     if ( $paymentmethod eq 'checkmoneyorder' ) {
         my $address = "<p>$LJ::SITECOMPANY<br />Order #" . $cart->id . "<br 
/>$LJ::SITEADDRESS</p>";
         $ret .= "<p>" . BML::ml( ".cart.paymentmethod.$paymentmethod.extra", { 
sitecompany => "<strong>$LJ::SITECOMPANY</strong>", address => $address } ) . 
"</p>";
diff -r eab3a4c6e042 -r db4d076be069 htdocs/shop/receipt.bml.text
--- a/htdocs/shop/receipt.bml.text      Sat Jan 02 03:27:19 2010 +0000
+++ b/htdocs/shop/receipt.bml.text      Sat Jan 02 03:55:00 2010 +0000
@@ -1,4 +1,6 @@
 ;; -*- coding: utf-8 -*-
+
+.cart.date=<strong>Order Date:</strong> [[date]]
 
 .cart.status=<strong>Current Order Status:</strong> [[status]]
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to