using Nop.Core.Domain.Catalog; using Nop.Core.Domain.Directory; namespace Nop.Services.Catalog; /// /// Price formatter /// public partial interface IPriceFormatter { /// /// Formats the price /// /// Price /// /// A task that represents the asynchronous operation /// The task result contains the price /// Task FormatPriceAsync(decimal price); /// /// Formats the price /// /// Price /// A value indicating whether to show a currency /// Target currency /// /// A task that represents the asynchronous operation /// The task result contains the price /// Task FormatPriceAsync(decimal price, bool showCurrency, Currency targetCurrency); /// /// Formats the price /// /// Price /// A value indicating whether to show a currency /// A value indicating whether to show tax suffix /// /// A task that represents the asynchronous operation /// The task result contains the price /// Task FormatPriceAsync(decimal price, bool showCurrency, bool showTax); /// /// Formats the price /// /// Price /// A value indicating whether to show a currency /// Currency code /// A value indicating whether to show tax suffix /// Language /// /// A task that represents the asynchronous operation /// The task result contains the price /// Task FormatPriceAsync(decimal price, bool showCurrency, string currencyCode, bool showTax, int languageId); /// /// Formats the order price /// /// Price /// Currency rate /// Customer currency code /// A value indicating whether to display price on customer currency /// Primary store currency /// Language /// A value indicating whether price includes tax /// A value indicating whether to show tax suffix /// /// A task that represents the asynchronous operation /// The task result contains the price /// Task FormatOrderPriceAsync(decimal price, decimal currencyRate, string customerCurrencyCode, bool displayCustomerCurrency, Currency primaryStoreCurrency, int languageId, bool? priceIncludesTax = null, bool? showTax = null); /// /// Formats the price /// /// Price /// A value indicating whether to show a currency /// Currency code /// Language /// A value indicating whether price includes tax /// /// A task that represents the asynchronous operation /// The task result contains the price /// Task FormatPriceAsync(decimal price, bool showCurrency, string currencyCode, int languageId, bool priceIncludesTax); /// /// Formats the price /// /// Price /// A value indicating whether to show a currency /// Target currency /// Language /// A value indicating whether price includes tax /// /// A task that represents the asynchronous operation /// The task result contains the price /// Task FormatPriceAsync(decimal price, bool showCurrency, Currency targetCurrency, int languageId, bool priceIncludesTax); /// /// Formats the price /// /// Price /// A value indicating whether to show a currency /// Target currency /// Language /// A value indicating whether price includes tax /// A value indicating whether to show tax suffix /// /// A task that represents the asynchronous operation /// The task result contains the price /// Task FormatPriceAsync(decimal price, bool showCurrency, Currency targetCurrency, int languageId, bool priceIncludesTax, bool showTax); /// /// Formats the price of rental product (with rental period) /// /// Product /// Price /// /// A task that represents the asynchronous operation /// The task result contains the rental product price with period /// Task FormatRentalProductPeriodAsync(Product product, string price); /// /// Formats the shipping price /// /// Price /// A value indicating whether to show a currency /// /// A task that represents the asynchronous operation /// The task result contains the price /// Task FormatShippingPriceAsync(decimal price, bool showCurrency); /// /// Formats the shipping price /// /// Price /// A value indicating whether to show a currency /// Target currency /// Language /// A value indicating whether price includes tax /// /// A task that represents the asynchronous operation /// The task result contains the price /// Task FormatShippingPriceAsync(decimal price, bool showCurrency, Currency targetCurrency, int languageId, bool priceIncludesTax); /// /// Formats the shipping price /// /// Price /// A value indicating whether to show a currency /// Currency code /// Language /// A value indicating whether price includes tax /// /// A task that represents the asynchronous operation /// The task result contains the price /// Task FormatShippingPriceAsync(decimal price, bool showCurrency, string currencyCode, int languageId, bool priceIncludesTax); /// /// Formats the payment method additional fee /// /// Price /// A value indicating whether to show a currency /// /// A task that represents the asynchronous operation /// The task result contains the price /// Task FormatPaymentMethodAdditionalFeeAsync(decimal price, bool showCurrency); /// /// Formats the payment method additional fee /// /// Price /// A value indicating whether to show a currency /// Target currency /// Language /// A value indicating whether price includes tax /// /// A task that represents the asynchronous operation /// The task result contains the price /// Task FormatPaymentMethodAdditionalFeeAsync(decimal price, bool showCurrency, Currency targetCurrency, int languageId, bool priceIncludesTax); /// /// Formats the payment method additional fee /// /// Price /// A value indicating whether to show a currency /// Currency code /// Language /// A value indicating whether price includes tax /// /// A task that represents the asynchronous operation /// The task result contains the price /// Task FormatPaymentMethodAdditionalFeeAsync(decimal price, bool showCurrency, string currencyCode, int languageId, bool priceIncludesTax); /// /// Formats a tax rate /// /// Tax rate /// Formatted tax rate string FormatTaxRate(decimal taxRate); /// /// Format base price (PAngV) /// /// Product /// Product price (in primary currency). Pass null if you want to use a default produce price /// Total weight of product (with attribute weight adjustment). Pass null if you want to use a default produce weight /// /// A task that represents the asynchronous operation /// The task result contains the base price /// Task FormatBasePriceAsync(Product product, decimal? productPrice, decimal? totalWeight = null); }