I am trying to skip writeOutput for some records with a particular customfields4all value.
I created an override of the virtuemart product export using /csviaddon/virtuemart/com_virtuemart/model/export/product.php
Then added the following code
if ($field->column_header == 'column_name' && $fieldValue == 'value_searching_for') {
$export_line = false;
}
after the following around line 1959
// Store the field value
$this->fields->set($field->csvi_templatefield_id, $fieldValue);
Then I was hoping I could just skip the writeOutput by adding the following at the end of the foreach ($records as $record) loop:
if ($export_line) {
// Output the contents
$this->writeOutput();
}
However this doesn't work as I believe I need to replace the $contents in class CsviModelExports or/and add in "\r\n"
How do I do that?
regards
Eliot