'); // 2. Analysis Verdict affl_print_html_svg(do_shortcode('[affl_analysis_overview product_id="' . $product_id . '"]')); // 3. Evaluation Criteria affl_print_html_svg(do_shortcode('[affl_criteria_review product_id="' . $product_id . '"]')); // 4. Pros & Cons affl_print_html_svg(do_shortcode('[affl_pros_cons product_id="' . $product_id . '"]')); // 5. Key Features affl_print_html_svg(do_shortcode('[affl_features product_id="' . $product_id . '" columns="3"]')); // 6. Deep Review affl_print_html_svg(do_shortcode('[affl_deep_review product_id="' . $product_id . '"]')); // 7. Alternatives affl_print_html_svg(do_shortcode('[affl_product_alternatives product_id="' . $product_id . '"]')); // 8. Author Box affl_print_html_svg(do_shortcode('[affl_author_box]')); // 9. Sticky Verdict affl_print_html_svg(do_shortcode('[affl_sticky_verdict product_id="' . $product_id . '"]')); // 10. Bottom CTA affl_print_html_svg(do_shortcode('[affl_cta product_id="' . $product_id . '" style="dark"]')); affl_print_html_svg('
'); } else { // OLD LOGIC (To be removed later) $template_id = get_post_meta($product_id, AFFILILABS_META_KEY_APPLIED_PRODUCT_TEMPLATE_ID, true); $template_applied = false; if ($template_id) { $template = get_post($template_id); if ($template && $template->post_type === 'affl_template') { $template_modules = get_post_meta($template_id, '_affl_template_data', true); if (!empty($template_modules)) { $template_applied = true; foreach ($template_modules as $module) { $shortcode_output = do_shortcode('[affl_' . $module . ' id="' . $product_id . '"]'); if (empty(trim($shortcode_output))) { continue; } $class_name = 'affl_' . str_replace('_', '-', $module); if ($module === 'name') { affl_print_html_svg('

' . $shortcode_output . '

'); } elseif ($module === 'description' || $module === 'features' || $module === 'pros' || $module === 'cons' || $module === 'criteria') { affl_print_html_svg('
' . $shortcode_output . '
'); } else { affl_print_html_svg('
' . $shortcode_output . '
'); } } } } } if (!$template_applied) { $rating = get_post_meta( $product_id, AFFILILABS_META_KEY_RATING, true ); $affiliate_link = get_post_meta( $product_id, AFFILILABS_META_KEY_AFFILIATE_LINK, true ); $pros = get_post_meta( $product_id, AFFILILABS_META_KEY_PROS, true ); $cons = get_post_meta( $product_id, AFFILILABS_META_KEY_CONS, true ); ?>
>
', '' ); if ( ! empty( $rating ) ) : $rating_html = AFFLProductService::get_rating_stars_html( (float) $rating ); if ( ! empty( $rating_html ) ) : affl_print_html_svg( '
' . $rating_html . '
' ); endif; endif; if ( ! empty( $affiliate_link ) ) : ?>

' ); foreach ( $pro_items as $item ) { if ( ! empty( $item ) ) { affl_print_html_svg( '
  • Pro ' . esc_html( $item ) . '
  • ' ); } } affl_print_html_svg( '' ); endif; ?>

    ' ); foreach ( $con_items as $item ) { if ( ! empty( $item ) ) { affl_print_html_svg( '
  • Con ' . esc_html( $item ) . '
  • ' ); } } affl_print_html_svg( '' ); endif; ?>
    '', ) ); ?>