1. webstar
  2. RO CSVI
  3. Tuesday, 12 March 2024
  4.  Subscribe via email
Hi I'm writing a new plugin/rule for virtuermart. Id like to somehow pass the current export timeframe INTO the plugin so I can check a users 1st order date to see if it falls within the current export window, eg "last Month"

can you think how I can obtain the date range from within my new plugin?
Accepted Answer Pending Moderation
Hello,
Only way I can think of here is to write custom query in your plugin to read export template settings based on template ID and use the export date format set in template. Query should get the field settings from #__csvi_templates table. You can then get the date range from JSON decoded value. Let me know if that helps.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Ok THanks, Ive just hard codede the date range in for now.

thanks
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,

Instead of querying the database directly, you can also use the template class like this:

$template = new CsviHelperTemplate($templateId);
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!