__('All', 'ai-eshop-optimizer'),
'ready' => __('Ready to merge', 'ai-eshop-optimizer'),
'review' => __('Worth a look first', 'ai-eshop-optimizer'),
'blocked' => __('Needs a decision', 'ai-eshop-optimizer'),
);
$product_total = 0;
foreach ($groups as $g) { $product_total += count($g['members']); }
if (!function_exists('aieo_ds_pretty')) {
function aieo_ds_pretty($value) {
return (string) $value;
}
}
?>
'duplicate-simples-duplicate-products',
'title' => __('Detected groups', 'ai-eshop-optimizer'),
'description' => __('These groups were found automatically. Each one shows the evidence behind it, so you can judge it before doing anything. Preview always comes before a merge, and every merge can be undone.', 'ai-eshop-optimizer'),
);
if (!$available) :
list($aieo_ds_open, $aieo_ds_close) = AIEO_DMM_UI::card($aieo_ds_detected);
echo $aieo_ds_open;
$aieo_ds_note = \Rooster\Admin\States::state(
'not-run',
array(
'title' => __('The similarity engine has not produced its data yet.', 'ai-eshop-optimizer'),
'text' => __('This report reads the semantic engine\'s product-similarity graph. Once the engine has indexed the catalogue, the groups appear here automatically.', 'ai-eshop-optimizer'),
)
);
echo $aieo_ds_note;
echo $aieo_ds_close;
return;
endif;
list($aieo_ds_open, $aieo_ds_close) = AIEO_DMM_UI::card(array(
'anchor' => 'duplicate-simples-threshold',
'icon' => 'sliders-horizontal',
'title' => __('Threshold', 'ai-eshop-optimizer'),
'description' => __('A higher value groups fewer products, only near copies; a lower value catches more, with more false matches.', 'ai-eshop-optimizer'),
'footer' => \Rooster\Admin\States::save_button('aieo-card-duplicate-simples-threshold-form'),
));
echo $aieo_ds_open;
$aieo_ds_row = \Rooster\Admin\Ui::field_row(array(
'id' => 'aieo-ds-threshold',
'label' => __('How alike two products must be before they are grouped', 'ai-eshop-optimizer'),
'control' => \Rooster\Admin\Ui::input('threshold', number_format($threshold, 2, '.', ''), array(
'id' => 'aieo-ds-threshold',
'type' => 'number',
'xs' => true,
'min' => '0.5',
'max' => '1',
'step' => '0.01',
)),
'help' => __('Higher finds fewer, safer groups. Lower finds more, including ranges that only look alike — twenty lipstick shades resemble each other as much as three colours of one hat, and they are not the same thing.', 'ai-eshop-optimizer'),
));
echo AIEO_DMM_UI::card_form('aieo_dmm_dupsimple_save', 'duplicate_simples', 'aieo-card-duplicate-simples-threshold-form', '