Add checkout attribute management functionality (by store) #570#609
Merged
KrzysztofPajak merged 2 commits intodevelopfrom Jun 16, 2025
Merged
Add checkout attribute management functionality (by store) #570#609KrzysztofPajak merged 2 commits intodevelopfrom
KrzysztofPajak merged 2 commits intodevelopfrom
Conversation
- Updated `PermissionExtensions` to include permission for managing checkout attributes. - Modified `ICheckoutAttributeViewModelService` to accept an optional `storeId` parameter. - Enhanced `CheckoutAttributeViewModelService` to utilize the `storeId` when retrieving attributes. - Added/modified Razor views for creating, editing, and listing checkout attributes and their values. - Updated `CheckoutAttributeController` to support new management features for checkout attributes. - Made changes to `DefaultLanguage.xml` for localization updates.
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds store-scoped checkout attribute management by extending permissions, view-model services, controller actions, and views.
- Extended
PermissionExtensionsand controller to enforce a newManageCheckoutAttributepermission. - Updated
ICheckoutAttributeViewModelServiceand its implementation to accept and use an optionalstoreIdfilter. - Introduced new and modified Razor views for listing, creating, editing, and managing checkout attributes and their values.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Web/Grand.Web.Store/Controllers/CheckoutAttributeController.cs | New store-aware CRUD operations for checkout attributes and values |
| src/Web/Grand.Web.AdminShared/Interfaces/ICheckoutAttributeViewModelService.cs | Extended service interface to accept optional storeId |
| src/Web/Grand.Web.AdminShared/Services/CheckoutAttributeViewModelService.cs | Updated model service to filter attributes by storeId |
| src/Modules/Grand.Module.Installer/Extensions/PermissionExtensions.cs | Added StandardPermission.ManageCheckoutAttribute |
| src/Web/Grand.Web.Store/Areas/Store/Views/CheckoutAttribute/* | Added and updated Razor views for attribute and value management |
Comments suppressed due to low confidence (1)
src/Web/Grand.Web.AdminShared/Services/CheckoutAttributeViewModelService.cs:30
- [nitpick] There are no existing unit tests covering the new
storeIdparameter path inPrepareCheckoutAttributeListModel. Add tests to verify filtering behavior when astoreIdis provided.
public virtual async Task<IEnumerable<CheckoutAttributeModel>> PrepareCheckoutAttributeListModel(string storeId = "")
…r.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



PermissionExtensionsto include permission for managing checkout attributes.ICheckoutAttributeViewModelServiceto accept an optionalstoreIdparameter.CheckoutAttributeViewModelServiceto utilize thestoreIdwhen retrieving attributes.CheckoutAttributeControllerto support new management features for checkout attributes.DefaultLanguage.xmlfor localization updates.