IFUNGOO | Modular Electric Propulsion Systems for B2B


$value_item) {
if (preg_match(‘/_unit$/i’, (string) $value_key) && is_scalar($value_item)) {
$unit_fields[preg_replace(‘/_unit$/i’, ”, (string) $value_key)] = trim((string) $value_item);
}
}

$unit_overrides = array(
‘rated_power_value’ => ‘W’, ‘rated_power’ => ‘W’, ‘power_w’ => ‘W’,
‘thrust_value’ => ”, ‘thrust_kgf’ => ‘kgf’, ‘thrust_lbf’ => ‘lbf’,
‘nominal_voltage’ => ‘V’, ‘input_voltage’ => ‘V’, ‘battery_voltage’ => ‘V’,
‘capacity_ah’ => ‘Ah’, ‘battery_capacity_ah’ => ‘Ah’,
‘capacity_wh’ => ‘Wh’, ‘battery_energy_wh’ => ‘Wh’, ‘energy_wh’ => ‘Wh’,
‘weight_kg’ => ‘kg’, ‘net_weight_kg’ => ‘kg’, ‘weight_including_battery_kg’ => ‘kg’,
‘rated_speed_rpm’ => ‘r/min’, ‘rated_rotational_speed’ => ‘r/min’,
‘maximum_speed_kmh’ => ‘km/h’, ‘maximum_speed_ms’ => ‘m/s’,
‘charging_time_hours’ => ‘h’, ‘runtime_minutes’ => ‘min’,
‘maximum_load_kg’ => ‘kg’, ‘maximum_current_a’ => ‘A’,
);

foreach ($definitions as $definition) {
$name = isset($definition[‘name’]) ? (string) $definition[‘name’] : ”;
if (!$name || preg_match(‘/(^|_)(status|note|verification|verified|evidence|source)(_|$)/i’, $name)) {
continue;
}

$type = isset($definition[‘type’]) ? (string) $definition[‘type’] : ‘text’;
$value = array_key_exists($name, $values) ? $values[$name] : null;

if ($type === ‘group’ && is_array($value)) {
$flatten_manual_specs(
isset($definition[‘sub_fields’]) ? $definition[‘sub_fields’] : array(),
$value,
$output,
$prefix . $name . ‘_’
);
continue;
}

if (preg_match(‘/_unit$/i’, $name)) {
continue;
}

$has_value = $type === ‘true_false’
? ($value !== null && $value !== ”)
: (is_array($value) ? !empty($value) : ($value !== null && trim((string) $value) !== ”));
if (!$has_value) {
continue;
}

$display_value = $format_manual_spec_value($value, $type);
if ($display_value === ”) {
continue;
}

$label = !empty($definition[‘label’])
? trim((string) $definition[‘label’])
: ucwords(str_replace(‘_’, ‘ ‘, $name));
$label = preg_replace(‘/s+Value$/i’, ”, $label);

$unit = !empty($definition[‘append’]) ? trim((string) $definition[‘append’]) : ”;
if (!$unit && isset($unit_overrides[$name])) {
$unit = $unit_overrides[$name];
}
if (!$unit) {
$unit_prefix = preg_replace(‘/_value$/i’, ”, $name);
if (isset($unit_fields[$unit_prefix])) {
$unit = $unit_fields[$unit_prefix];
}
}
if ($unit && stripos($display_value, $unit) === false) {
$display_value .= ‘ ‘ . $unit;
}

$key = sanitize_key($prefix . $name);
$output[$key] = array(
‘label’ => $label,
‘value’ => $display_value,
);
}
};

$build_manual_specs = static function ($product_id) use (&$flatten_manual_specs, $format_manual_spec_value) {
if (!function_exists(‘get_field’)) {
return array();
}

$values = get_field(‘comparison_specs’, $product_id);
if (!is_array($values)) {
return array();
}

$output = array();
$field_object = function_exists(‘get_field_object’)
? get_field_object(‘comparison_specs’, $product_id, false, true)
: array();
$definitions = is_array($field_object) && !empty($field_object[‘sub_fields’])
? $field_object[‘sub_fields’]
: array();

if ($definitions) {
$flatten_manual_specs($definitions, $values, $output);
}

if (!$output) {
foreach ($values as $name => $value) {
if (
preg_match(‘/(^|_)(status|note|verification|verified|evidence|source|unit)(_|$)/i’, (string) $name) ||
is_object($value) ||
(is_array($value) && !$value) ||
(!is_array($value) && ($value === null || trim((string) $value) === ”))
) {
continue;
}
$display_value = $format_manual_spec_value($value);
if ($display_value === ”) {
continue;
}
$output[sanitize_key((string) $name)] = array(
‘label’ => ucwords(str_replace(‘_’, ‘ ‘, (string) $name)),
‘value’ => $display_value,
);
}
}

if (!has_term(‘marine-batteries’, ‘product_category’, $product_id)) {
foreach (array_keys($output) as $output_key) {
if (preg_match(‘/(^|_)floatable($|_)/i’, (string) $output_key)) {
unset($output[$output_key]);
}
}
}

return $output;
};

