Class OrderShippedJob
java.lang.Object
com.softslate.commerce.businessobjects.core.BaseBusinessObject
com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
com.softslate.commerce.businessobjects.jobs.AbstractJob
com.softslate.commerce.businessobjects.jobs.AbstractOrderEmailJob
com.softslate.commerce.businessobjects.jobs.OrderShippedJob
- All Implemented Interfaces:
BusinessObject
,BusinessProcessor
,org.quartz.Job
Sends customers emails if their order is in a specific shipped status as defined in settings and last modified is
within the previous 24 hours and the tracking number is filled in. This job will only send this for an order 1 time,
based on the 'emailType' of 'OrderShippedJob', which is defined in the Settings. This is essential because if an
order is modified for any reason, it will get pulled by the query again.
Typically, configure this job to run daily. For example, if it runs at 10:30pm, the orders it pulls will be those
that were last modified between 10pm the previous day and 11pm today. It goes forwards to the top of the next hour
for the endDate and backwards from that 25 hours for the startDate. In this way it should not matter what time of day
it's run. Yes, there is some overlap, but again we check to make sure this job only sends the email once. It could be
run hourly too, but it will pull orders repeatedly if it is, so it will be less efficient.
- Author:
- jmcwill, dtobey
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected String
(package private) static org.apache.commons.logging.Log
protected String
protected Collection<String>
Fields inherited from class com.softslate.commerce.businessobjects.jobs.AbstractOrderEmailJob
actionUtils, bccEmails, ccEmails, emailOptOutProcessor, emailProcessor, emailType, optOutType, orderProcessor, sendEmailsPerRun, template, templateCode, templateProcessor
Fields inherited from class com.softslate.commerce.businessobjects.jobs.AbstractJob
isOn, useXMLData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateExtraTemplateObjects
(Order order) protected void
initialize
(org.quartz.JobExecutionContext context) protected Collection<Order>
protected boolean
Methods inherited from class com.softslate.commerce.businessobjects.jobs.AbstractOrderEmailJob
createEmailFromOrder, createTemplateParser, executeJob, findEmailFromOrderOrCustomer, processOrder, sendEmail
Methods inherited from class com.softslate.commerce.businessobjects.jobs.AbstractJob
destroy, execute, getJobName, getServletContext, getSettingsPrefix, initSoftSlate, intFromJobDataMap, intFromSettings, setJobName, setServletContext, setSettingsPrefix, stringFromJobDataMap, stringFromSettings
Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
formatDateTime, formatPrice, getAppComponents, getAppSettings, getAttributeIDs, getBusinessObjectFactory, getDaoFactory, getEventBus, getInjector, getProductIDs, getSettings, getUser, initialize, isProcessorClassActive, loadMatchingSkus, parseDateTime, parseResponseData, prepareRequestData, sendHTTPGet, sendHTTPPost, sendHTTPPost, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setEventBus, setInjector, setSettings, setUser, updateOrderTotals, updateOrderTotals, updateOrderTotals, utils
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.quartz.Job
execute
-
Field Details
-
log
static org.apache.commons.logging.Log log -
statuses
-
startDate
-
endDate
-
currentStatuses
-
-
Constructor Details
-
OrderShippedJob
public OrderShippedJob()
-
-
Method Details
-
initialize
- Overrides:
initialize
in classAbstractOrderEmailJob
- Throws:
Exception
-
createExtraTemplateObjects
- Overrides:
createExtraTemplateObjects
in classAbstractOrderEmailJob
- Throws:
Exception
-
loadOrdersToProcess
- Specified by:
loadOrdersToProcess
in classAbstractOrderEmailJob
- Throws:
Exception
-
skipOrder
- Overrides:
skipOrder
in classAbstractOrderEmailJob
- Throws:
Exception
-