' . ''; } public static function syncStatusProduct() { $value = syncBasalamSettings()->getSettings(SettingsConfig::SYNC_STATUS_PRODUCT) == true ? false : true; echo ''; } public static function syncStatusOrder() { $value = syncBasalamSettings()->getSettings(SettingsConfig::SYNC_STATUS_ORDER) == true ? false : true; echo ''; } public static function renderAutoConfirmOrderButton() { $value = syncBasalamSettings()->getSettings(SettingsConfig::AUTO_CONFIRM_ORDER) == true ? false : true; echo ''; } public static function renderDefaultWeight() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::DEFAULT_WEIGHT); echo ''; } public static function renderPackageWeight() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::DEFAULT_PACKAGE_WEIGHT); echo ''; } public static function renderDefaultPreparation() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::DEFAULT_PREPARATION); echo ''; } public static function renderCapPreparationToCategoryMax() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::CAP_PREPARATION_TO_CATEGORY_MAX); echo ''; } public static function renderDefaultStockQuantity() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::DEFAULT_STOCK_QUANTITY); echo ''; } public static function renderSafeStock() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::SAFE_STOCK); echo ''; } public static function renderVariableProductStockSource() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::VARIABLE_PRODUCT_STOCK_SOURCE); echo ''; } public static function renderPriceChange() { static $priceChangeControlIndex = 0; $priceChangeControlIndex++; $current_value = syncBasalamSettings()->getSettings(SettingsConfig::PRICE_CHANGE_VALUE); $is_commission = PriceAdjustment::isCommission($current_value); $is_checked = $is_commission ? 'checked' : ''; $input_disabled = $is_commission ? 'disabled' : ''; $input_value = $is_commission || !is_numeric($current_value) ? '' : number_format((int) $current_value); $checkbox_id = 'toggle-percentage-' . $priceChangeControlIndex; $hidden_input_id = 'price-change-value-' . $priceChangeControlIndex; $text_input_id = 'price-change-input-' . $priceChangeControlIndex; echo '
'; echo ''; echo '' . esc_html(PriceAdjustment::unitLabel($current_value)) . ''; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo ''; } public static function renderDefaultRound() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::ROUND_PRICE); echo ''; } public static function renderSyncProduct() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::SYNC_PRODUCT_FIELDS); echo ''; } public static function renderWholesaleProducts() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::ALL_PRODUCTS_WHOLESALE); echo ''; } public static function renderAttrAddToDesc() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::ADD_ATTR_TO_DESC_PRODUCT); echo ''; } public static function renderOrderStatus() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::ORDER_STATUES_TYPE); echo ''; } public static function renderShortAttrAddToDesc() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::ADD_SHORT_DESC_TO_DESC_PRODUCT); echo ''; } public static function renderProductPrice() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::PRODUCT_PRICE_FIELD); echo ''; } public static function renderProductDiscountDuration() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::DISCOUNT_DURATION); echo ''; } public static function renderDiscountReductionPercent() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::DISCOUNT_REDUCTION_PERCENT); echo ''; } public static function renderTasksPerMinute() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::TASKS_PER_MINUTE); $is_auto = syncBasalamSettings()->getSettings(SettingsConfig::TASKS_PER_MINUTE_AUTO) == 'true'; $disabled = $is_auto ? 'disabled' : ''; echo ''; } public static function renderTasksPerMinuteAutoToggle() { $is_auto = syncBasalamSettings()->getSettings(SettingsConfig::TASKS_PER_MINUTE_AUTO) == 'true'; $checked = $is_auto ? 'checked' : ''; echo ''; } public static function renderTasksPerMinuteInfo() { $is_auto = syncBasalamSettings()->getSettings(SettingsConfig::TASKS_PER_MINUTE_AUTO) == 'true'; $display_style = $is_auto ? '' : 'display: none;'; $monitor = syncBasalamContainer()->get(\SyncBasalam\Services\SystemResourceMonitor::class); $optimal = $monitor->calculateOptimalTasksPerMinute(); echo '
'; echo '
'; echo '
'; echo '
'; echo '🚀 تعداد تسک های اجرایی در دقیقه: '; echo '' . esc_html($optimal) . ' تسک در دقیقه'; echo '
'; echo '
'; echo '
'; echo '
'; } public static function renderPrefixProductTitle() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::PRODUCT_PREFIX_TITLE); echo ''; } public static function renderSuffixProductTitle() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::PRODUCT_SUFFIX_TITLE); echo ''; } public static function renderAttributeSuffixEnabled() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::PRODUCT_ATTRIBUTE_SUFFIX_ENABLED); $checked = $current_value == 'yes' ? 'checked' : ''; echo ''; echo ''; } public static function renderAttributeSuffixPriority() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::PRODUCT_ATTRIBUTE_SUFFIX_PRIORITY); $is_enabled = syncBasalamSettings()->getSettings(SettingsConfig::PRODUCT_ATTRIBUTE_SUFFIX_ENABLED) == 'yes'; $disabled = $is_enabled ? '' : 'disabled'; echo ''; } public static function renderMapOptionsProduct() { ?>
'; echo self::renderSingleCheckbox(SettingsConfig::SYNC_PRODUCT_FIELD_NAME, 'نام'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML is escaped inside the component method. echo self::renderSingleCheckbox(SettingsConfig::SYNC_PRODUCT_FIELD_SKU, 'کد محصول (SKU)'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML is escaped inside the component method. echo self::renderSingleCheckbox(SettingsConfig::SYNC_PRODUCT_FIELD_PHOTOS, 'عکس'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML is escaped inside the component method. echo self::renderSingleCheckbox(SettingsConfig::SYNC_PRODUCT_FIELD_PRICE, 'قیمت'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML is escaped inside the component method. echo self::renderSingleCheckbox(SettingsConfig::SYNC_PRODUCT_FIELD_STOCK, 'موجودی'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML is escaped inside the component method. echo self::renderSingleCheckbox(SettingsConfig::SYNC_PRODUCT_FIELD_WEIGHT, 'وزن'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML is escaped inside the component method. echo self::renderSingleCheckbox(SettingsConfig::SYNC_PRODUCT_FIELD_DESCRIPTION, 'توضیحات'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML is escaped inside the component method. echo self::renderSingleCheckbox(SettingsConfig::SYNC_PRODUCT_FIELD_ATTR, 'ویژگی ها'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML is escaped inside the component method. echo self::renderSingleCheckbox(SettingsConfig::SYNC_PRODUCT_FIELD_VIDEO, 'ویدیو'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML is escaped inside the component method. echo ''; echo '
'; echo '
'; echo self::renderSingleCheckbox(SettingsConfig::SYNC_PRODUCT_FIELD_VARIANT_PRICE, 'قیمت متغیرها'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML is escaped inside the component method. echo self::renderSingleCheckbox(SettingsConfig::SYNC_PRODUCT_FIELD_VARIANT_STOCK, 'موجودی متغیرها'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML is escaped inside the component method. echo '
'; } private static function renderSingleCheckbox($field_key, $label) { return ''; } public static function renderDeveloperMode() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::DEVELOPER_MODE); echo ''; } public static function renderCategoryOptionsMapping($data) { $delete_nonce = wp_create_nonce('basalam_delete_mapped_option_nonce'); echo '
'; echo '

لیست ویژگی ها :

'; echo ""; echo ''; echo ''; if (!empty($data)) { foreach ($data as $item) { echo ''; echo ''; echo ''; echo ''; echo ''; } } echo '
نام ویژگی در ووکامرسنام ویژگی در باسلامعملیات
' . esc_html($item['woo_name']) . '' . esc_html($item['sync_basalam_name']) . '
'; echo '
'; } public static function renderShippingMethod() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::ORDER_SHIPPING_METHOD); echo ''; } public static function renderCustomerPrefixName() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::CUSTOMER_PREFIX_NAME); echo ''; } public static function renderCustomerSuffixName() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::CUSTOMER_SUFFIX_NAME); echo ''; } public static function renderVideoSource() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::VIDEO_SOURCE) ?: 'inherit'; echo ''; } public static function renderVideoInheritMode() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::VIDEO_INHERIT_MODE) ?: 'auto'; echo ''; } public static function renderVideoMetaKey() { $current_value = syncBasalamSettings()->getSettings(SettingsConfig::VIDEO_META_KEY); echo ''; } }