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

Add Shopping Cart Loaded Workflow Event (OCC-137) #269

Closed
sarahelsaig opened this issue Mar 13, 2023 · 0 comments · Fixed by #330
Closed

Add Shopping Cart Loaded Workflow Event (OCC-137) #269

sarahelsaig opened this issue Mar 13, 2023 · 0 comments · Fixed by #330
Assignees
Labels
enhancement New feature or request

Comments

@sarahelsaig
Copy link
Contributor

sarahelsaig commented Mar 13, 2023

Is your feature request related to a problem? Please describe

Currently there is no way to add automatic entries to the shopping cart, such as shipping cost. Since this kind of stuff is tied to the business logic, we should support it via workflows so the custom logic can be coded in admin using Jint/Javascript.

Describe the solution you'd like

  • Add a new method for when the shopping cart is loaded (e.g. Task LoadedAsync(string shoppingCartId, ShoppingCart shoppingCart)). This should be invoked in IShoppingCartPersistence.RetrieveAsync(), so it behaves the same way every time the shopping cart is loaded.
  • Create workflow triggers for each method of IShoppingCartEvents
  • Create a WorkflowShoppingCartEvents : IShoppingCartEvents service that triggers each workflow.
    • It should not inherit from ShoppingCartEventsBase so we won't forget to add workflow triggers whenever a new method is added to IShoppingCartEvents.
  • If TableField is implemented in Lombiq.Datatables, then we can suggest using it via the Retrieve Content task to store additional tabular data that may be needed to calculate shipping costs.

Describe alternatives you've considered

We could create a specific implementation for specific features like adding shipping cost, but it would be too inflexible.

Jira issue

@sarahelsaig sarahelsaig added the enhancement New feature or request label Mar 13, 2023
@github-actions github-actions bot changed the title Add Shopping Cart Loaded Workflow Event Add Shopping Cart Loaded Workflow Event (OCC-137) Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant