Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #2

Merged
merged 378 commits into from
Mar 10, 2019
Merged
Changes from 1 commit
Commits
Show all changes
378 commits
Select commit Hold shift + click to select a range
c9a55aa
Import/export enhancements
mgesing Oct 26, 2018
bcb368a
Added sm:EfMigrationsCommandTimeout setting to web.config (was 30 sec…
muratcakir Oct 26, 2018
30fc435
Forgot to commit fixed unit tests (remove IDBLoadHook stuff)
muratcakir Oct 26, 2018
36437a5
(perf) refactored GenericAttributeService for more performance
muratcakir Oct 26, 2018
1608725
Fixed Autofac circularity error (I have no idea why Autofac complaine…
muratcakir Oct 26, 2018
1b82baa
Minor UI fix in backend theme
muratcakir Oct 26, 2018
dea8ddb
(Perf) Huge performance increase in discount resolution and calculati…
muratcakir Oct 26, 2018
886bfb5
JS: fixed viewport grid tier resolution with expressions
muratcakir Oct 26, 2018
2633c51
Typo
muratcakir Oct 26, 2018
3104e6d
Import enhancements
mgesing Oct 29, 2018
48ceab5
Image downloader should not read response stream if the response has …
mgesing Oct 29, 2018
0cb7c44
Import/export enhancements
mgesing Oct 29, 2018
be8692d
Updated to latest Bootstrap 4.1.3
muratcakir Oct 29, 2018
c461255
Added 'rellax' library for parallax effects
muratcakir Oct 30, 2018
a347480
Some BS 4.1.3 refactoring
muratcakir Oct 30, 2018
0e119f1
Import/export enhancements
mgesing Oct 30, 2018
38d5163
Added sm:EfCommandTimeout setting to web.config (was 30 sec. fixed, n…
muratcakir Oct 30, 2018
fdcea43
Makes NewsItemModel tabbable. Resolves #1538
mgesing Oct 30, 2018
7a50319
Removed our custom .flex-grow-[0|1] class (part of BS 4.1.3 now)
muratcakir Oct 30, 2018
1f442ef
Theming: RangeSlider (wip)
muratcakir Oct 31, 2018
c36c430
Updated change log
mgesing Oct 31, 2018
e635a0f
Fixes invalid conversion of "System.Int32" to "SmartStore.Core.Domain…
mgesing Oct 31, 2018
53ed9e6
Added EditorTemplate for FontAwesome icons
Michael-Herzog Oct 31, 2018
bf6dc3d
MInor fix regarding range validation & globalization
Michael-Herzog Oct 31, 2018
03ea727
(Perf) Search > resolving hits count should not try to build hit docu…
muratcakir Oct 31, 2018
ebe5b8e
Theming: fixed button transition and spacing issues
muratcakir Oct 31, 2018
f23f68f
Implemented custom range slider component (with ticks and value bubbles)
muratcakir Nov 1, 2018
bd455e5
Minor range slider fixes
muratcakir Nov 1, 2018
bc0d54d
Minor improvement
mgesing Nov 2, 2018
79f72f0
Perf: minor improvements
mgesing Nov 5, 2018
57f4d39
Added extension method to create a SQL timeout (DEBUG only)
mgesing Nov 5, 2018
d61ae3c
Perf: Avoid group-by in linq search if possible because it's very slo…
mgesing Nov 6, 2018
ff31fa4
Perf: Include IsSystemProduct in published-deleted compound index. It…
mgesing Nov 6, 2018
f6ac0fd
Minor typo correction
Michael-Herzog Nov 6, 2018
ea1ccae
Perf: Data exporter should call ILocalizedEntityService:ClearCache
mgesing Nov 6, 2018
eda6e97
Fixed RangeSlider rendering in Firefox & Edge.
muratcakir Nov 6, 2018
7893423
(Perf) using lambda overloads of EF LINQ skip and take methods for qu…
muratcakir Nov 7, 2018
f432795
Minor refactoring
muratcakir Nov 8, 2018
63eb1c5
Search: Added LastAddedDocumentId to IIndexStore and IndexInfo
mgesing Nov 8, 2018
3b9a4f6
Minor correction
mgesing Nov 8, 2018
e446896
Cleanup
muratcakir Nov 8, 2018
60ae403
Minor improvement
mgesing Nov 8, 2018
ca7e5b3
(Perf) Created a single db index for LocalizedProperty.LocaleKeyGroup…
muratcakir Nov 9, 2018
34b7be5
(Perf) prefecthed localized properties for InstantSearch
muratcakir Nov 9, 2018
fef5b44
Updated changelog
Michael-Herzog Nov 9, 2018
8022e95
Added some moved customer properties to customer XML export
mgesing Nov 9, 2018
54eca0e
Perf: Export. Bulk loading of associated products. Speeds up price ca…
mgesing Nov 9, 2018
15597b4
New data fetching strategy for translations and url slugs during prod…
muratcakir Nov 9, 2018
baf13c9
Changed search index should reset all sitemap element counts
muratcakir Nov 9, 2018
c793566
Void zone content due to duplicate key or ajax request was still rend…
muratcakir Nov 10, 2018
8d7ce91
Fix Chrome mobile check/radio alignment and padding issues
muratcakir Nov 10, 2018
bcfccbb
Theming: minor fix
muratcakir Nov 10, 2018
dd12e34
Search: Property to get the index size
mgesing Nov 12, 2018
f69f6e1
GetMetadata() util method for WebViewPage
muratcakir Nov 13, 2018
f90e4e0
Fixed AOS css specificity
muratcakir Nov 13, 2018
838cf79
PrefetchUrlRecords should preload entries for more than one language …
muratcakir Nov 13, 2018
413f5a0
Export: Using new property collection for translations (part 1)
mgesing Nov 14, 2018
2c57fa5
Fixes "Count must be a DbConstantExpression or a DbParameterReference…
mgesing Nov 14, 2018
9cdaf59
More fixes for "Count must be a DbConstantExpression or a DbParameter…
mgesing Nov 14, 2018
71ffa6c
Export: Using new property collection for translations (part 2)
mgesing Nov 14, 2018
d5f5697
New storefront catalog options: ShowSubCategoriesInSubPages, ShowDesc…
muratcakir Nov 14, 2018
cf3f488
Updated changelog
muratcakir Nov 14, 2018
62d25a8
Minor fix
muratcakir Nov 15, 2018
8e3622a
Export: Using new URL record property collection. Removed all per ite…
mgesing Nov 15, 2018
3a78734
Avoids a compiler warning
mgesing Nov 15, 2018
13c8952
(Perf) some code change for upcoming XML sitemap generator refactoring
muratcakir Nov 16, 2018
32c01c8
Log full error message(s) for schedule task history entries
mgesing Nov 16, 2018
8e17f69
(Perf) New XML sitemap generation strategy (wip)
muratcakir Nov 16, 2018
4aa38d4
(Perf) New XML sitemap generation strategy (wip)
muratcakir Nov 17, 2018
19f1009
(Perf) New XML sitemap generation strategy (wip)
muratcakir Nov 17, 2018
f7ec4f7
Search: Removed obsolete ISearchBits. Does not support index segmenta…
mgesing Nov 19, 2018
2fd5885
Fixes compilation error
mgesing Nov 19, 2018
3524dad
Perf: Speed up price calculation in product lists
mgesing Nov 19, 2018
835c50c
Fixes product display order on category and manufacturer pages someti…
mgesing Nov 19, 2018
69ffde3
(Perf) New XML sitemap generation strategy (wip)
muratcakir Nov 19, 2018
24c4d61
(Perf) Ultra-fast file-based XML sitemap generation
muratcakir Nov 20, 2018
7daf422
Export: Minor changes
mgesing Nov 20, 2018
ee039cf
Export: Refactor and simply data preview
mgesing Nov 20, 2018
9416c6d
Export: Avoid segmentation by skip method (in progress)
mgesing Nov 20, 2018
d0c0ce8
(perf) new grouped index for product table to speed up seeking of ver…
muratcakir Nov 20, 2018
ae77a68
Picture uploader does not react anymore when included per AJAX
muratcakir Nov 20, 2018
35a5eeb
Export: Testing and correcting the updated data exporter
mgesing Nov 21, 2018
ef76318
Updated change log
mgesing Nov 21, 2018
a8a5943
Locale editor: hide tab labels from 8th child onward to prevent line …
muratcakir Nov 21, 2018
8a42fee
(Perf) FindEqualPicture with streams, not with byte arrays
muratcakir Nov 23, 2018
6aa73fd
Theming: minor CSS improvement
muratcakir Nov 26, 2018
412efcf
Fixed minor CSS issue
muratcakir Nov 28, 2018
43d20d5
Minor refactoring
muratcakir Nov 28, 2018
ecaaba4
Minor localization issue
muratcakir Nov 29, 2018
6d5d9d0
Summernote: turned off 'prettifyHtml' option. It produces messy html …
muratcakir Nov 29, 2018
55fb8c9
Fixes tab caption rendered twice if tab item has a badge text
mgesing Nov 30, 2018
e33958b
scrim-gradient Sass mixin
muratcakir Dec 3, 2018
f6cb634
Fixes linq search returns products multiple times. Reverts "Avoid gro…
mgesing Dec 4, 2018
096ed32
Removed urlCompression node from web.config
muratcakir Dec 5, 2018
5441541
Minor issues
muratcakir Dec 6, 2018
2e7e6f6
Fixes "Column name 'IsSystemProduct' does not exist in the target tab…
mgesing Dec 6, 2018
9faada8
Removed drop index IX_SeekExport1 from Indexes.SqlServer.Inverse.sql …
mgesing Dec 6, 2018
94aff1d
Disabled parallax effect for Firefox & Edge
Michael-Herzog Dec 6, 2018
02dcfb7
Fixed parallax FF & Edge issues
muratcakir Dec 8, 2018
f26d248
Resolves #1551 IShippingMethodFilter: IsExcluded repeat every step ch…
mgesing Dec 9, 2018
be25812
Added default language note to installed languages list
mgesing Dec 10, 2018
eadd573
Block plugin DLLs
muratcakir Dec 10, 2018
2cd301f
Coding style
muratcakir Dec 11, 2018
b011af8
Updated change log
mgesing Dec 12, 2018
c58a7ee
Multizone targeting resulted in exception
muratcakir Dec 12, 2018
7770248
Theming: fixed some layout spacing issues
muratcakir Dec 12, 2018
78cb782
Amazon Pay: Fixes missing scope parameter in OffAmazonPayments.Widget…
mgesing Dec 13, 2018
9fb73b3
Theming: enhanced #scroll-top button
muratcakir Dec 13, 2018
5bad2a1
Theming: granularity > separated assets registration from _Document l…
muratcakir Dec 13, 2018
b9daa1f
Theming: FontAwesome icons should be 14px fixed, as they are based on…
muratcakir Dec 13, 2018
b4ab593
Theming: enhanced modal dialog fade in/out animations
muratcakir Dec 13, 2018
bd6534a
Theming: minor fix
muratcakir Dec 14, 2018
dad0336
Theming: updated to FontAwesome 5 Free (Pro usage also possible with …
muratcakir Dec 15, 2018
3db90b8
Import: Fixes invalid conversion "System.Double" to "SmartStore.Core.…
mgesing Dec 17, 2018
7877cef
Fixed #1547: FlexBlue theme references wrong variables
muratcakir Dec 18, 2018
92efb83
Unselectable radio button groups
muratcakir Dec 20, 2018
9ebf726
Icon explorer for FontAwesome 5 Free icons
muratcakir Dec 20, 2018
1b7f9e0
Do not filter cookie using resources if cookie usage has not yet been…
mgesing Dec 20, 2018
b14d9b3
Fixed a potential Autofac circularity pitfall
muratcakir Dec 20, 2018
8334c61
Fixes compilation error in InstallDataSeeder
mgesing Dec 22, 2018
e0fde33
Minor change
mgesing Dec 24, 2018
1864110
Topics: Fixes "Cannot insert duplicate key row in object 'dbo.UrlReco…
mgesing Jan 2, 2019
6ede8d5
Minor fixes
muratcakir Jan 3, 2019
9e0a075
PageBuilder: block validity
muratcakir Jan 5, 2019
90a6873
Reverted some css to previous state
muratcakir Jan 5, 2019
b6a8ca1
Added some variables to :root element
Michael-Herzog Jan 7, 2019
3f893b7
Minor change
mgesing Jan 9, 2019
8a272bf
Range slider should trigger change for hidden element
Michael-Herzog Jan 9, 2019
b3b4ad7
Theming: blur backdrop-filter for .modal-backdrop
muratcakir Jan 9, 2019
f74e2ca
Theming: trigger tooltip on hover only
muratcakir Jan 9, 2019
4c94006
IconExplorer: generate CSS class
muratcakir Jan 10, 2019
7c052b9
Theming: minor fixes
muratcakir Jan 10, 2019
ab06b2e
Search: removed obsolete AcquirementReason.Optimizing
mgesing Jan 10, 2019
034ec4e
Fixes the redirection to the homepage for pages which are loaded whil…
Michael-Herzog Jan 11, 2019
0780953
Updated change log
mgesing Jan 11, 2019
72b5b02
Resolves #1563 QueuedMessagesClearTask: add a setting for the age of …
mgesing Jan 11, 2019
60a6f47
Theming: smaller padding for login box
muratcakir Jan 12, 2019
cb30f42
Fixed social footer icons
Michael-Herzog Jan 14, 2019
7d4c544
Minor theming stuff
muratcakir Jan 15, 2019
e44c8a3
Fixes #1568 and some other install issues
Michael-Herzog Jan 15, 2019
931729f
Install screen cleanup
muratcakir Jan 15, 2019
b0508a4
Minor CSS fix
muratcakir Jan 17, 2019
134ab92
Minor CSS fix
muratcakir Jan 19, 2019
3328a30
Added custom fields to BolckEntity
Michael-Herzog Jan 22, 2019
eaf08d1
Closes #1571: Compare products only shows one specification attribute…
Michael-Herzog Jan 23, 2019
0624d7b
Added StoryExportAssetAttribute
mgesing Jan 23, 2019
ecb58eb
More on StoryExportAssetAttribute
mgesing Jan 24, 2019
02c82c9
Story assets: code conventions
muratcakir Jan 24, 2019
af89a95
More on StoryExportAssetAttribute
mgesing Jan 25, 2019
a639418
GMC: fixes custom labels were not exported
mgesing Jan 28, 2019
1627894
More on StoryAssetAttribute
mgesing Jan 31, 2019
1179cfd
Link builder: what about localized URLs?
mgesing Feb 4, 2019
404b6cf
Resolves #1570 Filter option "Only deactivated customers" filters del…
mgesing Feb 4, 2019
f5b62c3
Fixes broken unit tests
mgesing Feb 8, 2019
7fe1ffb
Resolves #1569 Show login note if no prices are displayed due to cust…
mgesing Feb 8, 2019
c2ff8a4
Link builder
mgesing Feb 11, 2019
966ed9a
Minor change
mgesing Feb 11, 2019
874f685
PayPal PLUS: now up to 10 more third party payment methods are allowe…
mgesing Feb 11, 2019
1d1425c
Added "rel" attribute to paginator nav links (prev & next)
muratcakir Feb 11, 2019
c4e65b1
Fixed build error
Michael-Herzog Feb 13, 2019
87972c3
Font Awesome 5 for file manager
mgesing Feb 13, 2019
da4d9e4
Updated Newtonsoft.Json to latest version
muratcakir Feb 12, 2019
8fe78c7
Consolidated Autofac.WebApi2
muratcakir Feb 12, 2019
ce036a4
Update Autofac to latest version
muratcakir Feb 12, 2019
1532e91
Updated AspNet.Mvc to latest version
muratcakir Feb 12, 2019
415c9ce
Minor refactoring
muratcakir Feb 12, 2019
90fd1a5
Minor refactoring
muratcakir Feb 12, 2019
e9f407f
Updated DotNetCompilerPlatform to latest version
muratcakir Feb 12, 2019
9d0c518
Updated all BundleTransformer libraries to latest version
muratcakir Feb 12, 2019
c3fd352
Fixed icons for CodeMirror
Michael-Herzog Feb 14, 2019
cd6f367
Updated AutoMapper to latest version
muratcakir Feb 13, 2019
e9ddbb0
Updated various AspNet packages to latest versions
muratcakir Feb 13, 2019
1fbecf0
Updated CommonServiceLocator to latest version
muratcakir Feb 13, 2019
16de89b
Updated Microsoft.Web.Xdt to latest version
muratcakir Feb 14, 2019
b6b2732
Updated EPPlus to latest version
muratcakir Feb 14, 2019
89dc89d
Updated ImageProcessor to latest version
muratcakir Feb 14, 2019
cc166ea
Updated LumenWorksCsvReader to latest version
muratcakir Feb 14, 2019
d1fae91
Updated PreMailer.NET to latest version
muratcakir Feb 14, 2019
aa65bee
Minor fix
muratcakir Feb 14, 2019
2a4475f
Fix assembly references
muratcakir Feb 14, 2019
9808260
Link builder
mgesing Feb 15, 2019
83d0c75
Added SanitizeHtmlAttribute decorator attribute for model properties
muratcakir Feb 16, 2019
54a24f6
Refactored and cleaned up HtmlUtils class (FormatText method is obsol…
muratcakir Feb 16, 2019
b2bbae7
Revise ValidateInput & AllowHtml
muratcakir Feb 16, 2019
f9bf55a
Link builder
mgesing Feb 18, 2019
6c7ff89
Updated changelog
muratcakir Feb 18, 2019
00caa38
Closes #1475 select boxes must be wrapped on mobile devices if data-s…
Michael-Herzog Feb 18, 2019
c23fc90
Link builder
mgesing Feb 18, 2019
8e12b83
Minor change
mgesing Feb 19, 2019
560be5b
Minor code refactoring in LinkResolver
muratcakir Feb 19, 2019
1e70d48
Closes #1560 Tell-a-Friend and anonymous user: render alert box and t…
Michael-Herzog Feb 19, 2019
bf12a12
Minor code refactoring in LinkResolver (2)
muratcakir Feb 19, 2019
58614ba
Fixed select2 matching with optgroups
muratcakir Feb 19, 2019
2a404d9
Link builder
mgesing Feb 20, 2019
29f5c5b
Removed obsolete customer settings
Michael-Herzog Feb 20, 2019
023d76e
Updated changelog
Michael-Herzog Feb 20, 2019
80c00af
Code refactoring in LinkResolver
muratcakir Feb 20, 2019
5b09f89
LinkBuilder: minor fix
Michael-Herzog Feb 20, 2019
eec107e
Closes #1539 Allow signing in with both e-mail and username
Michael-Herzog Feb 21, 2019
5a8a512
Updated changelog
Michael-Herzog Feb 21, 2019
1abbf61
Fixed FontAwesome icon display for pnotify
Michael-Herzog Feb 21, 2019
3f3b7c1
Code readability
Michael-Herzog Feb 21, 2019
1f51cd7
Minor code refactoring
muratcakir Feb 21, 2019
996ffda
Link builder
mgesing Feb 21, 2019
6be857b
Fixes back-to-list link could be wrong on provider configuration page
mgesing Feb 22, 2019
1d80c22
Closes #1542 Pages: Body CSS class and HtmlId
Michael-Herzog Feb 22, 2019
b60c416
MInor fix for disabled/readonly checkboxes
Michael-Herzog Feb 22, 2019
8e3ce0a
Added admin fields for Commit "Closes #1542 Pages: Body CSS class and…
Michael-Herzog Feb 22, 2019
a8a9de7
Minor code refactoring
muratcakir Feb 22, 2019
9a05683
IAclService.Authorize() core method now takes IEnumerable<CustomerRol…
muratcakir Feb 22, 2019
e8e4602
Minor refactoring in LinkBuilder
muratcakir Feb 22, 2019
3e7903d
Minor fixes in LinkResolver
muratcakir Feb 23, 2019
b366532
Minor fix
mgesing Feb 23, 2019
e427ab7
Minor fix regarding required VAT number display in frontend
Michael-Herzog Feb 25, 2019
2c97711
Minor change
mgesing Feb 25, 2019
c68fa8a
ImageProcessor can handle background color now
muratcakir Feb 26, 2019
50dc096
Implemented new ActionResult CachedFileResult
muratcakir Feb 27, 2019
b5c2cbe
Minor typo correction
Michael-Herzog Feb 27, 2019
d770ad8
Minor change
mgesing Feb 27, 2019
f788e60
Removed validate attribute from search actions
Michael-Herzog Feb 27, 2019
aebd664
More on "Removed validate attribute from search actions"
mgesing Feb 27, 2019
3b1241e
Removed one more ValidateInput attribute
mgesing Feb 28, 2019
cf74617
Updated change log
mgesing Feb 28, 2019
d81b840
Fixed structured data problem for breadcrumb navigation
Michael-Herzog Feb 28, 2019
21e4cf7
Fontawesome: Fixed navigation icons for MegaMenu
Michael-Herzog Feb 28, 2019
d0df1dd
Added Breadcrumb view anew after strange git problem
Michael-Herzog Feb 28, 2019
27a0179
Minor CSS fix
muratcakir Mar 1, 2019
e480e02
Closes #1580 Move "itemtype" to article element
Michael-Herzog Mar 1, 2019
26bf28c
More work on CachedFileResult
muratcakir Mar 1, 2019
70aacbf
Refactored some file system based code
muratcakir Mar 1, 2019
980b3ec
Code conventions
muratcakir Mar 2, 2019
8fef444
Backend: fixes input of DataType.Password must render the value, othe…
mgesing Mar 4, 2019
a9f7119
Closes #1581 Missing Itemprop="image" in products
Michael-Herzog Mar 4, 2019
12cdbff
AddBodyCssClass should split class name by space before adding to glo…
muratcakir Mar 4, 2019
413eac9
Make .ui-pnotify-text higher
muratcakir Mar 4, 2019
f9aa54a
.no-reveal turns off AOS
muratcakir Mar 4, 2019
fdc3ab1
Added .no-anims css util class
muratcakir Mar 4, 2019
c300ad7
Added BodyHtmlAttributes to Window component
muratcakir Mar 4, 2019
bce5a7b
Minor css fix
muratcakir Mar 4, 2019
a6dbee7
Minor CSS stuff
muratcakir Mar 5, 2019
a8cbca2
Added service method to get multiple categories by ids
Michael-Herzog Mar 5, 2019
919ad20
Closes #1579 Structured data: Google complains about missing price el…
Michael-Herzog Mar 5, 2019
f100673
Added AnchorPosition query to ImageProcessor
muratcakir Mar 5, 2019
5241fb7
Added some string resources
mgesing Mar 6, 2019
da2c392
Added confirmation request to the delete products function in product…
Michael-Herzog Mar 6, 2019
156a4fe
Structured data: added itemprop for description
Michael-Herzog Mar 6, 2019
38bdb05
Added service method to get multiple manufacturers by ids
Michael-Herzog Mar 6, 2019
3eeb2ee
AmazonPay: Updated Amazon SDK
mgesing Mar 7, 2019
7a18d28
Updated change log
mgesing Mar 8, 2019
5dafc77
Enhancements & fixes for FileSystemHelper
muratcakir Mar 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Import/export enhancements
mgesing committed Oct 30, 2018
commit 0e119f1ea80183c4550b2892c5c268c24ca89283
Original file line number Diff line number Diff line change
@@ -283,12 +283,26 @@ public partial interface IProductAttributeService
ProductVariantAttributeCombination GetProductVariantAttributeCombinationById(int productVariantAttributeCombinationId);

/// <summary>
/// /// Gets a product variant attribute combination by SKU
/// Gets a product variant attribute combination by SKU
/// </summary>
/// <param name="sku">SKU</param>
/// <returns>Product variant attribute combination</returns>
ProductVariantAttributeCombination GetProductVariantAttributeCombinationBySku(string sku);

/// <summary>
/// Gets a product variant attribute combination by GTIN.
/// </summary>
/// <param name="gtin">GTIN.</param>
/// <returns>Product variant attribute combination.</returns>
ProductVariantAttributeCombination GetAttributeCombinationByGtin(string gtin);

/// <summary>
/// Gets a product variant attribute combination by manufacturer part number.
/// </summary>
/// <param name="manufacturerPartNumber">Manufacturer part number.</param>
/// <returns>Product variant attribute combination.</returns>
ProductVariantAttributeCombination GetAttributeCombinationByMpn(string manufacturerPartNumber);

/// <summary>
/// Inserts a product variant attribute combination
/// </summary>
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ public class ProductImporter : EntityImporterBase
private readonly ICategoryService _categoryService;
private readonly IProductService _productService;
private readonly IProductTemplateService _productTemplateService;
private readonly IProductAttributeService _productAttributeService;
private readonly FileDownloadManager _fileDownloadManager;

private static readonly Dictionary<string, Expression<Func<Product, string>>> _localizableProperties = new Dictionary<string, Expression<Func<Product, string>>>
@@ -65,6 +66,7 @@ public ProductImporter(
ICategoryService categoryService,
IProductService productService,
IProductTemplateService productTemplateService,
IProductAttributeService productAttributeService,
FileDownloadManager fileDownloadManager)
{
_productPictureRepository = productPictureRepository;
@@ -81,6 +83,7 @@ public ProductImporter(
_categoryService = categoryService;
_productService = productService;
_productTemplateService = productTemplateService;
_productAttributeService = productAttributeService;
_fileDownloadManager = fileDownloadManager;

T = NullLocalizer.Instance;
@@ -310,7 +313,7 @@ protected virtual void ImportTierPrices(ImportExecuteContext context)
var batch = segmenter.GetCurrentBatch<TierPrice>();
var msg = processingInfo.FormatInvariant(entityName, segmenter.CurrentSegmentFirstRowIndex - 1, segmenter.TotalRows);

_tierPriceRepository.Context.DetachEntities(x => x is TierPrice);
_tierPriceRepository.Context.DetachEntities(x => x is TierPrice || x is Product);

context.SetProgress(msg);

@@ -321,7 +324,6 @@ protected virtual void ImportTierPrices(ImportExecuteContext context)
foreach (var row in batch)
{
var id = row.GetDataValue<int>("Id");
var productId = row.GetDataValue<int>("ProductId");
var tierPrice = id > 0 ? _tierPriceRepository.GetById(id) : null;

if (tierPrice == null)
@@ -333,23 +335,23 @@ protected virtual void ImportTierPrices(ImportExecuteContext context)
}

// ProductId is required for new tier prices.
var productId = row.GetDataValue<int>("ProductId");
if (productId == 0)
{
++context.Result.SkippedRecords;
context.Result.AddError("The 'ProductId' field is required for new tier prices. Skipping row.", row.GetRowInfo(), "ProductId");
continue;
}

tierPrice = new TierPrice();
tierPrice = new TierPrice
{
ProductId = productId
};
}

row.Initialize(tierPrice, null);

if (productId != 0)
{
tierPrice.ProductId = productId;
}

// Ignore ProductId field. We only update volatile property values and want to avoid accidents.
row.SetProperty(context.Result, (x) => x.StoreId);
row.SetProperty(context.Result, (x) => x.CustomerRoleId);
row.SetProperty(context.Result, (x) => x.Quantity);
@@ -377,6 +379,11 @@ protected virtual void ImportTierPrices(ImportExecuteContext context)

context.Result.NewRecords += batch.Count(x => x.IsNew);
context.Result.ModifiedRecords += Math.Max(0, savedEntities - context.Result.NewRecords);

// Update has tier prices property for inserted records.
var insertedProductIds = new HashSet<int>(batch.Where(x => x.IsNew).Select(x => x.Entity.ProductId));
var products = _productService.GetProductsByIds(insertedProductIds.ToArray());
products.Each(x => _productService.UpdateHasTierPricesProperty(x));
}
}

@@ -403,7 +410,6 @@ protected virtual void ImportAttributeValues(ImportExecuteContext context)
foreach (var row in batch)
{
var id = row.GetDataValue<int>("Id");
var pvaId = row.GetDataValue<int>("ProductVariantAttributeId");
var attributeValue = id > 0 ? _attributeValueRepository.GetById(id) : null;

if (attributeValue == null)
@@ -415,23 +421,30 @@ protected virtual void ImportAttributeValues(ImportExecuteContext context)
}

// ProductVariantAttributeId is required for new attribute values.
var pvaId = row.GetDataValue<int>("ProductVariantAttributeId");
if (pvaId == 0)
{
++context.Result.SkippedRecords;
context.Result.AddError("The 'ProductVariantAttributeId' field is required for new attribute values. Skipping row.", row.GetRowInfo(), "ProductVariantAttributeId");
continue;
}

attributeValue = new ProductVariantAttributeValue();
if (!row.HasDataValue("Name"))
{
++context.Result.SkippedRecords;
context.Result.AddError("The 'Name' field is required for new attribute values. Skipping row.", row.GetRowInfo(), "Name");
continue;
}

attributeValue = new ProductVariantAttributeValue
{
ProductVariantAttributeId = pvaId
};
}

row.Initialize(attributeValue, null);

if (pvaId != 0)
{
attributeValue.ProductVariantAttributeId = pvaId;
}

// Ignore ProductVariantAttributeId field. We only update volatile property values and want to avoid accidents.
row.SetProperty(context.Result, (x) => x.Alias);
row.SetProperty(context.Result, (x) => x.Name);
row.SetProperty(context.Result, (x) => x.Color);
@@ -464,6 +477,8 @@ protected virtual void ImportAttributeValues(ImportExecuteContext context)

context.Result.NewRecords += batch.Count(x => x.IsNew);
context.Result.ModifiedRecords += Math.Max(0, savedEntities - context.Result.NewRecords);

// MediaHelper.UpdatePictureTransientStateFor() not required, I guess, because there is no picture upload.
}
}

@@ -472,14 +487,15 @@ protected virtual void ImportAttributeCombinations(ImportExecuteContext context)
var segmenter = context.DataSegmenter;
var entityName = RelatedEntityType.ProductVariantAttributeCombination.GetLocalizedEnum(context.Services.Localization, context.Services.WorkContext);
var processingInfo = T("Admin.Common.ProcessingInfo").Text;
var lowestCombinationPriceProductIds = new HashSet<int>();

while (context.Abort == DataExchangeAbortion.None && segmenter.ReadNextBatch())
{
var savedEntities = 0;
var batch = segmenter.GetCurrentBatch<ProductVariantAttributeCombination>();
var msg = processingInfo.FormatInvariant(entityName, segmenter.CurrentSegmentFirstRowIndex - 1, segmenter.TotalRows);

_attributeCombinationRepository.Context.DetachEntities(x => x is ProductVariantAttributeCombination);
_attributeCombinationRepository.Context.DetachEntities(x => x is ProductVariantAttributeCombination || x is Product);

context.SetProgress(msg);

@@ -490,24 +506,53 @@ protected virtual void ImportAttributeCombinations(ImportExecuteContext context)
foreach (var row in batch)
{
var id = row.GetDataValue<int>("Id");
var productId = row.GetDataValue<int>("ProductId");
var combination = id > 0 ? _attributeCombinationRepository.GetById(id) : null;

// No Id? Try key fields.
if (combination == null)
{
// No insert, no risk of inconsistent combination data.
foreach (var keyName in context.KeyFieldNames)
{
var keyValue = row.GetDataValue<string>(keyName);
if (keyValue.HasValue())
{
switch (keyName)
{
case "Sku":
combination = _productAttributeService.GetProductVariantAttributeCombinationBySku(keyValue);
break;
case "Gtin":
combination = _productAttributeService.GetAttributeCombinationByGtin(keyValue);
break;
case "ManufacturerPartNumber":
combination = _productAttributeService.GetAttributeCombinationByMpn(keyValue);
break;
}
}

if (combination != null)
{
break;
}
}
}

if (combination == null)
{
// We do not insert records here to avoid inconsistent attribute combination data.
++context.Result.SkippedRecords;
context.Result.AddError("The 'Id' field is required. Inserting attribute combinations not supported yet. Skipping row.", row.GetRowInfo(), "Id");
context.Result.AddError("The 'Id' or another key field is required. Inserting attribute combinations not supported. Skipping row.", row.GetRowInfo(), "Id");
continue;
}

row.Initialize(combination, null);

if (productId != 0)
if (row.TryGetDataValue("Price", out decimal? price) && price != combination.Price)
{
combination.ProductId = productId;
lowestCombinationPriceProductIds.Add(combination.ProductId);
}

// Ignore ProductId field. We only update volatile property values and want to avoid accidents.
row.SetProperty(context.Result, (x) => x.Sku);
row.SetProperty(context.Result, (x) => x.Gtin);
row.SetProperty(context.Result, (x) => x.ManufacturerPartNumber);
@@ -537,6 +582,10 @@ protected virtual void ImportAttributeCombinations(ImportExecuteContext context)

context.Result.NewRecords += batch.Count(x => x.IsNew);
context.Result.ModifiedRecords += Math.Max(0, savedEntities - context.Result.NewRecords);

// Update lowest attribute combination price property.
var products = _productService.GetProductsByIds(lowestCombinationPriceProductIds.ToArray());
products.Each(x => _productService.UpdateLowestAttributeCombinationPriceProperty(x));
}
}

@@ -868,13 +917,13 @@ protected virtual void ProcessProductPictures(ImportExecuteContext context, IEnu
}
else
{
context.Result.AddInfo("Found equal picture in data store. Skipping field.", row.GetRowInfo(), "ImageUrls" + image.DisplayOrder.ToString());
context.Result.AddInfo($"Found equal picture in data store for {image.Url}. Skipping field.", row.GetRowInfo(), "ImageUrls" + image.DisplayOrder.ToString());
}
}
}
else if (image.Url.HasValue())
{
context.Result.AddInfo($"Download failed for image {image.Url}.", row.GetRowInfo(), "ImageUrls" + image.DisplayOrder.ToString());
context.Result.AddInfo($"Download failed for picture {image.Url}.", row.GetRowInfo(), "ImageUrls" + image.DisplayOrder.ToString());
}
}
catch (Exception ex)
Original file line number Diff line number Diff line change
@@ -703,13 +703,37 @@ public virtual ProductVariantAttributeCombination GetProductVariantAttributeComb

