Create the project (onlineshopDir should have enough space to store downloads, resources and other data that might be needed for the shop).
composer create-project -s dev screwerk/onlineshop <onlineshopDir>
Update apache.conf
Alias / "<onlineshopDir>/web"
<Directory "<onlineshopDir>/web">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
require all granted
</Directory>
Copy examples and Customize configuration files
cp web/.htaccess.example web/.htaccess
cp conf/config.json.example conf/config.json
Add paymentUser shop-ID in the config file and in the Payment-API service
ssh web01.hsrobotics.com
nano /home/screwerkde/httpd/payment-api/config/services.json
Add destination path for shop-ID to push-scripts
bin/push_order.php.example
bin/push_application.php.example
The destination path should be supervised by an incron.d entry which calls a script to collect the data and write it to the corresponding database. (see section incron.d)
Add initial id for orders
cp var/order/id.example var/order/id
Change file permissions for id and lock - file
cd var
chmod go+w applications
chmod go+w order
chmod go+w order/id
chmod go+w order/lock
chmod go+w order/tmp
Change file permissions for twig-template caching and translation caching
cd var
chmod go+w twig-cache
chmod go+w trans-cache
.xlf Translations for all possible locales are stored in
var/locales/<locale>/<file>.<locale>.xlf
Example files are included.
Make sure that the destination path for the specific shopid is added in the push-script (if the translations should be pushed by the graph.graph-it.com ameise-module)
ssh graph.graph-it.com
cd /var/lib/graph/module/ameise/bin
nano push_translations.php
See section incron.d for translation cache clearance if a translation domain file in var/locales/
Data to run the shopgrid and website is stored in a tree structure built like
var/shopdaten-example
The directory is subdevided into different levels to control the update frequency
var/shopdaten-example/10-statisch
var/shopdaten-example/40-dynamisch
The subtree-structure is identical.
artikelkategorie/<kategorie>/artikelkategorie.json
artikelkategorie/<kategorie>/artikelkategorie.sqlite3
artikelkategorie/<kategorie>/<kategorietyp>/kategorietyp.json
artikelkategorie/<kategorie>/<kategorietyp>/<artikelname>/artikel.json
Data is merged for all levels in alphanumerical ascending order. Example files are included. Grid content for the shop is stored in an SQLite3 database which contains a
Make sure that the destination path for the specific shopid is added in the push-script (if the data should be pushed by web01.hsrobotics.com graph onlineshop-module) e.g. screwerk.de graph
ssh web01.hsrobotics.com
cd /home/screwerkde/graph/module/onlineshop/bin
nano push_shopdaten10.php
nano push_shopdaten40.php
Download-data is stored in a tree structure built like
var/downloads-example
The directory contains language independent 3D data files and directories for each possible locale which contain .pdf download files. Example files are included.
Add configuration of your onlineshop in a json-file structured like the example
var/shopdaten-example/10-statisch/onlineshop.json.example
Configure the files
cp views/google_tag_manager.html.example views/shopid/<shopid>-google_tag_manager.html
cp views/google_tag_manager_warenkorb.html.twig.example views/shopid/<shopid>-google_tag_manager_warenkorb.html.twig
or disable google tag management in the appropriate templates
views/layout.html.twig
views/shop_cart_payment.html.twig
Set your intern IPs which should be ignored by Google Analytics
cp views/set_internal_js_var.html.twig.example views/shopid/<shopid>-set_internal_js_var.html.twig
Configure the main menu by adding custom menu and submenu points as exemplified in views/menuepunkt.html.twig to the menu file
cp views/menuepunkt.html.twig views/shopid/<shopid>-hauptmenue.html.twig
Configure the footer menu by adding menu points to the three columns of the footer and the copyright-file
cp views/footer_col_left.html.twig views/shopid/<shopid>-footer_col_left.html.twig
cp views/footer_col_mid.html.twig views/shopid/<shopid>-footer_col_mid.html.twig
cp views/footer_col_right.html.twig views/shopid/<shopid>-footer_col_right.html.twig
cp views/footer-copyright.html.twig views/shopid/<shopid>-footer_copyright.html.twig
Configure the Index page content by customizing meta information, slider content and panels
cp views/index_meta.html.twig views/shopid/<shopid>-index_meta.html.twig
cp views/slider.html.twig views/shopid/<shopid>-slider.html.twig
cp views/panel_list.html.twig views/shopid/<shopid>-panel_list.html.twig
Add a maximum of 3 slider background images in a format like bg-slider-default.jpg or copy default
cd web-src/Widgets/Slider
cp bg-slider-default.jpg bg-slider-1.jpg
cp bg-slider-default.jpg bg-slider-2.jpg
cp bg-slider-default.jpg bg-slider-3.jpg
cp bg-slider-default.jpg bg-slider-unternehmen.jpg
Make sure to adjust the slider-template.
Add custom general terms and conditions by inserting the content as exemplified in grid_skel_content.html.twig
cp views/grid_skel_content.html.twig views/shopid/<shopid>-agb.html.twig
Add custom delivery information by inserting the content as exemplified in grid_skel_content.html.twig
cp views/grid_skel_content.html.twig views/shopid/<shopid>-delivery.html.twig
Add custom delivery information by inserting the content as exemplified in grid_skel_content.html.twig
cp views/grid_skel_content.html.twig views/shopid/<shopid>-impressum.html.twig
Add custom data protection information by inserting the content as exemplified in grid_skel_content.html.twig
cp views/grid_skel_content.html.twig views/shopid/<shopid>-datenschutz.html.twig
Configure the sitemap by adding custom chapters for the site content
cp views/sitemap_content.html.twig views/shopid/<shopid>-sitemap_content.html.twig
Add the individual contact address, e.g. by inserting a trans-tag to the template
cp views/div_adress.html.twig views/shopid/<shopid>-address.html.twig
{% trans from '<shopid>' %}contact.address{% endtrans %}
cd web-src
npm install
npm run build
Create a file for incron.d
/etc/incron.d/website_<shopid>
and add an appropriate entry for an automatic push of applications and orders of the website
<ShopSrcDir>/var/order IN_CLOSE_WRITE <ShopSourceDirectory>/bin/push_order.php <shopid> $@ $#
<ShopSrcDir>/var/applications IN_CLOSE_WRITE <ShopSourceDirectory>/bin/push_application.php <shopid> $@ $#
Add an appropriate entry for each language to monitor translation directory
<ShopSrcDir>/var/locales/<locale> IN_MODIFY,IN_MOVED_TO <ShopSrcDir>/bin/TranslationCacheClear.php $@ $#
In addition, the destination path should be monitored by incron.de to process incoming data in the sense of your application. Create a file for incron.d
/etc/incron.d/website_<shopid>
and add an appropriate entry for an automatic processing of the data with
<DestDir> IN_MOVED_TO <DestProcessingScript> $@ $#