Technical Case Studies

Updated:
Contributors:
See all
Edit on GitHub

Welcome to the Virto Commerce Technical Case Studies

A collection of technical case studies with architecture diagrams, value stream mapping examples, code, and other artifacts coupled with step by step details and learning resources. The stories showcase how Virto Commerce, customers, and partners are building solutions utilizing Virto Commerce and open source technologies to solve real world business challenges that cover small to large enterprises of varying industries around the world.

Audience

These Technical Case Studies has been prepared for the business-analyst, solution architect and senior developer to help them understand Virto Commerce capabilities and best-practices.

Audience

For Business Analyst, Solution Consultant, Solution Architect.

Overview

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.

Functional overview

User stories

Scenario 1. Admin registers a recommended price for a product

  1. Admin goes to a price list
  2. 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

Recommended Price in Admin UI

Scenario 1. VirtoCommerce Price model is extended with the recommended price property.

  1. Open VirtoCommerce Solution REST API documentation.
  2. 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.

  1. Call API to create a product price with a recommended price
  2. Call API to read the product price with the recommended price
  3. Call API to update the product price with the recommended price
  4. 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.

Recommended Price in Rest API

Non-functional overview

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

Pre-conditions

Nope

Steps

  1. Create Pricing Module extension solution from the template
  2. Fill in module.manifest file
  3. Connect extension module with the platform
  4. Extend Domain model with Recommended field (Core project)
  5. Extend Persistence layer with Recommended field (Data Project)
  6. Extend Repository (Data Project)
  7. Create Migration (Data Project)
  8. 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)
  9. Check that cascade delete to the price entity created (Data Project)
  10. Check the migration. Delete creation of existing tables (Data Project)
  11. Create Unit tests (Tests project)
  12. Check connection string (Web project, Module.cs)
  13. Check DB registration (Web project, Module.cs)
  14. Check type overriding (Web project, Module.cs)
  15. Add Recommended column into Price grid in Platform manager UI (Web project, module.js)
  16. Extend Localization file for Recommended field (Web project)

Expected Result

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.PricingModule

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