https://github.com/smartstore/dev-docs-code-examples
Contains all code examples used in the technical documentation
https://github.com/smartstore/dev-docs-code-examples
Last synced: 8 months ago
JSON representation
Contains all code examples used in the technical documentation
- Host: GitHub
- URL: https://github.com/smartstore/dev-docs-code-examples
- Owner: smartstore
- Created: 2023-02-21T13:16:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-19T10:21:08.000Z (almost 3 years ago)
- Last Synced: 2025-10-13T22:37:47.972Z (8 months ago)
- Language: C#
- Size: 154 KB
- Stars: 5
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Smartstore Code Examples
Contains all the code examples used in the [technical documentation](https://smartstore.gitbook.io/developer-guide/compose/modules/examples).
## Introduction
This repository contains all the tutorial examples used in the Smartstore developer documentation.
They can be included using the **.sln** solution file.
## Installation
1. Copy this repository into the same directory as your Smartstore repository.
2. Run `create-symlinks.bat`.
1. Run `create-theme-symlinks.bat`, if you want to install a theme.
3. Open Visual Studio, click **Open a project or solution** and select `Smartstore.CodeExamples-sym.sln` solution file.
## Directory structure
Place this repository in the same directory as your Smartstore repository, otherwise creating the symlinks will fail.
Example:
- Smartstore repository: _/home/www/Smartstore/_
- Place in _/home/www/_
| Folder | Description |
| ------ | ---------------------------------------- |
| [root] | **Solution file** and **symlinks** |
| _/src_ | All **module** examples can be found here.|
### Symlinks
Since the modules and the solution must exist in both the sample repository and the Smartstore repository, it is necessary to connect them using symlinks.
- The modules are each linked to _/Smartstore/src/Smartstore.Modules/_.
- The solution file is linked to _/Smartstore/Smartstore.CodeExamples-sym.sln_.
Running `sysmlinks.bat` will automatically create all the symlinks. If you want to add a module to this repository just add it to the list of modules in the symlinks.bat and run it again. Existing symlinks will not be touched, only new ones are added. If the location of a module changes you must delete the existing symlink in the Smartstore repository before running the `.bat` file again.
This project structure is also well suited for developing your own modules.
## Tutorials
### "Hello World"
Start your journey here and build your first Smartstore module.
→ Source code for [Hello World](./src/MyOrg.HelloWorld)
→ Developer documentation for [Building a simple "Hello World" module](https://smartstore.gitbook.io/developer-guide/compose/modules/examples/building-a-simple-hello-world-module)
### Tabs
Add a tab to the product editing page in the backend.
→ Source code for [Tabs Tutorial](./src/MyOrg.TabsTutorial)
→ Developer documentation for [Adding tabs](https://smartstore.gitbook.io/developer-guide/compose/modules/examples/adding-tabs)
### Widgets
Create a widget, that displays custom content in the frontend.
→ Source code for [Widget Tutorial](./src/MyOrg.WidgetTutorial)
→ Developer documentation for [Creating a Widget provider](https://smartstore.gitbook.io/developer-guide/compose/modules/examples/creating-a-widget-provider)
### Menus
Access the menu bar in the backend and add a menu item and a submenu.
→ Source code for [Menu Tutorial](./src/MyOrg.MenuTutorial)
→ Developer documentation for [Adding menu items](https://smartstore.gitbook.io/developer-guide/compose/modules/examples/adding-menu-items)
### Blocks
Create your own PageBuilder-Block to display in stories.
→ Source code for [Block Tutorial](./src/MyOrg.BlockTutorial)
→ Developer documentation for [Creating a Block](https://smartstore.gitbook.io/developer-guide/compose/modules/examples/creating-a-block)
#### Blocks (Advanced)
Tweak the Story view modes, to provide a better user experience and render a widget.
→ Source code for [Block Tutorial Advanced](./src/MyOrg.BlockTutorialAdvanced)
→ Developer documentation for [Creating a Block](https://smartstore.gitbook.io/developer-guide/compose/modules/examples/creating-a-block#advanced-topics)
### Export
Provide a configurable export for products, store information, etc.
→ Source code for [Export Tutorial](./src/MyOrg.ExportTutorial)
→ Developer documentation for [Creating an Export provider](https://smartstore.gitbook.io/developer-guide/compose/modules/examples/creating-a-export-provider)
### Entities
Create a small messaging system, using your own database table.
→ Source code for [Domain Tutorial](./src/MyOrg.DomainTutorial)
→ Developer documentation for [Creating a Domain entity](https://smartstore.gitbook.io/developer-guide/compose/modules/examples/creating-a-domain-entity)
## Themes
### Basic module
A blueprint of a theme module.
→ Source code for [Basic theme](./themes/Smartstore.Themes.MyTheme)
→ Developer documentation for [Theme modules](https://smartstore.gitbook.io/developer-guide/compose/theming/theme-modules)