Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

NopCommonDefaults.cs

using Nop.Core.Caching;

namespace Nop.Services.Common;

/// 
/// Represents default values related to common services
/// 
public static partial class NopCommonDefaults
{
    /// 
    /// Gets a request path to the keep alive URL
    /// 
    public static string KeepAlivePath => "keepalive/index";

    #region Address attributes

    /// 
    /// Gets a name of the custom address attribute control
    /// 
    /// 
    /// {0} : address attribute id
    /// 
    public static string AddressAttributeControlName => "address_attribute_{0}";

    #endregion

    #region Maintenance

    /// 
    /// Gets a default timeout (in milliseconds) before restarting the application
    /// 
    public static int RestartTimeout => 3000;

    /// 
    /// Gets a path to the database backup files
    /// 
    public static string DbBackupsPath => "db_backups\\";

    /// 
    /// Gets a database backup file extension
    /// 
    public static string DbBackupFileExtension => "bak";

    #endregion

    #region Favicon and app icons

    /// 
    /// Gets a name of the file with code for the head element
    /// 
    public static string HeadCodeFileName => "html_code.html";

    /// 
    ///  Gets a head link for the favicon
    /// 
    public static string SingleFaviconHeadLink => "";

    /// 
    /// Gets a path to the favicon and app icons
    /// 
    public static string FaviconAndAppIconsPath => "icons/icons_{0}";

    /// 
    /// Gets a name of the old favicon icon for current store
    /// 
    public static string OldFaviconIconName => "favicon-{0}.ico";

    #endregion

    #region Localization client-side validation

    /// 
    /// Gets a path to the localization client-side validation 
    /// 
    public static string LocalePatternPath => "lib_npm/cldr-data/main/{0}";

    /// 
    /// Gets a name of the archive with localization of templates
    /// 
    public static string LocalePatternArchiveName => "main.zip";

    /// 
    /// Gets a name of the default pattern locale
    /// 
    public static string DefaultLocalePattern => "en";

    /// 
    /// Gets default CultureInfo 
    /// 
    public static string DefaultLanguageCulture => "en-US";

    /// 
    /// Gets minimal progress of language pack translation to download and install
    /// 
    public static int LanguagePackMinTranslationProgressToInstall => 80;

    /// 
    /// Gets a name of generic attribute to store the value of 'LanguagePackProgress'
    /// 
    public static string LanguagePackProgressAttribute => "LanguagePackProgress";

    #endregion

    #region nopCommerce official site

    /// 
    /// Gets a path to request the nopCommerce official site for license compliance check
    /// 
    /// 
    /// {0} : store URL
    /// {1} : nopCommerce version
    /// {2} : admin email
    /// {3} : language code
    /// 
    public static string NopLicenseCheckPath => "license-check?url={0}&version={1}&email={2}&language={3}";

    /// 
    /// Gets a path to request the nopCommerce official site for news RSS
    /// 
    /// 
    /// {0} : nopCommerce version
    /// {1} : whether the store based is on the localhost
    /// {2} : whether advertisements are hidden
    /// {3} : store URL
    /// {4} : language code
    /// 
    public static string NopNewsRssPath => "nopcommerce-news-rss?version={0}&localhost={1}&hideAdvertisements={2}&storeUrl={3}&language={4}";

    /// 
    /// Gets a path to request the nopCommerce official site to notify about successful installation
    /// 
    /// 
    /// {0} : nopCommerce version
    /// {1} : whether the store based is on the localhost
    /// {2} : admin email
    /// {3} : store URL
    /// {4} : language code
    /// {5} : culture name
    /// 
    public static string NopInstallationCompletedPath => "installation-completed?version={0}&local={1}&email={2}&url={3}&language={4}&culture={5}";

    /// 
    /// Gets a path to request the nopCommerce official site to subscribe to the nopCommerce newsletters
    /// 
    /// 
    /// {0} : subscriber email
    /// 
    public static string NopSubscribeNewslettersPath => "subscribe-newsletters?&email={0}";

    /// 
    /// Gets a path to request the nopCommerce official site for available categories of marketplace extensions
    /// 
    /// 
    /// {0} : language code
    /// 
    public static string NopExtensionsCategoriesPath => "extensions-feed?getCategories=1&language={0}";

    /// 
    /// Gets a path to request the nopCommerce official site for available versions of marketplace extensions
    /// 
    /// 
    /// {0} : language code
    /// 
    public static string NopExtensionsVersionsPath => "extensions-feed?getVersions=1&language={0}";

    /// 
    /// Gets a path to request the nopCommerce official site for marketplace extensions
    /// 
    /// 
    /// {0} : extension category identifier
    /// {1} : extension version identifier
    /// {2} : extension price identifier
    /// {3} : search term
    /// {4} : page index
    /// {5} : page size
    /// {6} : language code
    /// 
    public static string NopExtensionsPath => "extensions-feed?category={0}&version={1}&price={2}&searchTerm={3}&pageIndex={4}&pageSize={5}&language={6}";

    #endregion

    #region Caching defaults

    #region Generic attributes

    /// 
    /// Gets a key for caching
    /// 
    /// 
    /// {0} : entity ID
    /// {1} : key group
    /// 
    public static CacheKey GenericAttributeCacheKey => new("Nop.genericattribute.{0}-{1}");

    #endregion

    #endregion
}