$compare_category = isset($_GET[‘product_category’])
? sanitize_key(wp_unslash($_GET[‘product_category’]))
: ”;

$requested_compare_ids = isset($_GET[‘compare’]) && is_array($_GET[‘compare’])
? array_values(array_filter(array_map(‘absint’, wp_unslash($_GET[‘compare’]))))
: array();

$product_query_args = array(
‘post_type’ => ‘product’,
‘post_status’ => ‘publish’,
‘posts_per_page’ => -1,
‘orderby’ => ‘title’,
‘order’ => ‘ASC’,
);

if ($compare_category !== ”) {
$product_query_args[‘tax_query’] = array(
array(
‘taxonomy’ => ‘product_category’,
‘field’ => ‘slug’,
‘terms’ => $compare_category,
),
);
}

$product_query = new WP_Query($product_query_args);
$products = array();

if ($product_query->have_posts()) {
while ($product_query->have_posts()) {
$product_query->the_post();

$product_id = get_the_ID();
$product_title = get_the_title($product_id);
$product_summary = get_field(‘product_summary’, $product_id);
$product_categories = get_the_terms($product_id, ‘product_category’);
$comparison_group = $build_manual_specs($product_id);

if (is_wp_error($product_categories) || !is_array($product_categories)) {
$product_categories = array();
}

$category_names = array();
$category_slugs = array();

foreach ($product_categories as $product_category_term) {
if ($product_category_term instanceof WP_Term) {
$category_names[] = $product_category_term->name;
$category_slugs[] = $product_category_term->slug;
}
}

$image_html = ”;
$image_attributes = array(
‘class’ => ‘h-full w-full object-cover’,
‘loading’ => ‘lazy’,
‘decoding’ => ‘async’,
‘sizes’ => ‘(min-width: 1024px) 25vw, (min-width: 640px) 50vw, 100vw’,
‘alt’ => $product_title,
);

if (has_post_thumbnail($product_id)) {
$image_html = wp_get_attachment_image(
get_post_thumbnail_id($product_id),
‘large’,
false,
$image_attributes
);
} else {
$fallback_image = get_field(‘featured_image’, $product_id);
$fallback_image_id = 0;

if (is_array($fallback_image) && !empty($fallback_image[‘ID’])) {
$fallback_image_id = absint($fallback_image[‘ID’]);
} elseif (is_numeric($fallback_image)) {
$fallback_image_id = absint($fallback_image);
}

if ($fallback_image_id > 0) {
$image_html = wp_get_attachment_image(
$fallback_image_id,
‘large’,
false,
$image_attributes
);
} elseif (is_array($fallback_image) && !empty($fallback_image[‘url’])) {
$fallback_image_url = esc_url($fallback_image[‘url’]);
$fallback_image_alt = !empty($fallback_image[‘alt’])
? esc_attr($fallback_image[‘alt’])
: esc_attr($product_title);

$image_html = <<
HTML;
} elseif (is_string($fallback_image) && filter_var($fallback_image, FILTER_VALIDATE_URL)) {
$fallback_image_url = esc_url($fallback_image);
$fallback_image_alt = esc_attr($product_title);

$image_html = <<
HTML;
}
}

if ($image_html === ”) {
$placeholder_alt = esc_attr($product_title . ‘ product image placeholder’);

$image_html = <<
HTML;
}

$products[$product_id] = array(
‘id’ => $product_id,
‘title’ => $product_title,
‘permalink’ => get_permalink($product_id),
‘summary’ => is_string($product_summary) ? $product_summary : ”,
‘categories’ => implode(‘, ‘, $category_names),
‘category_slugs’ => $category_slugs,
‘image_html’ => $image_html,
‘specs’ => $comparison_group,
);
}
}

wp_reset_postdata();

$available_product_ids = array_keys($products);
$selected_product_ids = array_values(array_intersect($requested_compare_ids, $available_product_ids));

if (empty($selected_product_ids)) {
$preferred_ids = array();
foreach (array(‘y01’, ‘y01-k’) as $preferred_slug) {
foreach ($products as $candidate_product_id => $candidate_product) {
if (get_post_field(‘post_name’, $candidate_product_id) === $preferred_slug) {
$preferred_ids[] = $candidate_product_id;
break;
}
}
}
if (count($preferred_ids) < 2) { $preferred_ids = array(); foreach ($products as $candidate_product_id => $candidate_product) {
if (in_array(‘electric-thrusters’, $candidate_product[‘category_slugs’], true)) {
$preferred_ids[] = $candidate_product_id;
}
}
}
$selected_product_ids = array_slice(count($preferred_ids) >= 2 ? $preferred_ids : $available_product_ids, 0, 2);
}

$selected_product_ids = array_slice($selected_product_ids, 0, 4);
$selected_products = array();

foreach ($selected_product_ids as $selected_product_id) {
if (isset($products[$selected_product_id])) {
$selected_products[] = $products[$selected_product_id];
}
}

