- Posts: 68
- Thank you received: 8
Unix timestamp mass action filter
- MumsHealth
-
Topic Author
- Offline
Less
More
12 years 8 months ago #139866
by MumsHealth
Unix timestamp mass action filter was created by MumsHealth
-- url of the page with the problem -- :
mywebsite.com/mypage
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 3.2
-- PHP version -- : 5.3.3
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message
Hi I have created a mass action to export order history to a CSV and I would like to filter it by the date column (by month specifically) but the date is stored in the database as a Unix timestamp.
Is there anyway to get the massaction to export orders for one month only?
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 3.2
-- PHP version -- : 5.3.3
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message
Hi I have created a mass action to export order history to a CSV and I would like to filter it by the date column (by month specifically) but the date is stored in the database as a Unix timestamp.
Is there anyway to get the massaction to export orders for one month only?
Please Log in or Create an account to join the conversation.
12 years 8 months ago #139873
by Xavier
Replied by Xavier on topic Unix timestamp mass action filter
Hi,
Actually it's not possible to filter by month by selecting a month.
You have to filter on the created_date, and set a date > to a defined timestamp.
I will add this on our TODO list.
Actually it's not possible to filter by month by selecting a month.
You have to filter on the created_date, and set a date > to a defined timestamp.
I will add this on our TODO list.
The following user(s) said Thank You: MumsHealth
Please Log in or Create an account to join the conversation.
- MumsHealth
-
Topic Author
- Offline
Less
More
- Posts: 68
- Thank you received: 8
12 years 8 months ago #139909
by MumsHealth
Replied by MumsHealth on topic Unix timestamp mass action filter
Thanks thats what I thought.
Perhaps as a temporary fix you could just add a range operator to the filters so we can enter a timecode range.
Will keep an eye out in the future.
Thanks a lot,
Nathan
Perhaps as a temporary fix you could just add a range operator to the filters so we can enter a timecode range.
Will keep an eye out in the future.
Thanks a lot,
Nathan
Please Log in or Create an account to join the conversation.
12 years 8 months ago #139933
by Xavier
Replied by Xavier on topic Unix timestamp mass action filter
Hi,
By range you mean interval, right ?
If it is, you can add two filters in one mass action to just get the order of a specific month.
One filter for orders where created_date is > specified timestamp (ex timestamp for 1 december)
And another one where created_date is < specified timestamps (ex timestamp for 31 december)
By range you mean interval, right ?
If it is, you can add two filters in one mass action to just get the order of a specific month.
One filter for orders where created_date is > specified timestamp (ex timestamp for 1 december)
And another one where created_date is < specified timestamps (ex timestamp for 31 december)
Please Log in or Create an account to join the conversation.
- MumsHealth
-
Topic Author
- Offline
Less
More
- Posts: 68
- Thank you received: 8
12 years 8 months ago #140113
by MumsHealth
Replied by MumsHealth on topic Unix timestamp mass action filter
Yes, that works fine for me.
Thanks
Thanks
Please Log in or Create an account to join the conversation.
- MumsHealth
-
Topic Author
- Offline
Less
More
- Posts: 68
- Thank you received: 8
12 years 8 months ago #140114
by MumsHealth
Replied by MumsHealth on topic Unix timestamp mass action filter
One more small thing. It's nice how the "order_created" and "order_modified" fields are converted from a timestamp to a date when they are exported. The field "order_invoice_created" on the other hand stays as a timestamp. Is there any way to fix this as our accountants dont really know how to read a timestamp.
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140134
by nicolas
Replied by nicolas on topic Unix timestamp mass action filter
Change the line:
$timestamps = array('product_sale_start','product_sale_end','product_last_seen_date');
to:
$timestamps = array('product_sale_start','product_sale_end','product_last_seen_date','order_invoice_created');
in the file administrator/components/com_hikashop/classes/massaction.php and that should do it.
$timestamps = array('product_sale_start','product_sale_end','product_last_seen_date');
to:
$timestamps = array('product_sale_start','product_sale_end','product_last_seen_date','order_invoice_created');
in the file administrator/components/com_hikashop/classes/massaction.php and that should do it.
Please Log in or Create an account to join the conversation.
Time to create page: 0.252 seconds