Skip to content

Commit fea2e49

Browse files
committed
Product\ProductVariant refactored the result of a regular expression search of "ProductVariant"
1 parent 035039e commit fea2e49

26 files changed

Lines changed: 115 additions & 3764 deletions

File tree

src/Libraries/SmartStore.Services/Catalog/CopyProductService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,8 @@ public virtual Product CopyProduct(Product product, string newName, bool isPubli
444444
Length = combination.Length,
445445
Width = combination.Width,
446446
Height = combination.Height,
447-
BasePriceAmount = combination.BasePriceAmount, // TODO: inheritance from productVariantCopy
448-
BasePriceBaseAmount = combination.BasePriceBaseAmount, // TODO: inheritance from productVariantCopy
447+
BasePriceAmount = combination.BasePriceAmount,
448+
BasePriceBaseAmount = combination.BasePriceBaseAmount,
449449
IsActive = combination.IsActive
450450
//IsDefaultCombination = combination.IsDefaultCombination
451451
};

src/Libraries/SmartStore.Services/Catalog/ProductAttributeService.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -403,25 +403,8 @@ public virtual void DeleteProductVariantAttributeCombination(ProductVariantAttri
403403
if (combination == null)
404404
throw new ArgumentNullException("combination");
405405

406-
// codehint: sm-add
407-
// pictures
408-
409-
//var wasDefault = combination.IsDefaultCombination;
410-
//var prevId = combination.ProductVariantId;
411-
412406
_productVariantAttributeCombinationRepository.Delete(combination);
413407

414-
//if (wasDefault)
415-
//{
416-
// // we deleted the default combination, set another as default!
417-
// var newDefault = _productVariantAttributeCombinationRepository.Table.FirstOrDefault(x => x.ProductVariantId == prevId);
418-
// if (newDefault != null)
419-
// {
420-
// newDefault.IsDefaultCombination = true;
421-
// _productVariantAttributeCombinationRepository.Update(newDefault);
422-
// }
423-
//}
424-
425408
//event notification
426409
_eventPublisher.EntityDeleted(combination);
427410
}

src/Libraries/SmartStore.Services/Catalog/ProductService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ public virtual void UpdateProductReviewTotals(Product product)
897897
/// Get low stock products
898898
/// </summary>
899899
/// <returns>Result</returns>
900-
public virtual IList<Product> GetLowStockProductVariants()
900+
public virtual IList<Product> GetLowStockProducts()
901901
{
902902
//Track inventory for product
903903
var query1 = from p in _productRepository.Table

src/Libraries/SmartStore.Services/Directory/DeliveryTimeService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public partial class DeliveryTimeService : IDeliveryTimeService
2626

2727
private readonly IRepository<DeliveryTime> _deliveryTimeRepository;
2828
private readonly IRepository<Product> _productRepository;
29-
private readonly IRepository<ProductVariantAttributeCombination> _productVariantAttrCombinationRepository;
29+
private readonly IRepository<ProductVariantAttributeCombination> _attributeCombinationRepository;
3030
private readonly ICacheManager _cacheManager;
3131
private readonly ICustomerService _customerService;
3232
//private readonly CurrencySettings _currencySettings;
@@ -49,7 +49,7 @@ public partial class DeliveryTimeService : IDeliveryTimeService
4949
public DeliveryTimeService(ICacheManager cacheManager,
5050
IRepository<DeliveryTime> deliveryTimeRepository,
5151
IRepository<Product> productRepository,
52-
IRepository<ProductVariantAttributeCombination> productVariantAttrCombinationRepository,
52+
IRepository<ProductVariantAttributeCombination> attributeCombinationRepository,
5353
ICustomerService customerService,
5454
IPluginFinder pluginFinder,
5555
IEventPublisher eventPublisher)
@@ -61,7 +61,7 @@ public DeliveryTimeService(ICacheManager cacheManager,
6161
this._pluginFinder = pluginFinder;
6262
this._eventPublisher = eventPublisher;
6363
this._productRepository = productRepository;
64-
this._productVariantAttrCombinationRepository = productVariantAttrCombinationRepository;
64+
this._attributeCombinationRepository = attributeCombinationRepository;
6565
}
6666

6767
#endregion

src/Libraries/SmartStore.Services/Directory/IDeliveryTimeService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public partial interface IDeliveryTimeService
1010
{
1111
/// <summary>
1212
/// Checks if the delivery time is associated with
13-
/// at least one dependant entity (e.g. ProductVariant)
13+
/// at least one dependant entity
1414
/// </summary>
1515
bool IsAssociated(int deliveryTimeId);
1616

src/Libraries/SmartStore.Services/ExportImport/ImportManager.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public partial class ImportManager : IImportManager
3939
"SeName",
4040
"AllowCustomerReviews",
4141
"Published",
42-
"ProductVariantName",
4342
"SKU",
4443
"ManufacturerPartNumber",
4544
"Gtin",
@@ -232,7 +231,6 @@ public virtual void ImportProductsFromXlsx(Stream stream)
232231
string seName = GetValue<string>(worksheet, iRow, "SeName");
233232
bool allowCustomerReviews = GetValue<bool>(worksheet, iRow, "AllowCustomerReviews");
234233
bool published = GetValue<bool>(worksheet, iRow, "Published");
235-
string productVariantName = GetValue<string>(worksheet, iRow, "ProductVariantName");
236234
string sku = GetValue<string>(worksheet, iRow, "SKU");
237235
string manufacturerPartNumber = GetValue<string>(worksheet, iRow, "ManufacturerPartNumber");
238236
string gtin = GetValue<string>(worksheet, iRow, "Gtin");
@@ -363,7 +361,6 @@ public virtual void ImportProductsFromXlsx(Stream stream)
363361
product.Published = published;
364362
product.CreatedOnUtc = createdOnUtc;
365363
product.UpdatedOnUtc = DateTime.UtcNow;
366-
product.Name = productVariantName;
367364
product.Sku = sku;
368365
product.ManufacturerPartNumber = manufacturerPartNumber;
369366
product.Gtin = gtin;

0 commit comments

Comments
 (0)