Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: simple-pricing plugin #5014

Merged
merged 10 commits into from
Mar 1, 2019
Merged

Conversation

nnnnat
Copy link
Contributor

@nnnnat nnnnat commented Feb 28, 2019

Resolves #4970
Impact: minor
Type: feature|refactor

Issue

Pricing data falls under it's own domain within the Reaction Commerce system, however it currently needs to be intertwined and available from other system domains (i.e., Catalog, Cart, Checkout, Orders).

Solution

To give us more flexibility in pricing data management we've begun to move pricing get/set functions into this simple-pricing plugin and calling these functions from the context.queries object from within their respective functions. Now we can fully replace the pricing management system without modification to core by creating a custom plugin that replaces the simple-pricing queries.

Testing

While this acceptance test is testing multiple things it can be done in one pass.
Adding Cart Items

  1. Spin up a fresh RC & Storefront with some sample products and payment/shipping enabled.
  2. From the Storefront, select a product from the product grid, view the product detail page, select an option and click "add to cart".
  3. The MiniCart should pop open with your newly added product displaying the product's price.
  4. Repeat the above steps with a different product to see multiple products in the MiniCart.

Price Change
5. From the RC admin select one of the products you've added to your cart in the Storefront.
6. From the products edit screen select the option, change the price then publish the product changes to the catalog.
7. From the Storefront click the cart icon to go to the cart page.
8. From here you should see you're cart item's price has been updated to the new price.

Checkout
9. Now click "checkout" and follow finishes the checkout flow.
10. You should see the correct prices for each item in the checkout review.
11. Place the order, the order should be accepted and you'll be met with the completed order view displaying the products with the prices paid.

focusaurus and others added 3 commits February 26, 2019 10:00
- Combine the main .env.example file with any .env.example
  files from custom plugins during setup
- ignore blank lines
- also format with shfmt
- also fix one shellcheck lint error

Signed-off-by: Peter Lyons <[email protected]>

Signed-off-by: Nat Hamilton <[email protected]>
feat: Use .env.example files from custom plugins
Signed-off-by: Nat Hamilton <[email protected]>
@nnnnat nnnnat added this to the 🏔 Torreys milestone Feb 28, 2019
@nnnnat nnnnat self-assigned this Feb 28, 2019
@nnnnat nnnnat requested a review from aldeed February 28, 2019 15:36
@nnnnat nnnnat force-pushed the refactor-4970-nnnnat-simple-pricing branch from 960a61e to 157503e Compare February 28, 2019 16:10
Signed-off-by: Nat Hamilton <[email protected]>

Signed-off-by: Nat Hamilton <[email protected]>

Signed-off-by: Nat Hamilton <[email protected]>
…icing data.

Signed-off-by: Nat Hamilton <[email protected]>

Signed-off-by: Nat Hamilton <[email protected]>

Signed-off-by: Nat Hamilton <[email protected]>
@nnnnat nnnnat force-pushed the refactor-4970-nnnnat-simple-pricing branch 2 times, most recently from eea2468 to dabb0db Compare February 28, 2019 16:14
Signed-off-by: Nat Hamilton <[email protected]>

Signed-off-by: Nat Hamilton <[email protected]>

Signed-off-by: Nat Hamilton <[email protected]>
@nnnnat nnnnat force-pushed the refactor-4970-nnnnat-simple-pricing branch 2 times, most recently from cca671b to 5db034a Compare February 28, 2019 16:35
@nnnnat nnnnat changed the title feat: created simple-pricing plugin, created a few cart related prici… feat: simple-pricing plugin Feb 28, 2019
Signed-off-by: Eric Dobbertin <[email protected]>
@nnnnat nnnnat merged commit ad2f735 into develop Mar 1, 2019
@nnnnat nnnnat deleted the refactor-4970-nnnnat-simple-pricing branch March 1, 2019 16:10
@jeffcorpuz jeffcorpuz mentioned this pull request Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants