- Posts: 176
- Thank you received: 5
export to csv/xls and email to address not working
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.5.29
We use Hikashop for employees to place orders for branded merchandise at our company. We have a custom payment method called 'Payroll Deduction'. Currently, when a order is placed via this payment method the Name, Order#, Total & order notes are manually added to a spreadsheet and then forwarded via email to Human Resources to process the deduction. This is done about once a week. I would like to use a mass action to automate this.
Here is what is needed:
- Only include orders in the report that use the 'payroll deduction' payment method
- Generate a csv or xls that includes the following fields: Name, Order#, Date, Total
- Report automatically ran once per week and emailed
I have created a mass action that is triggered every week, filtered by order_payment_method and shows the columns needed. However, I am having 2 issues:
1) Not sure how to make this only pull a report for orders in the last week - no option for date range
2) I can get it to display to the screen, but cannot get it to save to the export path or send via email
Pls advise
Thank you
Please Log in or Create an account to join the conversation.
In administrator/components/com_hikashop/classes/massaction.php about line 2435 there is the following:
JFile::write($uploadFolder.$name, $data);
The value that is passed for $uploadFolder.$name in my case is: /home/countyma/public_html/\home\countyma\public_html\order-export\hr_payroll_deduct.csv
by changing this line to the following:
JFile::write($name, $data);
The value passed is:
\home\countyma\public_html\order-export\hr_payroll_deduct.csv
This is the correct path to the file and results in it being overwritten as intended.
Any idea why this is? I don't want to have to hack the class file to get this to work properly. Pls advise.
Please Log in or Create an account to join the conversation.
Which version do you have ? We made improvements about this recently.
It is in the latest 2.6.0 version, yours probably doesn't have the latest hot fixes.
Please try to download this latest version from our website and install it on yours.
Please Log in or Create an account to join the conversation.
Pls advise.
Please Log in or Create an account to join the conversation.
- Posts: 112
- Thank you received: 3
Please Log in or Create an account to join the conversation.
My bad, I think I don't explained correctly.
You have the 2.6.0 which is the latest version number, but we released new packages still with the version number 2.6.0 but with some fixes. So the latest 2.6.0 doesn't have the same content than the first 2.6.0.
That's why I asked to download and install again this version
If that doesn't solve your issue, then a backend and FTP access will allow us to debug the issue on your end directly.
These informations can be sent via our contact form with a link to this topic in your message:
hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
- Posts: 112
- Thank you received: 3
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 112
- Thank you received: 3
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
What path do you have set ?
In your case I think that you must fill the field with: \order-export\hr_payroll_deduct.csv
If that doesn't solve your issue, then a backend and FTP access will allow us to debug the issue on your end directly.
These informations can be sent via our contact form with a link to this topic in your message:
hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
Thank you
Please Log in or Create an account to join the conversation.
Problem solved, and thanks to you we correct an issue about that on our end.
There was an issue with the slashes and backslashes for the root path, we were not setting them correctly in some cases.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
You can filter on an order date column like "order_created" or "order_modified" based on what you want and filter on ">=" "{time}-604800" (7 days in seconds)
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
That will set the start of the week.
There is no option to change it. You'll have to go in your phpmyadmin and open the table hikashop_config your database. There, you can change the value of the entry with the namekey massaction_last_trigger_week
The value needs to be the unix timestamp of the date/time one week before the date/time that you want the mass action to be triggered next time.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Are you sure that your cron settings are correct under Configuration > Cron ?
There you should see the last execution date. On your account on our website, you must have fill the url of your website for the subscription site option: www.hikashop.com/my-account/your-subscriptions.html
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.