Create Batch by Date
Copyright © 2001, William Weiland
Overview
Create your orders batch file based on the date of the order. You specify the beginning and ending date and name the batch, this module will do the rest. It finds orders which have not already been batched (optionally you can include previously batched orders) and that fall within the date range you specified. Many people fill orders from the merchant notification email and infrequently look in the order processing section to review a detail about the order. Hence, they do not bother to batch daily. This module allows you to maintain your batches in a logical, historical manner (e.g. by month), much like the file cabinet in your office without having to run the batch at a specific time or date.
Initial Setup
1) In admin, click Add Modules
2) Click the file upload button
3) Browse to find the daybatch.mvc file on your hard drive and upload
4) Click Add to add it to the domain
5) Click the plus to the left of your store name
6) Click on the Utilities link
7) Check the box to the left of Batch Creation by Date and select Update

Usage
1) In admin, click on plus to the left of Stores
2) Click the plus to the left of your store name
3) Click the plus to the left of Utilities under your store
4) Click the link to the Batch Creation by Date
5) Name the batch and enter the desired start and stop dates. The format for dates is YYYYMMDD, e.g. 20010726
6) Once the batch is created, the Run Report screen pops up
7) You can run a report then or you can find the batch and run a report later from the order processing section
8) Beginning with version 5.008 of the module, you can remove orders from an existing batch. In some cases, you may want to remove a group (based on date range) of orders from a batch. To do this, simply put a minus character for the name of the batch, instead of supplying a batch name. This tells the module to remove any orders in that time period from any batch they are currently in. It does not delete the orders. It makes them unbatched orders.


Note: The screen also shows a list of existing batches and the number of orders in each.

Automatic Batching
Normally you go to admin > utilities to run this batching module. However, you can use cron to batch all the open orders automatically at set times during the day or night. This feature is in version 5.0050 and newer of the module. You will need to have access to cron in your domain. Some hosts don't provide that. You will setup a cron task for the times you want it to run. Below is the example command to run the auto batching. Change the UserName and Password to match your admin login info. Change the Store_Code to yours. Change the url to your admin.mvc. On this page the line appears wrapped. This is actually one long line of text.
wget --post-data='Screen=SUTL&Action=SUTL&Store_Code=YOURSTORECODE&Module_Code=daybatch&auto=1&UserName=YOURUSERNAME&Password=YOURPASSWORD&Provision=yes&Submit=Login' https://www.YOURDOMAIN.com/mm5/admin.mvc --no-check-certificate >/dev/null 2>&1
If a batch with orders is created the module will email the results to the store email address.
Store.: Store name
Batch.: Batch name (YYYYMMDD_HHMMSS)
Orders: Number of orders in the batch