1)); } list($aieo_pn_open, $aieo_pn_close) = AIEO_DMM_UI::card(array( 'anchor' => 'product-needs-most-impactful-products-without-needs', 'icon' => 'zap', 'title' => __('Best sellers with no needs', 'ai-eshop-optimizer'), 'description' => __('A category says what a product is. A need says what it is FOR — dry skin, a gift, a first colour at home — and that is how people actually ask for things.', 'ai-eshop-optimizer'), 'flush' => true, )); echo $aieo_pn_open; ?> __('That gap matters more every month. Shoppers no longer only browse categories: they describe a problem, to your search box, to an on-site assistant, or to an AI that answers before they ever reach a shop. All three match on intent, and a product with no need attached has nothing for them to match against — however well it sells, and however good it is. It is not ranked lower; it is simply not a candidate.', 'ai-eshop-optimizer'), __('Where else do needs count?', 'ai-eshop-optimizer') => __('The same tags feed your own storefront filters and the recommendation engine, so one afternoon of tagging pays three times. Start at the top of the list below: it is ordered by what your untagged products actually sell, because an untagged best-seller costs far more than an untagged long-tail item.', 'ai-eshop-optimizer'), ) as $aieo_pn_ask => $aieo_pn_why) { echo class_exists('\Rooster\Admin\Guidance') ? \Rooster\Admin\Guidance::text($aieo_pn_why, 'guidance', array('question' => $aieo_pn_ask)) : '
' . esc_html($aieo_pn_why) . '
'; } ?> 0 ? 'warning' : 'mono', array('inline' => true)) : '' . $aieo_pn_missing . '
'; echo $aieo_pn_missing; $aieo_pn_rows = array(); foreach ( $impactful as $aieo_pn_r ) { $aieo_pn_pid = (int) $aieo_pn_r['pid']; $aieo_pn_title = (string) $aieo_pn_r['title']; $aieo_pn_rows[] = array( 'pid' => $aieo_pn_pid, 'title' => '' !== $aieo_pn_title ? $aieo_pn_title : __( '— deleted —', 'ai-eshop-optimizer' ), 'sku' => (string) $aieo_pn_r['sku'], 'qty' => (int) $aieo_pn_r['qty'], 'turnover' => (float) $aieo_pn_r['turnover'], 'edit_link' => (string) $aieo_pn_r['edit_link'], 'select_link' => (string) $aieo_pn_r['select_link'], ); } AIEO_Table::render( array( 'page_id' => 'product_needs', 'row_key' => 'pid', 'rows' => $aieo_pn_rows, 'caps' => array( 'search' => true ), 'empty' => __( 'Every product with sales already has at least one need assigned. Nothing to action here.', 'ai-eshop-optimizer' ), 'columns' => array( array( 'key' => 'pid', 'label' => __( 'Product ID', 'ai-eshop-optimizer' ), 'type' => 'id', 'width' => '80px' ), array( 'key' => 'title', 'label' => __( 'Title', 'ai-eshop-optimizer' ), 'type' => 'link', 'format' => array( 'href' => 'edit_link', 'external' => true ), ), array( 'key' => 'sku', 'label' => __( 'SKU', 'ai-eshop-optimizer' ), 'type' => 'code' ), array( 'key' => 'qty', 'label' => __( 'Qty sold', 'ai-eshop-optimizer' ), 'type' => 'integer', 'width' => '120px' ), array( 'key' => 'turnover', 'label' => __( 'Turnover', 'ai-eshop-optimizer' ), 'type' => 'money', 'width' => '150px' ), ), 'actions' => array( array( 'id' => 'edit-needs', 'label' => __( 'Edit needs', 'ai-eshop-optimizer' ), 'description' => __( 'Opens the needs editor with this product.', 'ai-eshop-optimizer' ), 'class' => 'rooster-admin-button rooster-admin-button--secondary rooster-admin-button--sm', 'href' => static function ( $row ) { return $row['select_link']; }, ), ), ) ); echo $aieo_pn_close; if ($aieo_pn_band_close) { rooster_admin_band_close(); } if ($aieo_pn_band_open) { rooster_admin_band_open(array('cols' => 2)); } list($aieo_pn_open, $aieo_pn_close) = AIEO_DMM_UI::card(array( 'anchor' => 'product-needs-editor', 'icon' => 'pencil-line', 'title' => __('Product needs editor', 'ai-eshop-optimizer'), 'description' => __('Pick a product, then check off which needs it addresses. Drag the selected chips to reorder.', 'ai-eshop-optimizer'), )); echo $aieo_pn_open; ?> 0 && function_exists('wc_get_product')) { $aieo_pn_product = wc_get_product($preselect_pid); if ($aieo_pn_product) { $aieo_pn_option = ''; } } $aieo_pn_product_row = \Rooster\Admin\Ui::field_row(array( 'id' => 'aieo-dmm-needs-product', 'label' => __('Product', 'ai-eshop-optimizer'), 'control' => '', )); ?>