本文整理汇总了C#中SmartStore.Core.Domain.Catalog.Product.ValidateSeName方法的典型用法代码示例。如果您正苦于以下问题:C# Product.ValidateSeName方法的具体用法?C# Product.ValidateSeName怎么用?C# Product.ValidateSeName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SmartStore.Core.Domain.Catalog.Product
的用法示例。
在下文中一共展示了Product.ValidateSeName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CopyProduct
//.........这里部分代码省略.........
SpecialPrice = product.SpecialPrice,
SpecialPriceStartDateTimeUtc = product.SpecialPriceStartDateTimeUtc,
SpecialPriceEndDateTimeUtc = product.SpecialPriceEndDateTimeUtc,
CustomerEntersPrice = product.CustomerEntersPrice,
MinimumCustomerEnteredPrice = product.MinimumCustomerEnteredPrice,
MaximumCustomerEnteredPrice = product.MaximumCustomerEnteredPrice,
LowestAttributeCombinationPrice = product.LowestAttributeCombinationPrice,
Weight = product.Weight,
Length = product.Length,
Width = product.Width,
Height = product.Height,
AvailableStartDateTimeUtc = product.AvailableStartDateTimeUtc,
AvailableEndDateTimeUtc = product.AvailableEndDateTimeUtc,
DisplayOrder = product.DisplayOrder,
Published = isPublished,
Deleted = product.Deleted,
CreatedOnUtc = utcNow,
UpdatedOnUtc = utcNow,
DeliveryTimeId = product.DeliveryTimeId,
QuantityUnitId = product.QuantityUnitId,
BasePriceEnabled = product.BasePriceEnabled,
BasePriceMeasureUnit = product.BasePriceMeasureUnit,
BasePriceAmount = product.BasePriceAmount,
BasePriceBaseAmount = product.BasePriceBaseAmount,
BundleTitleText = product.BundleTitleText,
BundlePerItemShipping = product.BundlePerItemShipping,
BundlePerItemPricing = product.BundlePerItemPricing,
BundlePerItemShoppingCart = product.BundlePerItemShoppingCart
};
_productService.InsertProduct(productCopy);
//search engine name
_urlRecordService.SaveSlug(productCopy, productCopy.ValidateSeName("", productCopy.Name, true), 0);
var languages = _languageService.GetAllLanguages(true);
//localization
foreach (var lang in languages)
{
var name = product.GetLocalized(x => x.Name, lang.Id, false, false);
if (!String.IsNullOrEmpty(name))
_localizedEntityService.SaveLocalizedValue(productCopy, x => x.Name, name, lang.Id);
var shortDescription = product.GetLocalized(x => x.ShortDescription, lang.Id, false, false);
if (!String.IsNullOrEmpty(shortDescription))
_localizedEntityService.SaveLocalizedValue(productCopy, x => x.ShortDescription, shortDescription, lang.Id);
var fullDescription = product.GetLocalized(x => x.FullDescription, lang.Id, false, false);
if (!String.IsNullOrEmpty(fullDescription))
_localizedEntityService.SaveLocalizedValue(productCopy, x => x.FullDescription, fullDescription, lang.Id);
var metaKeywords = product.GetLocalized(x => x.MetaKeywords, lang.Id, false, false);
if (!String.IsNullOrEmpty(metaKeywords))
_localizedEntityService.SaveLocalizedValue(productCopy, x => x.MetaKeywords, metaKeywords, lang.Id);
var metaDescription = product.GetLocalized(x => x.MetaDescription, lang.Id, false, false);
if (!String.IsNullOrEmpty(metaDescription))
_localizedEntityService.SaveLocalizedValue(productCopy, x => x.MetaDescription, metaDescription, lang.Id);
var metaTitle = product.GetLocalized(x => x.MetaTitle, lang.Id, false, false);
if (!String.IsNullOrEmpty(metaTitle))
_localizedEntityService.SaveLocalizedValue(productCopy, x => x.MetaTitle, metaTitle, lang.Id);
var bundleTitleText = product.GetLocalized(x => x.BundleTitleText, lang.Id, false, false);
if (!String.IsNullOrEmpty(bundleTitleText))