B2B theme for VirtoCommerce Storefront. The theme demonstrating various aspects of B2B functionality
The theme is no longer being maintained by Virto Commerce. Developers are encouraged to check out Vue B2B Theme .
You can continue to use the theme with Virto Commerce Platform 3.x and Storefront 5.x; however, this repo will not be kept up-to-date.
B2B theme for VirtoCommerce Storefront used by B2B-Store sample store. It is a showcase for b2b features support of VirtoCommerce.
Main article: theme development on virtocommerce.com/docs
(where C:\vc-theme-b2b is path to folder where you want to clone repo).
git clone https://github.com/VirtoCommerce/vc-theme-b2b.git "C:\vc-theme-b2b"
(where C:\vc-platform\VirtoCommerce.Platform.Web\App_Data\cms-content is path to CMS content storage configured at platform & storefront deployment steps, ‘B2B-Store’ is your store name and ‘C:\vc-theme-b2b’ is path to your theme repo).
mklink /d "C:\vc-platform\VirtoCommerce.Platform.Web\App_Data\cms-content\Themes\B2B-Store\default" "C:\vc-theme-b2b"
to install Node.js dependencies.
npm install
You need to have local installation of storefront. Follow this article step-by-step to install storefront from binaries or source code.
npm install --global --production windows-build-tools
Liquid is the templating engine that powers Virto Commerce templates. Go to Liquid documentation.
Main article: bundling & minification on virtocommerce.com/docs
Bundling is a technique you can use to improve request load time. Bundling improves load time by reducing the number of requests to the server (assets such as CSS and JavaScript will be combined to single file per file format).
{% raw %}{{ 'bundle/scripts.js' | static_asset_url | append_version | script_tag }}{% endraw %}
or
<script ... >
<link rel="stylesheet" ... >
When you run the default task to bundle & minify theme, the following happens:
Attention: while theme including bundlesconfig.json file, you must not use Bundler & Minifier Visual Studio extension with theme. We’re using gulp to bundle & minify files on theme, because it support a lot of possible customizations and has a plugins for css minification and correct source maps generation. Wrong source map generation and lack of css minification is a primary reason why we do not use Bundler & Minifier extension in Visual Studio.
Run
npx gulp watch
on command line if you want to bundle & minify files on save or run
npx gulp default
manually when you need to bundle & minify theme files.
The following gulp tasks available to you:
Main article: how to localize theme on virtocommerce.com/docs
Storefront theme localization is very similar to VirtoCommerce Platform localization. Check it for details on working with translation files.
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.