Skip to content

Commit 13bccd1

Browse files
committed
Resolves smartstore#560 Return requests: Add fields for last update, last update of requested action and general notes
Resolves smartstore#588 Alternative localized category name used as title for category pages Resolves smartstore#589 Backend product list: Add filter for products with "no category mapping" and "no manufacturer mapping" Resolves smartstore#592 Add a second category description displayed beyond products on category page Resolves smartstore#626 Add IsActive flag for checkout attributes
1 parent 3e3b675 commit 13bccd1

37 files changed

Lines changed: 1300 additions & 201 deletions

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* #459 New field to determine tag for page titles on widget level
1515
* Added _shrink database_ to backend UI
1616
* (Developer) Added `BeginTransaction()` and `UseTransaction()` methods to `IDbContext`
17+
* #588 Alternative localized category name used as title for category pages
18+
* #592 Add a second category description displayed beyond products on category page
1719

1820
### Improvements
1921
* Perf: product list rendering up to 10x (!) faster now (depends on page size and view mode)
@@ -30,6 +32,9 @@
3032
* #666 Export addresses in customer export
3133
* New shopping cart setting ShowItemsFromWishlistToCartButton
3234
* XML product export now paged and more data exported
35+
* #560 Return requests: Add fields for last update, last update of requested action and general notes
36+
* #589 Backend product list: Add filter for products with "no category mapping" and "no manufacturer mapping"
37+
* #626 Add IsActive flag for checkout attributes
3338

3439
### Bugfixes
3540
* Instant search box did not display all results when SQL Fulltext Search was enabled

src/Libraries/SmartStore.Core/Domain/Catalog/Category.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,28 @@ public partial class Category : BaseEntity, ISoftDeletable, ILocalizedEntity, IS
2626
[DataMember]
2727
public string Name { get; set; }
2828

29+
/// <summary>
30+
/// Gets or sets the full name (category page title)
31+
/// </summary>
32+
[DataMember]
33+
public string FullName { get; set; }
34+
2935
/// <summary>
3036
/// Gets or sets the description
3137
/// </summary>
3238
[DataMember]
3339
public string Description { get; set; }
3440

41+
/// <summary>
42+
/// Gets or sets a description displayed at the bottom of the category page
43+
/// </summary>
44+
[DataMember]
45+
public string BottomDescription { get; set; }
46+
3547
/// <summary>
3648
/// Gets or sets the category alias
3749
/// (an optional key for advanced customization)
3850
/// </summary>
39-
/// <remarks>codehint: sm-add</remarks>
4051
[DataMember]
4152
public string Alias { get; set; }
4253

