public static string FormatMoney(Money money, string cultureCode, IBasketRules rules, ITextTranslator translator) { if (rules.ShowPrices(WebStoreContext.Current.CurrentUser)) { return FormatMoney(money, cultureCode); } return translator.GetText("no_price_shown"); }
public CommerceService(IExtCommonDao commonDao, ICommerceDao dao, IPaymentProvider provider, IBasketRules rules, IOrderProcessorFactory processorFactory, ITemplateEngine templateEngine, IChargeService chargeService) { _commonDao = commonDao; _dao = dao; _provider = provider; _rules = rules; _chargeService = chargeService; _processorFactory = processorFactory; }
public ECommerceModule(ICommerceService commerceService, ICatalogueViewService catatalogueService, ICommerceDao dao, IExtCommonDao commonDao, IBasketRules rules, ICatalogueModificationService editService, IAccountService accountService, IOrderService orderService, IEmailSender emailSender, IDeliveryService deliveryService, ICultureService cultureService, IUserService userService) : base(catatalogueService, commerceService, editService, accountService, orderService, emailSender, deliveryService, cultureService, userService) { _dao = dao; _commonDao = commonDao; _rules = rules; //we now get payment providers from the DB to make it more user friendly //PaymentProviders = CommerceService.GetEnabledPaymentProviders(); }
public static string FormatMoney(Money money, IBasketRules rules, ITextTranslator translator) { return FormatMoney(money, "en-GB", rules, translator); }
public static string FormatUnitLinePrice(IBasketLine line, IBasketRules rules, ITextTranslator translator) { return FormatMoney(line.UnitLinePrice, rules, translator); }