This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shopware admin API requests can be enriched with a query. | |
For example, to retrieve only snippets for a particular snippet set, use this query: | |
{{HOST}}/api/snippet?query[0][query][type]=equals&query[0][query][field]=setId&query[0][query][value]=685f610ee07544feb28b6a5abf38cf7c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# What it does: | |
# - Creates a local Shopware installation using the Symfony Flex template for local development of client projects | |
# - Prerequisites: ddev installed on your machine, see https://ddev.com/get-started/ | |
# | |
# How to use: | |
# - create a project folder | |
# - copy this file into the project folder | |
# - chmod +x install.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Being stuck by PhpStorm indexing on all CPUs? On Ubuntu, you can limit PhpStorm to using just say 4 of your CPUs by amending | |
# the Exec directive with 'taskset -a -c 0,1,2,3' in its desktop file (usually located in /usr/share/applications) | |
[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Name=PhpStorm | |
Icon=/opt/PhpStorm-212.5080.71/bin/phpstorm.svg | |
Exec="taskset -a -c 0,1,2,3 /opt/PhpStorm-212.5080.71/bin/phpstorm.sh" %f | |
Comment=Lightning-smart PHP IDE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# usage: ./dbdump5.sh <shopware project root dir> <target file for dump> | |
# | |
# note this script requires PHP and gzip | |
# | |
root=${1:-/var/www/shopware/shopware} | |
target=${2:-test.sql.gz} | |
config=${3:-php} | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is a files/folder exclude list to be used with tar when archiving a Shopware 6 project folder | |
# use like 'tar -cvzf --exclude-from=tar-exclude.txt my_archive.tar.gz shopware' | |
# you may have to replace shopware with the name of your project folder, and remove all comment lines | |
shopware/.env | |
shopware/config/jwt/*.pem | |
shopware/var/cache/dev_* | |
shopware/var/cache/prod_* | |
shopware/var/log/*.log | |
# optional: | |
# shopware/files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# usage: ./dbdump.sh <shopware project root dir> <target file for dump> | |
# | |
# note 1) this script requires PHP and gzip | |
# note 2) the --skip-triggers option breaks the blue-green-deployment however is usefull for re-importing on another server | |
# | |
# Trouble with generated columns? | |
# - See this: https://dba.stackexchange.com/questions/240882/how-to-take-mysqldump-with-generated-column | |
# - Though I recommend to find a compatible mysqldump client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Define in config.xml: | |
<component name="sw-entity-multi-id-select"> | |
<name>b2bCustomerGroupIds</name> | |
<entity>customer_group</entity> | |
<label>Choose multiple customer groups as B2B groups</label> | |
<label lang="de-DE">Wählen Sie die für B2B vorgesehenen Kundengruppen.</label> | |
</component> | |
Use in twig: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run as sudo | |
apt update | |
apt install php-fpm | |
a2enmod proxy_fcgi | |
a2enconf php7.2-fpm | |
a2dismod php7.2 | |
a2dismod mpm_prefork | |
a2enmod mpm_event | |
a2enmod http2 | |
service apache2 restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'sitemap' => [ | |
'excluded_urls' => [ | |
[ | |
// Possible resources: | |
// - product (\Shopware\Models\Article\Article::class) | |
// - campaign (\Shopware\Models\Emotion\Emotion::class) | |
// - manufacturer (\Shopware\Models\Article\Supplier::class) | |
// - blog (\Shopware\Models\Blog\Blog::class) | |
// - category (\Shopware\Models\Category\Category::class) | |
// - static (\Shopware\Models\Site\Site::class) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSH to the runner and execute 'docker system prune --all --volumes --force' - this will wipe any unused docker stuff. |
NewerOlder