render_offer_effectiveness_card($nonce, $ajax);
}
private function render_offer_effectiveness_card($nonce, $ajax) {
list($aieo_oe_open, $aieo_oe_close) = AIEO_DMM_UI::card(array(
'anchor' => 'offer-effectiveness-monthly-breakdown',
'icon' => 'calendar-days',
'title' => __('Monthly breakdown by offer type', 'ai-eshop-optimizer'),
'description' => __('What every offer you run actually costs and returns, month by month — gifts, discounts and free shipping side by side, from the attribution log written at order time.', 'ai-eshop-optimizer'),
'flush' => true,
));
echo $aieo_oe_open;
$aieo_oe_note = \Rooster\Admin\Guidance::text(__('Real P&L per offer per month. "Applied" = the value handed to the customer (gift retail × qty, discount amount forgone, etc.). "Cost" = what it actually cost us (COGS for gifts, the would-have-been carrier rate for free-shipping, the same amount for plain discounts). "Net" = applied minus cost — the indicative revenue impact. Free-shipping rows show "Pending" until the resolver back-fills the carrier cost (runs nightly at 03:30, or run it manually from Performance → Shipment cost reports).', 'ai-eshop-optimizer'), 'guidance', array('question' => __('What do Applied, Cost and Net mean?', 'ai-eshop-optimizer')));
echo $aieo_oe_note;
$aieo_oe_measures = \Rooster\Admin\Guidance::text(__('What each offer brought is measured twice. "Orders" and "Order revenue" count every order an offer touched, once, with the order\'s whole total. "Product units" and "Product revenue" count only the offer\'s own products: the order lines it targets (for a gift, the products that earned it; for free shipping, the products of the rule that made the shipping free; for a coupon, the lines it discounted). Group by "Offer total" or "Month × Offer" to read one campaign a row; in a coarser grouping an order line that two offers target counts for both. Orders recorded before the product figures existed show none.', 'ai-eshop-optimizer'), 'guidance', array('question' => __('What do the order and product figures count?', 'ai-eshop-optimizer')));
echo $aieo_oe_measures;
echo '
';
$aieo_oe_first = \Rooster\Admin\States::state('first-use', array('title' => __('No attribution rows match the current filters. If you just enabled the module, place a few orders or run the retrospective free-shipping scan under Performance → Shipment cost reports.', 'ai-eshop-optimizer')));
echo '