'price-export-overview', 'icon' => 'download', 'title' => __('New price file in CSV or XML', 'ai-eshop-optimizer'), 'description' => __('Generate a price file (CSV or XML) of your catalogue, optionally including role prices.', 'ai-eshop-optimizer'), )); echo $aieo_pe_open; ?> '; foreach ($available_fields as $key => $info) { $aieo_pe_item = ''; $aieo_pe_fields .= $aieo_pe_item; } $aieo_pe_fields .= ''; $aieo_pe_rows = $aieo_pe_ui::field_row(array( 'id' => 'aieo-pe-format', 'label' => __('Format', 'ai-eshop-optimizer'), 'group' => true, 'control' => \Rooster\Admin\Fields::segmented('format', array('csv' => 'CSV', 'xml' => 'XML'), 'csv', array('id' => 'aieo-pe-format-choice', 'labelledby' => 'aieo-pe-format-label')), )) . $aieo_pe_ui::field_row(array( 'id' => 'aieo-pe-source', 'label' => __('Source', 'ai-eshop-optimizer'), 'group' => true, 'help' => __('Vitals reads all fields (except role prices) from the precomputed aieo_core_product_vitals table — dramatically faster on large catalogues, but reflects the last vitals rebuild rather than in-flight WC changes. Role prices always come from their own table.', 'ai-eshop-optimizer'), 'control' => $aieo_pe_ui::checks('source', array( 'live' => __('Live (WooCommerce — freshest, slower)', 'ai-eshop-optimizer'), 'vitals' => __('Vitals cache (fast — reflects last vitals rebuild)', 'ai-eshop-optimizer'), ), array('live'), array('type' => 'radio', 'inline' => true)), )) . $aieo_pe_ui::field_row(array( 'id' => 'aieo-pe-fields', 'label' => __('Fields to include', 'ai-eshop-optimizer'), 'group' => true, 'control' => $aieo_pe_fields, )); ?>
'aieo-dmm-prices-job', 'state' => 'idle', 'run' => __('Start export', 'ai-eshop-optimizer'), 'run_attrs' => array('form' => 'aieo-dmm-price-export-form', 'data-action' => 'aieo_dmm_price_export_start'), )); echo $aieo_pe_job; ?> (string) $job['job_id'], 'created' => (string) $job['created_at'], 'status' => (string) $job['status'], 'processed' => number_format_i18n((int) $job['processed']) . ' / ' . number_format_i18n((int) $job['total']), 'done' => (int) $job['processed'], 'filename' => (string) $job['filename'], 'url' => is_array($params) && isset($params['url']) ? (string) $params['url'] : '', 'path' => is_array($params) && isset($params['path']) ? (string) $params['path'] : '', ); } AIEO_Table::card(array( 'anchor' => 'price-export-recent-exports', 'icon' => 'clock', 'heading' => 'h2', 'title' => __('Recent price exports', 'ai-eshop-optimizer'), 'description' => __('Lists the last 10 price export jobs with status, rows processed, a download link to the CSV or XML file and its path on disk; Delete removes the row and the file.', 'ai-eshop-optimizer'), 'page_id' => 'price_export', 'row_key' => 'job_id', 'rows' => $aieo_pe_rows, 'caps' => array('search' => true), 'filters' => array(array('key' => 'status', 'label' => __('Status', 'ai-eshop-optimizer'), 'kind' => 'values', 'control' => 'select')), 'per_page' => 0, 'empty' => __('No exports yet.', 'ai-eshop-optimizer'), 'columns' => array( array('key' => 'created', 'label' => __('Created', 'ai-eshop-optimizer'), 'nowrap' => true), array('key' => 'status', 'label' => __('Status', 'ai-eshop-optimizer'), 'type' => 'badge'), array('key' => 'processed', 'label' => __('Processed', 'ai-eshop-optimizer'), 'sort_key' => 'done', 'nowrap' => true), array('key' => 'filename', 'label' => __('File', 'ai-eshop-optimizer'), 'type' => 'link', 'format' => array('href' => 'url', 'external' => true)), array('key' => 'path', 'label' => __('Path', 'ai-eshop-optimizer'), 'type' => 'code'), ), 'actions' => array( array('id' => 'delete', 'label' => __('Delete', 'ai-eshop-optimizer'), 'class' => 'button button-small aieo-dmm-delete-export-job', 'description' => __('Removes this job from the list and deletes its file.', 'ai-eshop-optimizer')), ), )); ?>