'aieo-ts-label', 'medium' => true)), '', array('id' => 'aieo-ts-label')); echo '
' . $aieo_ts_out . '
'; ?>
array( 'name' => 'brand_term_ids', 'label' => __( 'Brands', 'ai-eshop-optimizer' ), 'help' => __( 'Leave empty to accept any brand.', 'ai-eshop-optimizer' ) ), 'category' => array( 'name' => 'category_term_ids', 'label' => __( 'Categories', 'ai-eshop-optimizer' ), 'help' => __( 'Leave empty to accept any category.', 'ai-eshop-optimizer' ) ), 'need' => array( 'name' => 'need_term_ids', 'label' => __( 'Needs', 'ai-eshop-optimizer' ), 'help' => __( 'Leave empty to accept any need.', 'ai-eshop-optimizer' ) ), ) as $aieo_ts_entity => $aieo_ts_field ) { $aieo_ts_field['form'] = $aieo_ts_form; echo AIEO_DMM_Product_Picker::entity_field( $aieo_ts_entity, $aieo_ts_field ); } echo AIEO_DMM_Product_Picker::entity_field( 'product', array( 'name' => 'product_ids', 'form' => $aieo_ts_form, 'label' => __( 'Specific products (optional)', 'ai-eshop-optimizer' ), 'help' => __( 'When set, the row qualifies ONLY when the cart / candidate set contains at least one of these (in addition to the filters beside it). Variations roll up to their parent.', 'ai-eshop-optimizer' ), 'selected' => isset( $ts_include_ids ) ? $ts_include_ids : array(), ) ); ?>
'code_patterns', 'label' => __('Product codes (optional)', 'ai-eshop-optimizer'), 'selected' => isset($ts_include_codes) ? $ts_include_codes : array(), )); ?>
'aieo-ts-min-subtotal', 'type' => 'number', 'step' => 'any', 'min' => '0', 'placeholder' => '0.00', 'short' => true, 'unit' => $aieo_ts_cur, 'help' => true)), __('0 = no minimum; any matching product triggers the offer / qualifies the row for inclusion.', 'ai-eshop-optimizer'), array('id' => 'aieo-ts-min-subtotal') ); $aieo_ts_times = ! empty( $ts_times ) && class_exists( 'AIEO_DMM_Offer_Forms' ); $aieo_ts_from = AIEO_Kit::input('date_from', '', array('id' => 'aieo-ts-date-from', 'type' => 'date')); $aieo_ts_to = AIEO_Kit::input('date_to', '', array('id' => 'aieo-ts-date-to', 'type' => 'date')); $aieo_ts_out .= AIEO_Kit::row(__('From', 'ai-eshop-optimizer'), $aieo_ts_times ? AIEO_DMM_Offer_Forms::time_beside('start', $aieo_ts_from, 'aieo-ts-date-from') : $aieo_ts_from, $aieo_ts_times ? AIEO_DMM_Offer_Forms::times_help() : '', array('id' => 'aieo-ts-date-from')); $aieo_ts_out .= AIEO_Kit::row(__('To', 'ai-eshop-optimizer'), $aieo_ts_times ? AIEO_DMM_Offer_Forms::time_beside('end', $aieo_ts_to, 'aieo-ts-date-to') : $aieo_ts_to, '', array('id' => 'aieo-ts-date-to')); echo $aieo_ts_out; ?>
'AND', 'OR' => 'OR'), array('AND'), array( 'type' => 'radio', 'descriptions' => array( 'AND' => __('every set targeting filter must match (brand AND category AND need AND specific-products), and the cart / candidate set totals at least the minimum subtotal', 'ai-eshop-optimizer'), 'OR' => __('any non-empty targeting filter that hits qualifies the row, OR the whole cart / candidate set reaches the minimum subtotal', 'ai-eshop-optimizer'), ), )), '', array('id' => 'aieo-ts-operator', 'group' => true) ); $aieo_ts_out .= AIEO_Kit::row(__('Status', 'ai-eshop-optimizer'), AIEO_Kit::check('enabled', __('Enabled', 'ai-eshop-optimizer'), true, array('id' => 'aieo-ts-enabled')), '', array('id' => 'aieo-ts-enabled', 'group' => true)); echo $aieo_ts_out; ?>
array( 'name' => 'excluded_brand_ids', 'label' => __( 'Excluded brands', 'ai-eshop-optimizer' ) ), 'category' => array( 'name' => 'excluded_category_ids', 'label' => __( 'Excluded categories', 'ai-eshop-optimizer' ) ), 'need' => array( 'name' => 'excluded_need_ids', 'label' => __( 'Excluded needs', 'ai-eshop-optimizer' ) ), ) as $aieo_ts_entity => $aieo_ts_field ) { $aieo_ts_field['mode'] = 'exclude'; $aieo_ts_field['form'] = $aieo_ts_form; echo AIEO_DMM_Product_Picker::entity_field( $aieo_ts_entity, $aieo_ts_field ); } echo AIEO_DMM_Product_Picker::entity_field( 'product', array( 'name' => 'excluded_product_ids', 'mode' => 'exclude', 'form' => $aieo_ts_form, 'label' => __( 'Excluded specific products', 'ai-eshop-optimizer' ), 'help' => __( 'When the cart / candidate row matches ANY of these, it is NOT qualified. Variations roll up to their parent.', 'ai-eshop-optimizer' ), 'selected' => isset( $ts_exclude_ids ) ? $ts_exclude_ids : array(), ) ); ?>
'excluded_code_patterns', 'label' => __('Excluded product codes', 'ai-eshop-optimizer'), 'help' => __('Same patterns. A product whose SKU or barcode matches any of these is never qualified, whatever the targeting above says.', 'ai-eshop-optimizer'), 'selected' => isset($ts_exclude_codes) ? $ts_exclude_codes : array(), )); ?>