本文整理汇总了C#中mojoPortal.Business.SiteSettings.GetCurrency方法的典型用法代码示例。如果您正苦于以下问题:C# SiteSettings.GetCurrency方法的具体用法?C# SiteSettings.GetCurrency怎么用?C# SiteSettings.GetCurrency使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mojoPortal.Business.SiteSettings
的用法示例。
在下文中一共展示了SiteSettings.GetCurrency方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleNewOrderNotificationExtended
//.........这里部分代码省略.........
gCart.DeSerializeCartOffers();
gLog.SiteGuid = store.SiteGuid;
gLog.UserGuid = gCart.UserGuid;
gLog.CartGuid = gCart.CartGuid;
gLog.StoreGuid = gCart.StoreGuid;
gLog.Save();
gCart.OrderInfo.CompletedFromIP = SiteUtils.GetIP4Address();
gCart.OrderInfo.Completed = DateTime.UtcNow;
if (newOrder.buyerbillingaddress.structuredname != null)
{
gCart.OrderInfo.CustomerFirstName = newOrder.buyerbillingaddress.structuredname.firstname;
gCart.OrderInfo.CustomerLastName = newOrder.buyerbillingaddress.structuredname.lastname;
}
else
{
gCart.OrderInfo.CustomerFirstName = newOrder.buyerbillingaddress.contactname;
gCart.OrderInfo.CustomerLastName = newOrder.buyerbillingaddress.contactname;
}
gCart.OrderInfo.CustomerEmail = newOrder.buyerbillingaddress.email;
gCart.OrderInfo.CustomerCompany = newOrder.buyerbillingaddress.companyname;
gCart.OrderInfo.CustomerAddressLine1 = newOrder.buyerbillingaddress.address1;
gCart.OrderInfo.CustomerAddressLine2 = newOrder.buyerbillingaddress.address2;
gCart.OrderInfo.CustomerCity = newOrder.buyerbillingaddress.city;
gCart.OrderInfo.CustomerState = newOrder.buyerbillingaddress.region;
gCart.OrderInfo.CustomerCountry = newOrder.buyerbillingaddress.countrycode;
gCart.OrderInfo.CustomerPostalCode = newOrder.buyerbillingaddress.postalcode;
gCart.OrderInfo.CustomerTelephoneDay = newOrder.buyerbillingaddress.phone;
gCart.CopyCustomerToBilling();
if (newOrder.buyershippingaddress.structuredname != null)
{
gCart.OrderInfo.DeliveryFirstName = newOrder.buyershippingaddress.structuredname.firstname;
gCart.OrderInfo.DeliveryLastName = newOrder.buyershippingaddress.structuredname.lastname;
}
else
{
gCart.OrderInfo.DeliveryFirstName = newOrder.buyershippingaddress.contactname;
gCart.OrderInfo.DeliveryLastName = newOrder.buyershippingaddress.contactname;
}
gCart.OrderInfo.DeliveryCompany = newOrder.buyershippingaddress.companyname;
gCart.OrderInfo.DeliveryAddress1 = newOrder.buyershippingaddress.address1;
gCart.OrderInfo.DeliveryAddress2 = newOrder.buyershippingaddress.address2;
gCart.OrderInfo.DeliveryCity = newOrder.buyershippingaddress.city;
gCart.OrderInfo.DeliveryState = newOrder.buyershippingaddress.region;
gCart.OrderInfo.DeliveryCountry = newOrder.buyershippingaddress.countrycode;
gCart.OrderInfo.DeliveryPostalCode = newOrder.buyershippingaddress.postalcode;
gCart.TaxTotal = newOrder.orderadjustment.totaltax.Value;
if (newOrder.ShippingCost > 0)
{
gCart.ShippingTotal = newOrder.ShippingCost;
}
gCart.OrderTotal = newOrder.ordertotal.Value;
Guid orderStatusGuid = OrderStatus.OrderStatusReceivedGuid;
if (
(newOrder.financialorderstate == FinancialOrderState.CHARGEABLE)
|| (newOrder.financialorderstate == FinancialOrderState.CHARGED)
|| (newOrder.financialorderstate == FinancialOrderState.CHARGING)
)
{
orderStatusGuid = OrderStatus.OrderStatusFulfillableGuid;
}
StoreHelper.EnsureUserForOrder(gCart);
gCart.Save();
//Currency currency = new Currency(store.DefaultCurrencyId);
SiteSettings siteSettings = new SiteSettings(store.SiteGuid);
Order order = Order.CreateOrder(
store,
gCart,
gLog.RawResponse,
gLog.OrderNumber,
string.Empty,
siteSettings.GetCurrency().Code,
"GoogleCheckout",
orderStatusGuid);
//StoreHelper.ClearCartCookie(cart.StoreGuid);
if (orderStatusGuid == OrderStatus.OrderStatusFulfillableGuid)
{
StoreHelper.ConfirmOrder(store, order);
PayPalLog.DeleteByCart(order.OrderGuid);
}
if (orderStatusGuid == OrderStatus.OrderStatusReceivedGuid)
{
StoreHelper.ConfirmOrderReceived(store, order);
}
}
示例2: GetCartInfo
private void GetCartInfo()
{
if ((!includeItemCount) && (!includeCartTotal)) { return; }
siteSettings = CacheHelper.GetCurrentSiteSettings();
currencyCulture = ResourceHelper.GetCurrencyCulture(siteSettings.GetCurrency().Code);
cart = StoreHelper.GetCartIfExists(moduleGuid, Page.Request.IsAuthenticated);
if (cart == null) { return; }
itemCount = cart.CartOffers.Count();
cartTotal = cart.SubTotal;
}