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

VCST-631: Update vc-storefront to NET8 #678

Merged
merged 7 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
with:
tag: ${{ steps.image.outputs.taggedVersion }}
imageName: ${{ env.IMAGE_NAME }}
dockerFiles: 'https://raw.githubusercontent.com/VirtoCommerce/vc-docker/feat/net6/linux/storefront/Dockerfile'
dockerFiles: 'https://raw.githubusercontent.com/VirtoCommerce/vc-docker/feat/net8/linux/storefront/Dockerfile'

- name: Publish Github Release
if: ${{ github.ref == 'refs/heads/master' }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v3.200.3
# v3.800.4
name: PR build

on:
Expand All @@ -15,15 +15,15 @@ on:

jobs:
test:
uses: VirtoCommerce/.github/.github/workflows/test-and-sonar.yml@v3.800.2
uses: VirtoCommerce/.github/.github/workflows/test-and-sonar.yml@v3.800.4
secrets:
sonarToken: ${{ secrets.SONAR_TOKEN }}

build:
uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.800.2
uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.800.4
with:
uploadDocker: 'true'
imageName: 'storefront'
dockerFiles: 'https://raw.githubusercontent.com/VirtoCommerce/vc-docker/feat/net6/linux/storefront/Dockerfile'
dockerFiles: 'https://raw.githubusercontent.com/VirtoCommerce/vc-docker/feat/net8/linux/storefront/Dockerfile'
secrets:
envPAT: ${{ secrets.REPO_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/pr-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v3.200.7
# v3.800.4
name: PR deploy

on:
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
publish:
needs:
get-deployment-data
uses: VirtoCommerce/.github/.github/workflows/publish-docker.yml@v3.800.2
uses: VirtoCommerce/.github/.github/workflows/publish-docker.yml@v3.800.4
with:
fullKey: ${{ needs.get-deployment-data.outputs.dockerFullKey }}
shortKey: '${{ needs.get-deployment-data.outputs.dockerShortKey }}-'
Expand All @@ -60,7 +60,7 @@ jobs:
deploy:
needs:
[publish, get-deployment-data]
uses: VirtoCommerce/.github/.github/workflows/deploy.yml@v3.800.2
uses: VirtoCommerce/.github/.github/workflows/deploy.yml@v3.800.4
with:
argoServer: 'argo.govirto.com'
artifactUrl: ${{ needs.publish.outputs.imagePath }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-branch.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v3.200.5
# v3.800.5
name: Release - branch

on:
Expand All @@ -25,7 +25,7 @@ jobs:
uploadDocker: 'true'
eventName: ${{ github.event_name }}
imageName: 'storefront'
dockerFiles: 'https://raw.githubusercontent.com/VirtoCommerce/vc-docker/feat/net6/linux/storefront/Dockerfile'
dockerFiles: 'https://raw.githubusercontent.com/VirtoCommerce/vc-docker/feat/net8/linux/storefront/Dockerfile'
forceVersionSuffix: 'false'
secrets:
envPAT: ${{ secrets.REPO_TOKEN }}
Expand Down
16 changes: 8 additions & 8 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?><Project>
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!-- These properties will be shared for all projects -->

<PropertyGroup>
<Product>VirtoCommerce</Product>
<Copyright>Copyright © VirtoCommerce 2011-2022</Copyright>
<Copyright>Copyright © 2011-2024 Virto Commerce. All rights reserved</Copyright>
<Authors>VirtoCommerce</Authors>
</PropertyGroup>
<PropertyGroup>
<VersionPrefix>6.43.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<PropertyGroup>
<VersionPrefix>8.0.0</VersionPrefix>
<VersionSuffix>
</VersionSuffix>
<VersionSuffix Condition=" '$(VersionSuffix)' != '' AND '$(BuildNumber)' != '' ">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
</PropertyGroup>

</Project>
</Project>
160 changes: 29 additions & 131 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,155 +1,46 @@
# Virto Commerce Storefront Kit

[![Share on Facebook](https://img.shields.io/badge/facebook--blue.svg?style=social&label=Share&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNjYuODkzcHgiIGhlaWdodD0iMjY2Ljg5NXB4IiB2aWV3Qm94PSIwIDAgMjY2Ljg5MyAyNjYuODk1IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNjYuODkzIDI2Ni44OTUiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJCbHVlXzFfIiBmaWxsPSIjM0M1QTk5IiBkPSJNMjQ4LjA4MiwyNjIuMzA3YzcuODU0LDAsMTQuMjIzLTYuMzY5LDE0LjIyMy0xNC4yMjVWMTguODEyYzAtNy44NTctNi4zNjgtMTQuMjI0LTE0LjIyMy0xNC4yMjRIMTguODEyYy03Ljg1NywwLTE0LjIyNCw2LjM2Ny0xNC4yMjQsMTQuMjI0djIyOS4yN2MwLDcuODU1LDYuMzY2LDE0LjIyNSwxNC4yMjQsMTQuMjI1SDI0OC4wODJ6Ii8%2BPHBhdGggaWQ9ImYiIGZpbGw9IiNGRkZGRkYiIGQ9Ik0xODIuNDA5LDI2Mi4zMDd2LTk5LjgwM2gzMy40OTlsNS4wMTYtMzguODk1aC0zOC41MTVWOTguNzc3YzAtMTEuMjYxLDMuMTI3LTE4LjkzNSwxOS4yNzUtMTguOTM1bDIwLjU5Ni0wLjAwOVY0NS4wNDVjLTMuNTYyLTAuNDc0LTE1Ljc4OC0xLjUzMy0zMC4wMTItMS41MzNjLTI5LjY5NSwwLTUwLjAyNSwxOC4xMjYtNTAuMDI1LDUxLjQxM3YyOC42ODRoLTMzLjU4NXYzOC44OTVoMzMuNTg1djk5LjgwM0gxODIuNDA5eiIvPjwvc3ZnPg%3D%3D)](https://www.facebook.com/sharer.php?u=https://virtocommerce.com)&nbsp;[![Tweet](https://img.shields.io/twitter/url/https/virtocommerce.com.svg?style=social)](https://twitter.com/intent/tweet?text=%23VirtoCommerce%20puts%20the%20best%20of%20MS%20Azure%20Cloud%2C%20open%20source%20.Net%20code%20and%20agile%20development%20in%20a%20single%20enterprise%20%23ecommerce%20platform.) [![Latest release](https://img.shields.io/github/release/VirtoCommerce/vc-storefront.svg)](https://github.com/VirtoCommerce/vc-storefront/releases/latest) [![Total downloads](https://img.shields.io/github/downloads/VirtoCommerce/vc-storefront/total.svg?colorB=007ec6)](https://github.com/VirtoCommerce/vc-storefront/releases) [![License](https://img.shields.io/badge/license-VC%20OSL-blue.svg)](https://virtocommerce.com/open-source-license)

[![CI status](https://github.com/VirtoCommerce/vc-storefront/workflows/Storefront%20CI/badge.svg?branch=dev)](https://github.com/VirtoCommerce/vc-storefront/actions?query=workflow%3A"Storefront+CI") [![Quality gate](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-storefront&metric=alert_status&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-storefront) [![Reliability rating](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-storefront&metric=reliability_rating&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-storefront) [![Security rating](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-storefront&metric=security_rating&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-storefront) [![Sqale rating](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-storefront&metric=sqale_rating&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-storefront) [![Lines of code](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-storefront&branch=dev&metric=ncloc)](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-storefront&branch=dev&metric=ncloc)&emsp;

[![Documentation](https://img.shields.io/badge/docs-read-brightgreen.svg)](https://virtocommerce.com/docs/latest/)&nbsp;[![Discourse topics](https://img.shields.io/discourse/topics?label=community&logo=community&server=http%3A%2F%2Fwww.virtocommerce.org)](https://www.virtocommerce.org) [![Contributors](https://img.shields.io/github/contributors/VirtoCommerce/vc-storefront.svg)](https://github.com/VirtoCommerce/vc-storefront/graphs/contributors)

[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FVirtoCommerce%2Fvc-storefront%2Fmaster%2Fazuredeploy.json)

Official online shopping website based on [Virto Commerce Platform written on ASP.NET Core](https://virtocommerce.com/microsoft-ecommerce-platform). The website is a client application for VC Platform and uses only public APIs while communicating.
The Virto Commerce Storefront Kit is the official online shopping website based on the Virto Commerce Platform, written on ASP.NET 8. The website serves as a client application for the VC Platform and communicates solely through public APIs.

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.
The Storefront Kit enables the creation of multiple distinct stores (websites) on top of the Virto Commerce Platform. Each store may have its own theme with specific layouts, yet still be based on the same catalog and customer data. This allows for versatile store configurations, such as:

It is possible, for example, to create sites with a different design for different product categories still having all products in the same backend.
* Different designs for various product categories.
* Regional-specific sites offering tailored product sets.
* Integration with multiple touchpoints for a true omnichannel experience.

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
- Launch and host e-commerce themes on top of the Virto Commerce Platform.
- XAPI Gateway.
- Caching mechanism.
- Multi-store support.
- Multi-theme support.
- Server-side rendering.
And more.

- 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

- [Public Demo](https://st-storefront.demo.govirto.com/)
- Virto Commerce Documentation: <https://www.virtocommerce.com/docs/latest/>
- Home: <https://virtocommerce.com>
- Community: <https://www.virtocommerce.org>
- [Download Latest Release](https://github.com/VirtoCommerce/vc-storefront/releases/latest)

## Sample themes

### [B2B theme](https://github.com/VirtoCommerce/vc-theme-b2b-vue)

View [B2B theme on GitHub](https://github.com/VirtoCommerce/vc-theme-b2b-vue).

![image](https://user-images.githubusercontent.com/7639413/170992875-fbfa2093-ebbf-4404-8140-c952d9f0f0f4.png)
## Architecture
For detailed information about the Virto Storefront Architecture, please refer to our [developer guide](https://docs.virtocommerce.org/storefront/developer-guide/)

## Technologies and frameworks used
- ASP.NET 8
- ASP.NET Identity Core

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

## Prerequisites
- Install `vc-platform` 3.x the latest version. [Deploy on Windows](https://github.com/VirtoCommerce/vc-platform/blob/master/docs/getting-started/deploy-from-precompiled-binaries-windows.md) or [Deploy on Linux](https://github.com/VirtoCommerce/vc-platform/blob/master/docs/getting-started/deploy-from-precompiled-binaries-linux.md)
- Install `vc-module-experience-api` module. [Getting started](https://github.com/VirtoCommerce/vc-module-experience-api/blob/dev/docs/getting-started.md)
- Install [vc-module-profile-experience-api](https://github.com/VirtoCommerce/vc-module-profile-experience-api) module.
- Install [Node](https://nodejs.org/en/download/) v.16.X
- Install [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#windows-stable) package manager
```
npm install --global yarn
```

## Continuous Integration Supported by Browserstack
## Setup
For detailed setup information, please refer to [Quick Start](https://docs.virtocommerce.org/storefront/developer-guide/getting-started/quickstart-on-windows/) to deploy and run.

Cross-browser compatibility of the storefront is generously provided by [Browserstack](https://www.browserstack.com/).

[![Browserstack](https://images.techhive.com/images/article/2014/12/browserstack-logo-100538202-medium.idge.png)](http://browserstack.com/)
## Themes

## Deploy Storefront
### B2B Theme

> 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](https://github.com/VirtoCommerce/vc-storefront/releases/latest) and unpack in to a local folder
- Or Clone [https://github.com/VirtoCommerce/vc-storefront](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:

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

### Setup `B2B Mercury theme`

```bash
# 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
```
View [B2B theme on GitHub](https://github.com/VirtoCommerce/vc-theme-b2b-vue).

### Run `vc-storefront` application
![image](https://user-images.githubusercontent.com/7639413/170992875-fbfa2093-ebbf-4404-8140-c952d9f0f0f4.png)

```bash
# 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

Expand Down Expand Up @@ -187,6 +78,13 @@ To forward the scheme from the proxy in non-IIS scenarios, set `ASPNETCORE_FORWA

For more details on how it works, see the Microsoft [documentation](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-5.0#forward-the-scheme-for-linux-and-non-iis-reverse-proxies).

## References
- Virto Commerce Documentation: https://docs.virtocommerce.org
- Home: https://virtocommerce.com
- Community: https://www.virtocommerce.org
- [Download Latest Release](https://github.com/VirtoCommerce/vc-storefront/releases/latest)


## License

Copyright (c) Virto Solutions LTD. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace DotLiquid.ViewEngine.Exceptions
[Serializable]
public class SaasCompileException : Exception
{
protected SaasCompileException(SerializationInfo info,
StreamingContext context) : base(info, context)
[Obsolete(DiagnosticId = "SYSLIB0051")]
protected SaasCompileException(SerializationInfo info, StreamingContext context) : base(info, context)
{
SassLine = info.GetString("SassLine");
}
Expand Down Expand Up @@ -62,6 +62,7 @@ private static string ReadLine(string text, int lineNumber)
return (currentLineNumber == lineNumber) ? line : string.Empty;
}

[Obsolete(DiagnosticId = "SYSLIB0051")]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Description>The storefront implementation of the Virto Commerce platform.</Description>
<PackageLicenseUrl>https://virtocommerce.com/open-source-license</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/VirtoCommerce/vc-storefront-core</PackageProjectUrl>
Expand All @@ -10,30 +9,23 @@
<IsPackable>False</IsPackable>
<OutputType>Library</OutputType>
</PropertyGroup>


<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="GraphQL.Client" Version="4.0.2" />
<PackageReference Include="LibSassHost" Version="1.3.3" />
<PackageReference Include="LibSassHost.Native.linux-x64" Version="1.3.3" />
<PackageReference Include="LibSassHost.Native.osx-x64" Version="1.3.3" />
<PackageReference Include="LibSassHost.Native.win-x64" Version="1.3.3" />
<PackageReference Include="LibSassHost.Native.win-x86" Version="1.3.3" />
<PackageReference Include="GraphQL.Client" Version="6.0.3" />
<PackageReference Include="LibSassHost" Version="1.4.0" />
<PackageReference Include="LibSassHost.Native.linux-x64" Version="1.4.0" />
<PackageReference Include="LibSassHost.Native.osx-x64" Version="1.4.0" />
<PackageReference Include="LibSassHost.Native.win-x64" Version="1.4.0" />
<PackageReference Include="LibSassHost.Native.win-x86" Version="1.4.0" />
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
<PackageReference Include="PagedList.Core" Version="1.17.4" />
<PackageReference Include="Scriban" Version="5.5.1" />
<PackageReference Include="Scriban" Version="5.9.0" />
</ItemGroup>


<ItemGroup>
<ProjectReference Include="..\VirtoCommerce.Storefront.Model\VirtoCommerce.Storefront.Model.csproj" />
</ItemGroup>


<ItemGroup>
<Folder Include="Properties\" />
<Folder Include="Util\" />
</ItemGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ public class StorefrontException : Exception
{
public string View { get; set; }

protected StorefrontException(SerializationInfo info,
StreamingContext context) : base(info, context)
[Obsolete(DiagnosticId = "SYSLIB0051")]
protected StorefrontException(SerializationInfo info, StreamingContext context) : base(info, context)
{
View = info.GetString("View");
}
Expand All @@ -34,6 +34,7 @@ public StorefrontException(string message, Exception innerException, string view
View = view;
}

[Obsolete(DiagnosticId = "SYSLIB0051")]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ namespace VirtoCommerce.Storefront.Model.Features.Exceptions
[Serializable]
public class FeaturesException : Exception
{
protected FeaturesException(SerializationInfo info,
StreamingContext context) : base(info, context)
[Obsolete(DiagnosticId = "SYSLIB0051")]
protected FeaturesException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}

Expand Down
Loading
Loading