I am digging through progress bar but no luck yet, maybe anyone had the similar problem with it?
I have a “cm-ajax” (is_ajax=3) form, and I also set “skip_result_ids_check=1”
inside controller I have:
fn_set_progress('total', 25);
Inside the cycle I have
fn_set_progress('echo', fn_get_lang_var('importing_data'));
But the progress bar is not moving
I have traced all variables (Registry::get('ajax'), $_REQUEST and so on)
It seems like this line in class.ajax.php does not do its job for me, however, script gets to this point and json data is fine
fn_echo("');
I have taken a look at the standard export routine:
$total = db_get_field("SELECT COUNT(*) FROM ?:" . $pattern['table'] . " as " . $pattern['table'] .' '. implode(' ', $joins) . (!empty($conditions) ? ' WHERE ' . implode(' AND ', $conditions) : ''));
fn_set_progress('total', $total);
That means that running export with like 2000 items should show smooth progress bar increasing, but in my case it does not. In my store it runs from 0 to 100 in no time right before script ends.
In my custom script with progress bar it does not run at all
Maybe I should mess with result_ids?
Any help is much appreciated