Skip to content

Contains all code examples used in the technical documentation

Notifications You must be signed in to change notification settings

smartstore/dev-docs-code-examples

Repository files navigation

Smartstore Code Examples

Contains all the code examples used in the technical documentation.

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
→ Developer documentation for Building a simple "Hello World" module

Tabs

Add a tab to the product editing page in the backend.
→ Source code for Tabs Tutorial
→ Developer documentation for Adding tabs

Widgets

Create a widget, that displays custom content in the frontend.
→ Source code for Widget Tutorial
→ Developer documentation for 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
→ Developer documentation for Adding menu items

Blocks

Create your own PageBuilder-Block to display in stories.
→ Source code for Block Tutorial
→ Developer documentation for 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
→ Developer documentation for Creating a Block

Export

Provide a configurable export for products, store information, etc.
→ Source code for Export Tutorial
→ Developer documentation for Creating an Export provider

Entities

Create a small messaging system, using your own database table.
→ Source code for Domain Tutorial
→ Developer documentation for Creating a Domain entity

Themes

Basic module

A blueprint of a theme module.
→ Source code for Basic theme
→ Developer documentation for Theme modules

About

Contains all code examples used in the technical documentation

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages