You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and [activate the module](https://docs.oxid-esales.com/developer/en/latest/development/modules_components_themes/module/installation_setup/setup.html#setup-activation).
128
142
129
-
## Development installation
143
+
## Use as a base for own module
130
144
131
-
To be able running the tests and other preconfigured quality tools, please install the module as a [root package](https://getcomposer.org/doc/04-schema.md#root-package).
145
+
In case you'd like to use this module as a template for your own module, this section is for you.
132
146
133
-
The next section shows how to install the module as a root package by using the OXID eShop SDK.
147
+
**Important** Instructions here are for the case you intend to develop a module for OXID eShop 7.2.x. For other
148
+
versions, refer to the version specific branch.
134
149
135
-
In case of different environment usage, please adjust by your own needs.
150
+
Before starting to do something, please, read the whole section once, then decide on required questions, decide
151
+
what you want to achieve, and follow the procedure.
136
152
137
-
##Development installation on OXID eShop SDK
153
+
### Terms
138
154
139
-
The installation instructions below are shown for the current [SDK](https://github.com/OXID-eSales/docker-eshop-sdk)
140
-
for shop 7.3. Make sure your system meets the requirements of the SDK.
155
+
First, lets decide on terms:
141
156
142
-
0. Ensure all docker containers are down to avoid port conflicts
157
+
* Module is installable to `vendor/<yourPackageName>` directory. The package name is **lowercased** and
* Please note that combination of `<yourVendorName>` and `<yourModuleRootDirectory>` should be unique. Based on this
161
+
information your module id will be composed and will look like: `<yourVendorPrefix>_<yourModuleRootDirectory>`. In
162
+
our case it is `oe_moduletemplate`.
163
+
* It is recommended to use only alphanumeric characters, in case you need a separator you can use dash ("-") or underscore("_").
164
+
* Decide on your module's namespace - `<YourVendorName>\<YourModuleName>`, example: `OxidEsales\ModuleTemplate`.
165
+
* Decide on your module's ID - `<YourVendorPrefix>_<yourModuleName alphanumeric part>`, example: `oe_moduletemplate`.
166
+
* It is recommended to use only alphanumeric characters, in case you need a separator you can use underscore. More
167
+
information about module id can be found [here](https://docs.oxid-esales.com/developer/en/latest/development/modules_components_themes/module/skeleton/metadataphp/amodule/id.html).
The following procedure describes how to create a base for your further module, and shows the basic installation for the development process:
187
+
188
+
#### 1. Use the Template
189
+
190
+
Click on the "Use this template" button on the template [main page](https://github.com/OXID-eSales/module-template) to
191
+
create your module repository from the given template.
192
+
193
+
Please make sure to NOT choose the 'take all branches' option, as this will clone the repository with everything
194
+
we have in our repository. Having all branches also will trigger the github actions for all branches and you dont want this usually.
195
+
196
+
As an outcome of this step, you should have a repository with one "Initial commit" of our current latest repository state.
197
+
198
+
#### 2. Personalize and cleanup the module
199
+
200
+
To personalize the module, use the "bin/personalize.sh" script. This script will prompt you for required information and do the work.
201
+
202
+
To cleanup the module from all current examples and make it a clean skeleton, use the "bin/cleanexamples.sh" script. This script will remove all example solutions code.
203
+
204
+
Its not mandatory to cleanup the module from examples, but you have this option if you want to start from the clean skeleton.
205
+
206
+
For this step, clone your module repository anywhere to your local directory and run the desired scripts.
153
207
154
-
3. Run the recipe to setup the development environment, you can decide which shop edition to install. Omitting the flag installs EE.
155
-
```shell
156
-
./source/recipes/setup-development.sh -s CE
208
+
```bash
209
+
git clone <yourGitRepositoryUrl> myModule
210
+
cd myModule
211
+
212
+
// Run the personalize script
213
+
./bin/personalize.sh
214
+
215
+
// Run the clean examples script if you want to start from the clean skeleton
216
+
./bin/cleanexamples.sh
217
+
218
+
git commit -am "Personalize and cleanup the module"
219
+
git push origin
157
220
```
158
221
159
-
You should be able to access the shop with http://localhost.local and the admin panel with http://localhost.local/admin
160
-
(credentials: noreply@oxid-esales.com / admin)
222
+
Please note that the module comes with a database table, translations, settings and some templates which still have the original
223
+
names after personalization, if cleanup was not done. Just keep an eye on all that's prefixed 'OEEM', 'oeem', 'OEEXAMPLESMODULE' etc.
224
+
225
+
Also, you will need to adjust the README, CHANGELOG, LICENSE, metadata and the GitHub workflow file, with your
226
+
credentials and names. For running SonarCloud as part of the steps in GitHub workflow you
227
+
will need to configure SonarCloud and to create a secret environment variable for your repository called SONAR_TOKEN.
228
+
The token itself is provided by SonarCloud.
229
+
230
+
#### 3. Install the module for Development
231
+
232
+
For installing the module for development our recommended way, check the "Development installation section",
233
+
or do it any other way you prefer, but make sure to reconfigure our preconfigured quality tools to fit your installation.
234
+
235
+
### Development installation
236
+
237
+
We recommend developing the module as independent as possible. This means that the module for development should
238
+
be installed as a root package, with its own strict dependencies if such are needed.
239
+
240
+
Consider using our docker based SDK and our ["Recipes"](https://github.com/OXID-eSales/docker-eshop-sdk-recipes) to
241
+
install this module development variant. Make sure you have all your current docker containers stopped before starting on this.
242
+
243
+
```bash
244
+
cd ~/Projects
245
+
echo ModuleTemplate && git clone https://github.com/OXID-eSales/docker-eshop-sdk.git $_ && cd $_
0 commit comments