src/Libraries/SmartStore.Core/Domain/Orders/CheckoutAttribute.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ public partial class CheckoutAttribute : BaseEntity, ILocalizedEntity
1111
{
1212
private ICollection<CheckoutAttributeValue> _checkoutAttributeValues;
1313

14+
public CheckoutAttribute()
15+
{
16+
this.IsActive = true;
17+
}
18+
1419
/// <summary>
1520
/// Gets or sets the name
1621
/// </summary>
@@ -50,6 +55,11 @@ public partial class CheckoutAttribute : BaseEntity, ILocalizedEntity
5055
/// Gets or sets the display order
5156
/// </summary>
5257
public int DisplayOrder { get; set; }
58+
59+
/// <summary>
60+
/// Gets or sets whether the checkout attribute is active
61+
/// </summary>
62+
public bool IsActive { get; set; }
5363

5464
/// <summary>
5565
/// Gets the attribute control type

src/Libraries/SmartStore.Core/Domain/Orders/ReturnRequest.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ public partial class ReturnRequest : BaseEntity
4646
[DataMember]
4747
public string RequestedAction { get; set; }
4848

49+
/// <summary>
50+
/// Gets or sets the date and time when requested action was last updated
51+
/// </summary>
52+
[DataMember]
53+
public DateTime? RequestedActionUpdatedOnUtc { get; set; }
54+
4955
/// <summary>
5056
/// Gets or sets the customer comments
5157
/// </summary>
@@ -58,6 +64,12 @@ public partial class ReturnRequest : BaseEntity
5864
[DataMember]
5965
public string StaffNotes { get; set; }
6066

67+
/// <summary>
68+
/// Gets or sets the admin comment
69+
/// </summary>
70+
[DataMember]
71+
public string AdminComment { get; set; }
72+
6173
/// <summary>
6274
/// Gets or sets the return status identifier
6375
/// </summary>

src/Libraries/SmartStore.Data/Mapping/Catalog/CategoryMap.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ public CategoryMap()
1010
this.ToTable("Category");
1111
this.HasKey(c => c.Id);
1212
this.Property(c => c.Name).IsRequired().HasMaxLength(400);
13+
this.Property(c => c.FullName).HasMaxLength(400);
14+
this.Property(c => c.BottomDescription).IsMaxLength();
1315
this.Property(c => c.Description).IsMaxLength();
1416
this.Property(c => c.MetaKeywords).HasMaxLength(400);
1517
this.Property(c => c.MetaTitle).HasMaxLength(400);

src/Libraries/SmartStore.Data/Mapping/Orders/ReturnRequestMap.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public ReturnRequestMap()
1111
this.HasKey(rr => rr.Id);
1212
this.Property(rr => rr.ReasonForReturn).IsRequired();
1313
this.Property(rr => rr.RequestedAction).IsRequired();
14+
this.Property(rr => rr.AdminComment).HasMaxLength(4000);
1415

1516
this.Ignore(rr => rr.ReturnRequestStatus);
1617

src/Libraries/SmartStore.Data/Migrations/201504111815146_NewCategoryProperties.Designer.cs

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
namespace SmartStore.Data.Migrations
2+
{
3+
using System;
4+
using System.Data.Entity.Migrations;
5+
using System.Web.Hosting;
6+
using SmartStore.Core.Data;
7+
using SmartStore.Data.Setup;
8+
9+
public partial class NewCategoryProperties : DbMigration, ILocaleResourcesProvider, IDataSeeder<SmartObjectContext>
10+
{
11+
public override void Up()
12+
{
13+
AddColumn("dbo.Category", "FullName", c => c.String(maxLength: 400));
14+
AddColumn("dbo.Category", "BottomDescription", c => c.String());
15+
16+
AddColumn("dbo.CheckoutAttribute", "IsActive", c => c.Boolean(nullable: false, defaultValue: true));
17+
18+
AddColumn("dbo.ReturnRequest", "AdminComment", c => c.String(maxLength: 4000));
19+
AddColumn("dbo.ReturnRequest", "RequestedActionUpdatedOnUtc", c => c.DateTime());
20+
21+
if (HostingEnvironment.IsHosted && DataSettings.Current.IsSqlServer)
22+
{
23+
this.SqlFile("LatestProductLoadAllPaged.sql");
24+
}
25+
}
26+
27+
public override void Down()
28+
{
29+
// inverse of LatestProductLoadAllPaged.sql does not make sense to me
30+
31+
DropColumn("dbo.ReturnRequest", "RequestedActionUpdatedOnUtc");
32+
DropColumn("dbo.ReturnRequest", "AdminComment");
33+
34+
DropColumn("dbo.CheckoutAttribute", "IsActive");
35+
36+
DropColumn("dbo.Category", "BottomDescription");
37+
DropColumn("dbo.Category", "FullName");
38+
}
39+
40+
public bool RollbackOnFailure
41+
{
42+
get { return false; }
43+
}
44+
45+
public void Seed(SmartObjectContext context)
46+
{
47+
context.MigrateLocaleResources(MigrateLocaleResources);
48+
}
49+
50+
public void MigrateLocaleResources(LocaleResourcesBuilder builder)
51+
{
52+
builder.AddOrUpdate("Admin.Catalog.Categories.Fields.FullName",
53+
"Complete name",
54+
"Vollständiger Name",
55+
"Complete name displayed as title on the category page.",
56+
"Vollständiger Name, der als Titel auf der Warengruppenseite angezeigt wird.");
57+
58+
builder.AddOrUpdate("Admin.Catalog.Categories.Fields.BottomDescription",
59+
"Bottom description",
60+
"Untere Beschreibung",
61+
"Optional second description displayed below products on the category page.",
62+
"Optionale zweite Beschreibung, die auf der Warengruppenseite unterhalb der Produkte angezeigt wird.");
63+
64+
builder.AddOrUpdate("Admin.Catalog.Products.List.SearchWithoutCategories",
65+
"Without category mapping",
66+
"Ohne Warengruppenzuordnung",
67+
"Filters for products without category mapping.",
68+
"Filtert nach Produkten ohne Warengruppenzuordnung.");
69+
70+
builder.AddOrUpdate("Admin.Catalog.Products.List.SearchWithoutManufacturers",
71+
"Without manufacturer mapping",
72+
"Ohne Herstellerzuordnung",
73+
"Filters for products without manufacturer mapping.",
74+
"Filtert nach Produkten ohne Herstellerzuordnung.");
75+
76+
builder.AddOrUpdate("Admin.Common.AdminComment",
77+
"Admin comment",
78+
"Admin-Kommentar",
79+
"Admin comment for internal use. Won't be published.",
80+
"Kommentar für internen Gebrauch. Wird nicht veröffentlicht.");
81+
82+
builder.AddOrUpdate("Admin.ReturnRequests.Fields.RequestedActionUpdatedOnUtc",
83+
"Last update of requested action",
84+
"Letzte Aktualisierung der angeforderten Aktion",
85+
"Date when the requested action was updated the last time.",
86+
"Datum, an dem die angeforderte Aktion zuletzt geändert wurde.");
87+
}
88+
}
89+
}

src/Libraries/SmartStore.Data/Migrations/201504111815146_NewCategoryProperties.resx

Lines changed: 126 additions & 0 deletions
Large diffs are not rendered by default.

src/Libraries/SmartStore.Data/SmartStore.Data.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@
240240
<Compile Include="Migrations\201502120858030_Licensing.Designer.cs">
241241
<DependentUpon>201502120858030_Licensing.cs</DependentUpon>
242242
</Compile>
243+
<Compile Include="Migrations\201504111815146_NewCategoryProperties.cs" />
244+
<Compile Include="Migrations\201504111815146_NewCategoryProperties.Designer.cs">
245+
<DependentUpon>201504111815146_NewCategoryProperties.cs</DependentUpon>
246+
</Compile>
243247
<Compile Include="Setup\Builder\SettingsBuilder.cs" />
244248
<Compile Include="Setup\Builder\SettingsMigrator.cs" />
245249
<Compile Include="Setup\DbMigrationContext.cs" />
@@ -474,6 +478,9 @@
474478
<EmbeddedResource Include="Migrations\201502120858030_Licensing.resx">
475479
<DependentUpon>201502120858030_Licensing.cs</DependentUpon>
476480
</EmbeddedResource>
481+
<EmbeddedResource Include="Migrations\201504111815146_NewCategoryProperties.resx">
482+
<DependentUpon>201504111815146_NewCategoryProperties.cs</DependentUpon>
483+
</EmbeddedResource>
477484
<EmbeddedResource Include="Sql\Indexes.sql" />
478485
<EmbeddedResource Include="Sql\StoredProcedures.sql" />
479486
</ItemGroup>
@@ -489,6 +496,9 @@
489496
<ItemGroup>
490497
<EmbeddedResource Include="Sql\StoredProcedures.Inverse.sql" />
491498
</ItemGroup>
499+
<ItemGroup>
500+
<EmbeddedResource Include="Sql\LatestProductLoadAllPaged.sql" />
501+
</ItemGroup>
492502
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
493503
<PropertyGroup>
494504
<PostBuildEvent>

0 commit comments

Comments
 (0)