Jump to content

Updating Order Time


Guest Ohhh My

Recommended Posts

Guest Ohhh My

So when an order is placed we get a group of numbers that look like this...

#071231-061523-7615

1. The first set of numbers are the date order was placed. Can this order be changed to mm/dd/yy

2. The second set of numbers is the time. i'm assuming it is hh/mm/ss. Where can I change the setting for this to match my local time.

3. What is this last set of numbers?

Link to comment
Share on other sites

1) Yes it could be

2) Yes it is hh/mm/ss

3) This is a random number

There is a function in a order class which generates order no.:

classes/cart/order.php

function mkOrderNo() {

	$this->cart_order_id = date("ymd-His-").rand(1000, 9999);

	return $this->cart_order_id;

}

Your requirement:

$this->cart_order_id = date("mdy-His-").rand(1000, 9999);

I dont suggest you to change it to local time if you use DST (Daylight Saving Time)

Link to comment
Share on other sites

  • 2 months later...

I dont suggest you to change it to local time if you use DST (Daylight Saving Time)

What would be the danger in changing the order to local time?

Or even, what would be the danger in setting the entire site's time to local time via (in PHP5) something like:

date_default_timezone_set("America/Los_Angeles");

Thanks,

Jeremy

Link to comment
Share on other sites

Guest Brivtech

I would also like to know if consecutive order numbers could be used as a user-defined option, rather than datestamp order numbers.

What is the logic behind the existing system?

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
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...