Virtuemart CSV Order List and Email

VM Order List

Virtuemart Order List is a Joomla compoment that will allow the user to on demand or by executing a cron to generate a CSV or a TXT file that is emailed to one or two email addresses. The CSV or TXT file can then be opened and used as an Excel spreadsheet.  Once the component is installed, sign into the backend and find VM ORDER LIST. Next fill in the email addresses, subject line, body text message and select the fields that you want to see included in the CSV or TXT file.

Component Setup

The component installs as any other Joomla 1.5 component. After installation, access the component from the components menu and proceed with the set up steps recommended below.

The component uses a Unix Date and Time to determine which orders should be processed. Orders more recent than the date and time will be sent whenever the CRON causes a report to be produced.
 
After installation, the component will default to a value of "1" in the Unix Date/Time field. If not changed, the component will generate an initial report that includes all previous orders.  After that, the system will set the Unix Date and time automatically and update it each time a report is generated. You can run as many reports per day as you choose, since a timestamp is included along with the date. The system will keep track of what orders need to be in the new report.
 
If you would like to manually set the beginning date and time for the first report, please go to http://www.onlineconversion.com/unix_time.htm and create a timestamp for the date and time. Copy the value you create there and paste it into the Unix Date/Time field. The system will automatically update from there.
 
The screen captures below are of the component set up and show the various options available. They are mostly self-explanatory. Where needed, some notes are included following the screen capture.
 
 
More than one email address can be used per email setting. Separate multiple email addresses with a " , " if more than one person should get the CSV or TXT file.
 
The "show" options relate to the standard order fields in Virtuemart. Each field will have its own separate column in the CSV or TXT file. Turn fields to "Yes" that you want to appear in your file. Turn fields to "No" which you do not want to see.
 
The address lines above refer to the Shipping Address. You can optionally show the billing information as well. Those options are farther down the component configuration.
 

The order status codes let you choose to show all orders, regardless of status, or select statuses only. Limiting the CSV to showing only Confirmed orders will prevent a fulfillment house from shipping orders that have not been fully paid.

As part of the configuration shown above, please choose to have dates displayed in mm.dd.yyyy or dd.mm.yyyy format. The unix timestamp can be changed at any time to list older orders. Plus, the frontend of this componet lets the user run a report with custom timeframes.

The option above to Show Continued Order Identifier is important to some CSV or TXT file reciepients. This option puts a Y or N at the end of each line indicating if it is a continuation of the order above it. Customers buying multiple products will have their orders listed separately on multiple lines. This indicator can help fulfillment houses in batching all products for a given order together.

The option to show billing information will put the billing name and address in the CSV or TXT in addition to the Shipping Name and Address.

 

This final option determines if the file-type default. VM Orderlist can create either a CSV file or a TXT file. Set this value to "Yes" to generate a CSV file, or to "No" to generate a TXT file. This option can be overridden on the frontend when generating a file on-demand. Files generated via the CRON job will always use the file type as specified here.

 Front-end

To execute VM ORDER LIST on demand create a menu link to the component.   When you click on the menu link, the component will display the 1st day of the current month and the last day of the month along with the default email address to recieve the spreadsheet.  Simply modify the date range and change the receiving email address if needed and submit.  The CSV or TXT file will be emailed to the address specified. You can also use this option to generate a different file type than is set for the default used by the CRON method. Use the front-end for ad hoc reports as needed.

 

 

Cron Job

A sample layout of the cron job is listed below.  Please make sure to change yoursite.com in the parameter. 

/usr/bin/wget "http://www.yoursite.com/index.php?option=com_vmorderlist&task=cron"

As sample of this CRON job is included it the VM Orderlist package. Unzip first to locate it.

Modifying CSV/TXT File Headings

The component contains a language file that can be edited to customize the names of the various columns in the CSV or TXT file. To adjust, go to components/com_vmorderlist/literals.idx.php and either edit online using a filexplorer component, download and edit as desired, or change the file prior to uploading. Each header has a line that looks like this:

'bill_company' => 'Bill_To_Company_Name:',

To update, change the right side to the desired value.

Changing the Order of the Fields

The component contains a language file that can be edited to customize the order in which the fields appear in the CSV file or TXT file. To adjust, go to components/com_vmorderlist/literals.idx.php and either edit online using a filexplorer component, download and edit as desired, or change the file prior to uploading. Each field has a line as shown below:

'order_id' =>  '1',
'user_id' => '2',

To change the order of the fields as they appear in the file, change the numbers to reflect the sequence desired. If you would prefer a field did not print in the file, simply change the number to '0' to suppress it.

Saving the Attachment

In addition to sending the output file as an attachment, the system can save the attachment with a unique file name based on the time and date. 

If the "Save attachment vmordyyyymmddhhmm" option is set to "No," the component will generate the order attachment as "vmorderlist" and will overlay the previous file on the server root with the new file when it is generated.

Setting the option to "Yes" (this is the default) will create a new file on the server root named vmordyyyymmddhhmm.csv or .txt.  If a new file were generated on September 23, at 8:30 AM the name of the file created would be vmord201110230830.csv or .txt. This option allows you to keep backups of the sent files on the server root, and makes sure that the receipient of the emailed file can tell when the file was created.

If this option is used, you may set up a cron job that runs as often as needed and each email generated will have a unique attachment id that will also be saved in the root folder of your server. 

 To Purchase VM Order List Click Here

Shopping Cart



Advanced Search





Lost Password?
Forgot your username?
No account yet? Register

Download Area
Show Cart