Skip to content

zhiguohe/vc-storefront-core

 
 

Repository files navigation

Virto Commerce Storefront Kit

Share on Facebook Tweet Latest release Total downloads License

CI status Quality gate Reliability rating Security rating Sqale rating Lines of code

Documentation Discourse topics Contributors

Deploy to Azure

Official online shopping website based on Virto Commerce Platform written on ASP.NET Core. The website is a client application for VC Platform and uses only public APIs while communicating.

It is possible to run multiple different stores (web sites) on top of Virto Commerce. Each store (website) might have its own theme with a specific layout still being based on the same catalog and customer data.

It is possible, for example, to create sites with a different design for different product categories still having all products in the same backend.

Another option is to create different sites for different regions so that a specific product set will be available to a specific region, is still based on one product data.

It is also possible to connect Virto Commerce to multiple touchpoints so that customers will get a real omnichannel experience.

Key features

  • Multi-Store support
  • Multi-Language support
  • Multi-Currency support
  • Multi-Themes support
  • Faceted search support
  • SEO friendly routing
  • Server-side rendering
  • Client-side rendering
  • Optimization for Desktop
  • Optimization for Tables
  • Optimization for Mobile

Business Requirements

  • Home page
  • Catalog browsing
  • Product page
  • Cart
  • Bulk add to cart
  • Multiple Whish lists and Mark favorites
  • Product compare
  • Anonymous Checkout process
  • Checkout process
  • Address verification
  • Integration with Tax providers
  • Integration Shippment and Payment methods
  • Place orders
  • Order Approve process
  • Offers
  • My Account
  • My Orders History
  • Reorder
  • New Account verification
  • Self-registration
  • Forgot password
  • User permissions to manage their own account page
  • Catalog personalization
  • Price personalization (List and Sales prices)
  • Promotions
  • Coupons
  • Recommended products
  • Banner and dynamic content
  • User Groups - to build personalization
  • Configurable Branding and customization
  • Configurable navigation
  • CMS to build Static, Landing, Blog pages

References

Sample themes

View B2B theme on GitHub.

image

Technologies and frameworks used

  • ASP.NET MVC Core 6.0 on .NET 60
  • ASP.NET Identity Core 3.1.0
  • GraphQL

Prerequisites

Continuous Integration Supported by Browserstack

Cross-browser compatibility of the storefront is generously provided by Browserstack.

Browserstack

Deploy Storefront

If Platform and Storefront are deployed in the same on-premises environment, Storefront should be deployed on different port then Platform. You can do it by dotnet run CLI

Install the vc-storefront

  • Download latest release and unpack in to a local folder

  • Or Clone https://github.com/VirtoCommerce/vc-storefront in to a local folder

  • Open the appsettings.json file in a text editor.

  • In the Endpoint section change Url, UserName, Password with correct path and credentials for Virto Commerce Platform:

...
 "Endpoint": {
     "Url": "https://localhost:5001",
     "UserName": "admin",
     "Password": "store",

Setup B2B Mercury theme

# Clone repo into the folder where storefront is installed
git clone https://github.com/VirtoCommerce/vc-theme-b2b-vue.git "C:\vc-storefront\VirtoCommerce.Storefront\wwwroot\cms-content\themes\{store-name}\default"
# Change the current directory
cd C:\vc-storefront\VirtoCommerce.Storefront\wwwroot\cms-content\themes\{store-name}\default
# install dependencies
yarn
# Start theme in development mode with HMR support
yarn dev
# or build theme to get installable artifact
yarn compress

Run vc-storefront application

# change the current directory
cd C:\vc-storefront\VirtoCommerce.Storefront
# build and run storefront application
dotnet run
# In future, if you don't need to rebuild you can use that
dotnet run --no-build

FAQ

Running the Storefront only on HTTP schema

  • In order to run the platform only at HTTP schema in production mode, it's enough to pass only HTTP URLs in --urls argument of the dotnet command.
  dotnet VirtoCommerce.Storefront.dll --urls=http://localhost:5002

Running the Platform on HTTPS schema

  • Install and trust HTTPS certificate

Run to trust the .NET Core SDK HTTPS development certificate:

    dotnet dev-certs https --trust

Read more about enforcing HTTPS in ASP.NET Core

    dotnet VirtoCommerce.Storefront.dll --urls=https://localhost:4302/
  • Trust the .Net Core Development Self-Signed Certificate. More details on trusting the self-signed certificate can be found here

Forward the scheme for Linux and non-IIS reverse proxies

Apps that call UseHttpsRedirection and UseHsts put a site into an infinite loop if deployed to an Azure Linux App Service, Azure Linux virtual machine (VM), Linux container or behind any other reverse proxy besides IIS. TLS is terminated by the reverse proxy, and Kestrel isn't made aware of the correct request scheme. OAuth and OIDC also fail in this configuration because they generate incorrect redirects. UseIISIntegration adds and configures Forwarded Headers Middleware when running behind IIS, but there's no matching automatic configuration for Linux (Apache or Nginx integration).

To forward the scheme from the proxy in non-IIS scenarios, set ASPNETCORE_FORWARDEDHEADERS_ENABLED environment variable to true.

For more details on how it works, see the Microsoft documentation.

License

Copyright (c) Virto Solutions LTD. All rights reserved.

Licensed under the Virto Commerce Open Software License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://virtocommerce.com/opensourcelicense

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

About

VirtoCommerce Storefront for ASP.NET Core 2.0 repository

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.7%
  • Other 0.3%