get_settings_for_display(); $repeater_pages = isset($settings['abcbiz_cost_cal_pages_list']) ? $settings['abcbiz_cost_cal_pages_list'] : []; $totalPages = !empty($repeater_pages) ? count($repeater_pages) : 1; // Fetch saved package names from the dashboard settings $cost_estimation_options = get_option('abcbiz_cost_estimation_options', []); $package_1 = !empty($cost_estimation_options['cost_estimation_package_1']) ? esc_html($cost_estimation_options['cost_estimation_package_1']) : ''; $package_2 = !empty($cost_estimation_options['cost_estimation_package_2']) ? esc_html($cost_estimation_options['cost_estimation_package_2']) : ''; $package_3 = !empty($cost_estimation_options['cost_estimation_package_3']) ? esc_html($cost_estimation_options['cost_estimation_package_3']) : ''; // Generate the dynamic URL to the settings page $settings_url = admin_url('admin.php?page=abcbiz_settings&tab=cost_estimation'); //button label $button_label = isset($settings['abcbiz_cost_calculator_button_label']) ? $settings['abcbiz_cost_calculator_button_label'] : esc_html__('Get Cost Estimation', 'abcbiz-addons'); //button url $button_url = isset($settings['abcbiz_cost_calculator_button_url']) ? $settings['abcbiz_cost_calculator_button_url'] : ''; //currency $currency = isset($settings['abcbiz_cost_calculator_currency']) ? $settings['abcbiz_cost_calculator_currency'] : '$'; //default value $default_value = isset($settings['abcbiz_cost_calculator_default_value']) ? $settings['abcbiz_cost_calculator_default_value'] : '2'; // Use Elementor's unique ID $unique_id = $this->get_id(); if ($repeater_pages) { $data = []; foreach ($repeater_pages as $index => $page) { $step = $index + 1; $data["$step"]["abcbiz_c_p_low"] = isset($page['abcbiz_cost_calculator_price_1']) ? $page['abcbiz_cost_calculator_price_1'] : 0; $data["$step"]["abcbiz_c_p_medium"] = isset($page['abcbiz_cost_calculator_price_2']) ? $page['abcbiz_cost_calculator_price_2'] : 0; $data["$step"]["abcbiz_c_p_high"] = isset($page['abcbiz_cost_calculator_price_3']) ? $page['abcbiz_cost_calculator_price_3'] : 0; } // Convert pricing data to a JSON string and store it in a data attribute $jsonData = esc_attr(json_encode($data)); } ?>

' . esc_html__('Package names are not configured yet. Please go to the %ssettings page%s to configure them.', 'abcbiz-addons') . '

', '', '' ); } ?>

0