protected function setJobExport()
    {
        $submitted = $this->getSubmitted();
        $settings = $this->module->getSettings('export');

        $settings['columns'] = $submitted['columns'];
        $settings['options'] = $submitted['options'];

        $this->module->setSettings('export', $settings);

        $data = array_merge($settings, $submitted);

        $data['header'] = array_intersect_key($data['header'], array_flip($data['columns']));
        gplcart_file_csv($data['file'], $data['header'], $data['delimiter']);

        $hash = gplcart_string_encode($data['file']);
        $total = $this->getTotalProductExport($data['options']);

        $vars = array('@url' => $this->url('', array('download' => $hash)), '@num' => $total);
        $finish = $this->text('Exported @num items. <a href="@url">Download</a>', $vars);

        $job = array(
            'data' => $data,
            'total' => $total,
            'id' => 'export_product',
            'redirect_message' => array('finish' => $finish)
        );

        $this->job->submit($job);
    }