Add price list and price list items #21
Open
JustShah wants to merge 5 commits into
Open
Conversation
e85d8ee to
1052811
Compare
01b1912 to
7e0f0de
Compare
1052811 to
3808f85
Compare
7e0f0de to
5b84a82
Compare
5b84a82 to
a510834
Compare
3808f85 to
014dba4
Compare
a510834 to
d398f23
Compare
448813f to
fb116e2
Compare
d398f23 to
f973070
Compare
eea994f to
07acd8b
Compare
f973070 to
38b3f9b
Compare
- Introduced `Spree::PriceList` model to manage collections of prices associated with specific user groups and countries. - Added optional association for `price_list` on `user_group` - Created `Spree::PriceListItem` model to establish a many-to-many relationship between prices and price lists. - Updated `Spree::Price` model to include associations with price lists through price list items. - Added `contain_taxes` attribute to the `Spree::Price` model to indicate whether prices include taxes. - Implemented validations for the new models to ensure data integrity. - Added necessary database migrations to create price lists and price list items tables. These changes enhance the pricing structure by allowing for more flexible pricing strategies based on user groups and geographical considerations.
- Introduced PriceListsController to handle price list operations. - Created views for managing price lists, including: - New price list form (`new.html.erb`) - Price list edit form (`edit.html.erb`) - Price list index view (`index.html.erb`) - Partial views for price list form fields and price list information. - Implemented form fields for name, country, currency, and tax inclusion. - Added functionality to display price details associated with each price list. - Included breadcrumb navigation for better user experience in the admin panel. This feature allows administrators to create, edit, and manage price lists effectively, enhancing the overall product pricing strategy.
- Introduced PriceListItemsController to handle price list item operations. - Created views for managing price list items, including: - New price list item form (`new.html.erb`) - Price list item edit form (`edit.html.erb`) - Partial view for price list item form fields. - Implemented functionality to associate price list items with specific price lists and variants. - Added support for entering price details, including amount, currency and taxes. - Enhanced breadcrumb navigation for better user experience in the admin panel. This feature allows administrators to create, edit, and manage price list items, facilitating more flexible pricing strategies for products within the Spree application.
- Updated product sub-menu to include a link to price lists if the user has admin permissions. - Added routes for managing price lists and their associated price list items. - Updated backend configuration to include price lists in the admin menu, ensuring proper access control based on user permissions. These enhancements improve the organization of the admin interface, making it easier for administrators to manage price lists effectively.
This commits adds column on user group to display and select the associated price list for a user group.
38b3f9b to
9de007a
Compare
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.
Price List and Price List Items Management
This pull request introduces a complete Price List and Price List Items Management system within the Spree Admin. It enhances the flexibility of product pricing by associating price lists with user groups, managing price list items, and offering an improved admin interface for easier management of pricing strategies.
Key Features:
Add Price List Info on User Group Admin:
Price List Management:
PriceListsControllerto manage price lists within the admin panel.Price List Items Management:
PriceListItemsControllerto manage price list items.Model and Database Changes:
Spree::PriceListmodel to manage collections of prices associated with specific user groups and countries.price_liston theuser_groupmodel.Spree::PriceListItemmodel to establish relationship between prices and price lists.Spree::Pricemodel to include associations with price lists through price list items.contain_taxesattribute to theSpree::Pricemodel to indicate whether prices include taxes.spree_price_listsandspree_price_list_itemstables.Benefits: