Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

UPS XML Displayed Date Format


dwhoover

Recommended Posts

I'm trying to change the date format displayed on the Delivery Information and subsequent pages. It is currently "2005-09-19"...I would like it to read "09-19-2005".

 

Can anyone share a fix for this?

 

Thanks! :thumbsup:

osCommerce MS2

SPPC incl. Specials By Category, Prices By Category

Vendors, Easy Populate, UPS XML, USPS Methods

Link to comment
Share on other sites

I'm trying to change the date format displayed on the Delivery Information and subsequent pages.  It is currently "2005-09-19"...I would like it to read "09-19-2005".
Actually, directions for things like that are already in the catalog/includes/modules/shipping/upsxml.php file (around line 250):

  // instead of just adding the expected delivery date as ", yyyy-mm-dd"
 // you might like to change this to your own liking for example by commenting the
 // three lines above this and uncommenting/changing the next:
 // START doing things differently

 

In this case you would have to simplify the given example to (untested):

   	 if (isset($this->servicesTimeintransit[$type])) {
  	 $eta_array = explode("-", $this->servicesTimeintransit[$type]["date"]);
  	 $eta_arrival_date = $eta_array[2]."-".$eta_array[1]."-".$eta_array[0];
   $_type = $_type . ", " . $eta_arrival_date;
   }

Link to comment
Share on other sites

JanZ:

 

Sorry about the duplicate post. I'm just getting used to posting and replies!

 

Thanks for the info, and yes, I should have RTFM (or, in this case, RTFC).

 

Cheers!

 

 

 

Actually, directions for things like that are already in the catalog/includes/modules/shipping/upsxml.php file (around line 250):

 ?// instead of just adding the expected delivery date as ", yyyy-mm-dd"
?// you might like to change this to your own liking for example by commenting the
?// three lines above this and uncommenting/changing the next:
?// START doing things differently

 

In this case you would have to simplify the given example to (untested):

 ? ?	if (isset($this->servicesTimeintransit[$type])) {
? ?	$eta_array = explode("-", $this->servicesTimeintransit[$type]["date"]);
? ?	$eta_arrival_date = $eta_array[2]."-".$eta_array[1]."-".$eta_array[0];
? ?$_type = $_type . ", " . $eta_arrival_date;
? ?}

osCommerce MS2

SPPC incl. Specials By Category, Prices By Category

Vendors, Easy Populate, UPS XML, USPS Methods

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...