$product_terms = get_terms(
array(
‘taxonomy’ => ‘product_category’,
‘hide_empty’ => false,
‘orderby’ => ‘name’,
‘order’ => ‘ASC’,
)
);

if (is_wp_error($product_terms) || !is_array($product_terms)) {
$product_terms = array();
}

$category_options_html = ‘‘;

foreach ($product_terms as $product_term) {
if ($product_term instanceof WP_Term) {
$term_value = esc_attr($product_term->slug);
$term_label = esc_html($product_term->name);
$term_selected = selected($compare_category, $product_term->slug, false);

$category_options_html .= <<{$term_label}HTML;
}
}

$comparison_field_order = array();
$comparison_field_labels = array();

foreach ($selected_products as $selected_product) {
foreach ($selected_product[‘specs’] as $spec_key => $spec_record) {
if (!in_array($spec_key, $comparison_field_order, true)) {
$comparison_field_order[] = $spec_key;
$comparison_field_labels[$spec_key] = isset($spec_record[‘label’])
? $spec_record[‘label’]
: ucwords(str_replace(‘_’, ‘ ‘, $spec_key));
}
}
}

$comparison_rows = array();
foreach ($comparison_field_order as $field_key) {
$comparison_values = array();
$distinct_values = array();

foreach ($selected_products as $selected_product) {
$spec_record = isset($selected_product[‘specs’][$field_key])
? $selected_product[‘specs’][$field_key]
: null;
$display_value = is_array($spec_record) && isset($spec_record[‘value’])
? (string) $spec_record[‘value’]
: ‘Not applicable for this model’;

$comparison_values[] = array(
‘value’ => $display_value,
‘note’ => ”,
);
$distinct_values[] = $display_value;
}

$comparison_rows[$field_key] = array(
‘label’ => isset($comparison_field_labels[$field_key]) ? $comparison_field_labels[$field_key] : ucwords(str_replace(‘_’, ‘ ‘, $field_key)),
‘values’ => $comparison_values,
‘has_difference’ => count(array_unique($distinct_values)) > 1,
);
}

$category_heading = $compare_category !== ”
? ucwords(str_replace(‘-‘, ‘ ‘, $compare_category))
: ‘All product categories’;

$selected_count = count($selected_products);
$current_page_url = get_permalink();
?>

PRODUCT EVIDENCE WORKSPACE

Compare Models With Clarity

Compare same-category IFUNGOO products using every non-empty parameter currently entered from the IFUNGOO product manual.

Available product records

4

Comparison columns

Record-led

Verification approach

01 / SELECT A CATEGORY

Build a useful comparison

Choose a product category, then select models that can reasonably be compared side by side. Final compatibility depends on the craft, load, installation and intended operating conditions.

PRODUCT CATEGORY

MODELS TO COMPARE






02 / CURRENT VIEW

Select up to four models for a focused review.

selected

No product records are available for this selection.

LIVE COMPARISON

model selected in this view

03 / SPECIFICATION REVIEW

Responsive model comparison

Highlighted cells indicate a difference between the selected records. Values are not performance guarantees.

$comparison_value): ?>

Values shown are taken from the non-empty IFUNGOO product manual fields currently entered for each model. Fields outside a model’s product type are marked as not applicable.

04 / APPLICATION CONTEXT

Compare the system, not only the motor

Model selection should be reviewed with the vessel, total load, battery, steering mount, duty cycle and installation method. Use the comparison as a technical starting point before sample evaluation or commercial planning.

USE CASE

Compact craft

Review motor weight, mounting method, battery portability and intended operating conditions.

INTEGRATION

System fit

Confirm voltage, capacity, steering, connectors, installation space and compatible related products.

VALIDATION

Local testing

Request a sample or evaluation system before making inventory, compliance or downstream performance commitments.

05 / RELATIONSHIPS

Compatibility and source trail

Product relationships and documents are shown only when they are attached to the selected WordPress records. Ask the IFUNGOO team to confirm configuration details for your craft and market.


PRODUCT RECORD

COMPATIBLE PRODUCTS


    ID;
    } elseif (is_numeric($compatible_product)) {
    $compatible_product_id = absint($compatible_product);
    } elseif (is_array($compatible_product) && !empty($compatible_product[‘ID’])) {
    $compatible_product_id = absint($compatible_product[‘ID’]);
    }

    if ($compatible_product_id <= 0) { continue; } ?>

  • ↗

Not listed in product manual

RELATED DOCUMENTS


    ID;
    } elseif (is_numeric($related_document)) {
    $related_document_id = absint($related_document);
    } elseif (is_array($related_document) && !empty($related_document[‘ID’])) {
    $related_document_id = absint($related_document[‘ID’]);
    }

    if ($related_document_id <= 0) { continue; } ?>

  • ↗

Not listed in product manual






06 / NEXT STEP

Request a Sample

Share your vessel, target application and evaluation requirements. The IFUNGOO team can help review the selected models, compatible system elements, documentation and next-step testing.