';
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 '
' . esc_html($item['woo_name']) . '
';
echo '
' . esc_html($item['sync_basalam_name']) . '
';
echo '
';
echo '
';
}
}
echo '
';
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 '';
}
}