Database problem

  • Posts: 3
  • Thank you received: 0
13 years 6 days ago #30697

I added a new attribute called order_date to the jos_hikashop_order table using the DATE format. However when i process an order the date does not seems to work and come out as 0000-00-00 00.00.00 in the database. How to i make it that it will track the time when i process and order and appear in the jos_hikashop_order table under the newly create order_date attribute. Please help THANKS!

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
13 years 6 days ago #30709

Hi , is there any solution to this problem??

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
13 years 6 days ago #30745

You should edit your order_date column and set its default value you "current timestamp" but that will set the date of when the order was created which is already in the order_created field.

Last edit: 13 years 6 days ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
13 years 5 days ago #30803

the order_created field is not in a date time format, this is what i get from my database. 1321971206. how do i read this information ?

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
13 years 4 days ago #30830

That's a unix timestamp.
If HikaShop is loaded, you can use the function hikashop_getDate() to convert it into a date. That function is implemented in the file administrator/components/com_hikashop/helpers/helper.php

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum