I'm trying to create logic that loads all the orders from 2 weeks prior to a given date (all the orders from that day). Ultimately we're looking to create a customer follow up workflow from these orders.
I've tried this, but it didn't work:
Is it possible to pass a SQL statement as the "search" parameter in the OrderList_Load_Offset function? Is there another way to get order data in a date range?
thanks for any info,
Paul
I've tried this, but it didn't work:
Code:
<mvt:comment>Assuming this is a cron job that runs at midnight, this would shave 2 weeks off the current day</mvt:comment> <mvt:assign name="g.start_time" value="s.time_t - 1209600" /> <mvt:comment>end at the 24 hour mark</mvt:comment> <mvt:assign name="g.end_time" value="g.start_time + (24*60*60)" /> <mvt:comment> Looking at the LSK, I thought this might work</mvt:comment> <mvt:assign name="g.search_range" value="'WHERE orderdate BETWEEN' $ g.start_time $ 'AND'$ g.end_time " /> <mvt:do file="g.Module_Library_DB" name="l.result" value="OrderList_Load_Offset(g.Offset, g.search_range, 'orderdate', g.Max, g.NextOffset, l.settings:orders)" />
thanks for any info,
Paul
Comment