public virtual ProductVariantAttributeCombination GetProductVariantAttributeCombinationBySku(string sku)
{
if (sku.IsEmpty())
return null;
if (sku.IsEmpty())
{
return null;
}

var combination = _pvacRepository.Table.FirstOrDefault(x => x.Sku == sku && x.Product.Deleted == false && !x.Product.IsSystemProduct);
var combination = _pvacRepository.Table.FirstOrDefault(x => x.Sku == sku && !x.Product.Deleted && !x.Product.IsSystemProduct);
return combination;
}

public virtual ProductVariantAttributeCombination GetAttributeCombinationByGtin(string gtin)
{
if (gtin.IsEmpty())
{
return null;
}

var combination = _pvacRepository.Table.FirstOrDefault(x => x.Gtin == gtin && !x.Product.Deleted && !x.Product.IsSystemProduct);
return combination;
}

public virtual ProductVariantAttributeCombination GetAttributeCombinationByMpn(string manufacturerPartNumber)
{
if (manufacturerPartNumber.IsEmpty())
{
return null;
}

var combination = _pvacRepository.Table.FirstOrDefault(x => x.ManufacturerPartNumber == manufacturerPartNumber && !x.Product.Deleted && !x.Product.IsSystemProduct);
return combination;
}

public virtual void InsertProductVariantAttributeCombination(ProductVariantAttributeCombination combination)
{
if (combination == null)
Original file line number Diff line number Diff line change
@@ -46,10 +46,13 @@
<span id="FileNamePatternExample">@Model.FileNamePatternExample</span>
</div>
<div>
<div class="mt-3">
<a id="FileNamePatternDescriptionLink" href="javascript:void(0)">@T("Admin.DataExchange.Export.Deployment.ShowPlaceholder")&hellip;</a>
<div class="mt-2">
<button id="FileNamePatternDescriptionLink" type="button" class="btn btn-outline-light btn-sm font-weight-normal">
<span>@T("Admin.DataExchange.Export.Deployment.ShowPlaceholder")</span>
<i class="fa fa-chevron-down"></i>
</button>
</div>
<div id="FileNamePatternDescription" class="d-none mt-3">
<div id="FileNamePatternDescription" class="hide mt-2">
@FileNamePatternDescription()
</div>
</div>
@@ -263,9 +266,12 @@

// show/hide file name pattern descriptions
$('#FileNamePatternDescriptionLink').click(function () {
var descriptions = $('#FileNamePatternDescription');
$('#FileNamePatternDescriptionLink').html((descriptions.is(':visible') ? @T("Admin.DataExchange.Export.Deployment.ShowPlaceholder").JsText : @T("Admin.DataExchange.Export.Deployment.HidePlaceholder").JsText) + '…');
descriptions.toggleClass("d-none");
var descriptions = $('#FileNamePatternDescription'),
isVisible = descriptions.is(':visible');

descriptions.slideToggle();
$(this).find('span').html(isVisible ? @T("Admin.DataExchange.Export.Deployment.ShowPlaceholder").JsText : @T("Admin.DataExchange.Export.Deployment.HidePlaceholder").JsText);
$(this).find('i').removeClass(isVisible ? 'fa-chevron-up' : 'fa-chevron-down').addClass(isVisible ? 'fa-chevron-down' : 'fa-chevron-up');
});

// delete deployment