Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Time Zone Offset - Adjust to match your location


mel77

Recommended Posts

I found this contibution which I'm sure will be helpfull for many people.

 

It just needs someone to help with the code so that it also updates the order confirmation and order status update emails (code is located in checkout_process.php).

 

Is anyone able to help with this?

 

http://www.oscommerce.com/community/contri...earch,time+zone

Link to comment
Share on other sites

  • 3 weeks later...

in the catalog checkout_process.php change:

 

'date_purchased' => 'now()',

to

 

'date_purchased' => date_add(now(), INTERVAL ' . TIME_ZONE_OFFSET . ' HOUR),

 

 

and further down change

'date_added' => 'now()',

 

to

'date_added' => date_add(now(), INTERVAL ' . TIME_ZONE_OFFSET . ' HOUR),

just define the time difference.

Link to comment
Share on other sites

So, can this same change be made in other files also? Say some of the admin files? in the Helpdesk contribution? The Order Edit contribution? etc.?

 

Of course, I'm assuming that the original code is exactly like this, but I guess the principle can be used elsewhere?

 

 

 

in the catalog checkout_process.php change:

 

'date_purchased' => 'now()',

to

 

'date_purchased' => date_add(now(), INTERVAL ' . TIME_ZONE_OFFSET . ' HOUR),

and further down change

'date_added' => 'now()',

 

to

'date_added' => date_add(now(), INTERVAL ' . TIME_ZONE_OFFSET . ' HOUR),

just define the time difference.

Link to comment
Share on other sites

yes those changes are basically for the sql queries. The particular contribution also shows how to adjust the time for the php statements.

Link to comment
Share on other sites

yea I think I missed the quotes around it

 

'date_purchased' => 'date_add(now(), INTERVAL ' . TIME_ZONE_OFFSET . ' HOUR)',

 

and define the TIME_ZONE_OFFSET as the hour difference

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