1. docetmedia
  2. RO CSVI
  3. Friday, 30 September 2016
  4.  Subscribe via email
Hi,

I see that export filename can be customized with date information but can I include the order number ?

Thanks,
Olivier
Accepted Answer Pending Moderation
Hi,are there any News to this Topic.

I need to include the virtuemart_order_id in the Filename.

This thread is 2 years old, maybe there is a possibility today?

Thank you.
  1. more than a month ago
  2. RO CSVI
  3. # 21
Accepted Answer Pending Moderation
Hello,
As said already you need to modify exportFilename function as the formatExportFilename method you pasted is called in the exportFilename function. Since this is your custom coding we are limited to help you here, you may need some developer's help to add order-number in the code.
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. # 22
Accepted Answer Pending Moderation
This might be the part to edit :



private function formatExportFilename($exportFilename)
{
// Do some customizing
// Replace year
$exportFilename = str_replace('[Y]', date('Y', time()), $exportFilename);
$exportFilename = str_replace('[y]', date('y', time()), $exportFilename);

// Replace month
$exportFilename = str_replace('[M]', date('M', time()), $exportFilename);
$exportFilename = str_replace('[m]', date('m', time()), $exportFilename);
$exportFilename = str_replace('[F]', date('F', time()), $exportFilename);
$exportFilename = str_replace('[n]', date('n', time()), $exportFilename);

// Replace day
$exportFilename = str_replace('[d]', date('d', time()), $exportFilename);
$exportFilename = str_replace('[D]', date('D', time()), $exportFilename);
$exportFilename = str_replace('[j]', date('j', time()), $exportFilename);
$exportFilename = str_replace('[l]', date('l', time()), $exportFilename);

// Replace hour
$exportFilename = str_replace('[g]', date('g', time()), $exportFilename);
$exportFilename = str_replace('[G]', date('G', time()), $exportFilename);
$exportFilename = str_replace('[h]', date('h', time()), $exportFilename);
$exportFilename = str_replace('[H]', date('H', time()), $exportFilename);

// Replace minute
$exportFilename = str_replace('[i]', date('i', time()), $exportFilename);

// Replace seconds
$exportFilename = str_replace('[s]', date('s', time()), $exportFilename);

// Replace ordernumber
$exportFilename = str_replace('[O]', order-number, $exportFilename);

return $exportFilename;
}




Could someone help me to figure how to get the order-number added here ?
Thanks !
  1. more than a month ago
  2. RO CSVI
  3. # 23
Accepted Answer Pending Moderation
Thanks for your answer Tharuna, I will try to modify the code.
  1. more than a month ago
  2. RO CSVI
  3. # 24
Accepted Answer Pending Moderation
Hello Olivier,
There is no way to add order number to export filename. You may need to hack/custom code this in CSVI core file if you need it. If you want to do so, you can change it in administrator/components/com_csvi/models/exports.php file and look for function exportFilename. Remember you need to take care of CSVI core future updates in case if you write your custom code.
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. # 25
  • Page :
  • 1
  • 2


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