For Business Analyst, Solution Consultant, Solution Architect.
Give your users more control and flexibility around product prices by adding a new price's type. Then, manager can do things like set recommended product price with default prices and display it on sales channel.
As an admin, I want to set a recommended price for products in the price list to show it to a customer in a storefront
Scenario 1. Admin registers a recommended price for a product
- Admin goes to a price list
- Admin inserts/edits a recommended price for a product
Generalization: This is the story about adding a new price column into the price list, similar to "sales price" or other kinds of prices
As a storefront client, I want to VirtoCommerce Price Module API returns the VirtoCommerce.Domain.Pricing.Model.Price model with a recommended price
Scenario 1. VirtoCommerce Price model is extended with the recommended price property.
- Open VirtoCommerce Solution REST API documentation.
- See that VirtoCommerce.Domain.Pricing.Model.Price model is extended with the recommended price property
Scenario 2. CRUD Operations are available for recommended price property.
- Call API to create a product price with a recommended price
- Call API to read the product price with the recommended price
- Call API to update the product price with the recommended price
- Call API to delete the product and recommended price should be deleted from persistent storage.
Generalization: This is the story about extending Price model with a new property "recommend" price.
Effort (story points):
2 – Small changes, development is required (1-2 days)
For Team Lead
This case study shows how to extend the standard Pricing Module by adding a field to the Price entity.
How to implement: an overview
This is one of the simplest examples how to extend the Pricing Module. To implement the example, you should use the standard template Pricing Module extension https://github.com/VirtoCommerce/vc-visualstudio-templates
How to implement: step by step instruction for Developers
- Create Pricing Module extension solution from the template
- Fill in module.manifest file
- Connect extension module with the platform
- Extend Domain model with Recommended field (Core project)
- Extend Persistence layer with Recommended field (Data Project)
- Extend Repository (Data Project)
- Create Migration (Data Project)
- Check that all exist Price records are converted to the extension, add string Sql("INSERT INTO dbo.PriceEx (Id) SELECT Id FROM dbo.Price") to conversion if not exists (Data Project)
- Check that cascade delete to the price entity created (Data Project)
- Check the migration. Delete creation of existing tables (Data Project)
- Create Unit tests (Tests project)
- Check connection string (Web project, Module.cs)
- Check DB registration (Web project, Module.cs)
- Check type overriding (Web project, Module.cs)
- Add Recommended column into Price grid in Platform manager UI (Web project, module.js)
- Extend Localization file for Recommended field (Web project)
Recommended column added into the Price
How to implement: Source Code (Code examples)
You can use this sample https://github.com/VirtoCommerce/vc-samples/tree/master/External.PriceModule
You can use ready to use Visual Studio Template to create Virto Commerce 2.x Pricing Module extension https://github.com/VirtoCommerce/vc-visualstudio-templates