Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Ordernumbers for Magento

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Time Zone when using Date in the order number 03 May 2017 20:19 #1

  • in_mtl
  • in_mtl's Avatar Topic Author
Thank you for the extension. I have it installed and configured to my liking with one exception. I am using YY-MM-DD in the order / invoice number. The extension seems to use the server time zone and not the time zone set in Magento's 'locale' setting. In my case orders placed in the evening show create order numbers with the next day's date; note I'm UTC -5. Is there a way to adjust for the local timezone?

Thanks!

Time Zone when using Date in the order number 13 May 2017 19:39 #2

Dear in_mtl,
Yes, you are right, the php code uses standard PHP functions to get the date and thus ignores the magento settings. Unfortunately, I don't even have a full Magento installation around to test it, let alone that I have any resources to still support this extension.

However, you can change things yourselves: The file app/code/community/OpenTools/Ordernumber/Helper/Data.php contains the OpenTools_Ordernumber_Helper_Data::setupDateTimeReplacements function that sets up all date/time-releated variables. You'll need to change all date(..) calls to magento-specific code...

Best regards and sorry that I can't provide you with the ready solution,
Reinhold

Time Zone when using Date in the order number 15 May 2017 22:13 #3

  • in_mtl
  • in_mtl's Avatar Topic Author
Dear Reinhold,

Thank you for pointing me in the right direction. I swapped $utime where needed with Mage::getModel('core/date')->timestamp(time()) and now the date fields in my order numbers match my local timezone.

Great extension!
Thanks again

[SOLVED] Time Zone when using Date in the order number 19 May 2017 22:45 #4

Problem solved.

Time Zone when using Date in the order number 09 Jun 2017 14:01 #5

  • afxgroup
  • afxgroup's Avatar
Hi In_mtl

Are you able to point me in the right direction with the correct code for retrieving the system time for this module? I am very new to magento (& php in general). I have tried googling the issue without any luck. I am a little confused where you say " I swapped $utime where needed with Mage::getModel('core/date')->timestamp(time()) and now the date fields in my order numbers match my local timezone". When I put "Mage::getModel('core/date')->timestamp(time())" in the place of "$utime" in the Data.php file in the Helper folder the module throws up an error. I am sure I am doing something quite stupid but for the life of me I can't figure what. I appreciate your help if possible.

Cheers

Ian
  • Page:
  • 1