-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d5bfdd3
commit 889b250
Showing
14 changed files
with
82 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Blackbird.Applications.Sdk.Common.Dynamic; | ||
using Blackbird.Applications.Sdk.Common.Invocation; | ||
|
||
namespace Apps.Magento.DataSources; | ||
|
||
public class StoreViewWithAllDataSource(InvocationContext invocationContext) : StoreViewDataSource(invocationContext) | ||
{ | ||
public override async Task<Dictionary<string, string>> GetDataAsync(DataSourceContext context, CancellationToken cancellationToken) | ||
{ | ||
var result = await base.GetDataAsync(context, cancellationToken); | ||
|
||
if (result.All(x => x.Key != "all")) | ||
{ | ||
result.Add("all", "All"); | ||
} | ||
|
||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
Apps.Magento/Models/Identifiers/StoreViewWithAllOptionalIdentifier.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using Apps.Magento.DataSources; | ||
using Blackbird.Applications.Sdk.Common; | ||
using Blackbird.Applications.Sdk.Common.Dynamic; | ||
|
||
namespace Apps.Magento.Models.Identifiers; | ||
|
||
public class StoreViewWithAllOptionalIdentifier | ||
{ | ||
[Display("Store view", Description = "If you will not specify it it will be default"), DataSource(typeof(StoreViewWithAllDataSource))] | ||
public string? StoreView { get; set; } | ||
|
||
public override string ToString() | ||
{ | ||
return StoreView ?? "default"; | ||
} | ||
} |
4 changes: 3 additions & 1 deletion
4
Apps.Magento/Models/Requests/Products/GetProductAsHtmlRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
using Apps.Magento.DataSources; | ||
using Blackbird.Applications.Sdk.Common; | ||
using Blackbird.Applications.Sdk.Common.Dynamic; | ||
|
||
namespace Apps.Magento.Models.Requests.Products; | ||
|
||
public class GetProductAsHtmlRequest | ||
{ | ||
[Display("Custom attributes", Description = "Specify custom attributes to include in the HTML file. By default, only name, meta_title, meta_description, meta_keyword and description are included.")] | ||
[Display("Custom attributes", Description = "Specify custom attributes to include in the HTML file. By default, only name, meta_title, meta_description, meta_keyword and description are included."), DataSource(typeof(ProductAttributeDataSource))] | ||
public IEnumerable<string>? CustomAttributes { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters