Restrict pricelist price update from product page#22
Open
JustShah wants to merge 3 commits into
Open
Conversation
7e0f0de to
5b84a82
Compare
0394828 to
aaff3a6
Compare
|
@JustShah add logic to link to pricelist |
5b84a82 to
a510834
Compare
aaff3a6 to
5920ded
Compare
a510834 to
d398f23
Compare
5920ded to
d98c8f2
Compare
d398f23 to
f973070
Compare
d98c8f2 to
fd0982d
Compare
f973070 to
38b3f9b
Compare
fd0982d to
cb53a85
Compare
cb53a85 to
9a2d49a
Compare
|
@JustShah looks good and fine to me |
38b3f9b to
9de007a
Compare
This commit adds a boolean is_pricelist_price to spree price model, which can be used to identify whether the price has been created for price lists or the price has been created from products section.
Implemented `check_pricelist_price` in variant API and price admin controllers to prevent the user from updating prices which are associated to a price list.
- Added a new localization key for the error message indicating that a price belongs to a price list and cannot be edited or deleted. - Updated the master variant price table and the general price table in the admin interface to: - Prevent editing and deleting of prices that belong to a price list. - Display a message indicating the associated price lists for prices that are part of a price list. - Added hidden field for is_pricelist_price to price list item form.
9a2d49a to
b422769
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.
Restrict Price Edits for Price List Prices
This pull request introduces restrictions on editing or deleting prices that are associated with a price list from product tab. It adds localization, view updates, and backend checks to prevent modifications to prices that belong to price lists, ensuring better integrity in the pricing system.
Key Features:
Localization and View Updates for Price List Prices:
is_pricelist_priceto the price list item form to track whether a price belongs to a price list.Price List Price Check for Variants and Prices:
check_pricelist_pricemethod in the variant API and price admin controllers to prevent users from updating prices that are associated with a price list.New Attribute
is_pricelist_pricein Spree Price Model:is_pricelist_priceto theSpree::Pricemodel to identify whether a price has been created for a price list.Benefits:
is_pricelist_priceattribute allows for easier identification and management of prices that belong to price lists.