Version 2.1.0 Shopware from 6.7 As of May 6, 2025
With this plugin you block unwanted registrations in your shop. You define which email addresses, names and company names may not register and which postal codes are valid for each country. If a filter matches, Shopware does not create a customer account and the customer sees your error message.
Older versions of the plugin are available for Shopware 6.1 to 6.6. This guide describes version 2.1.0.
What the plugin does #
The filters work with regular expressions. This lets you block not only single addresses but whole ranges. With .*@example.com nobody can register with an address from example.com anymore, with .*@.*\.ru nobody with a Russian .ru address. For names, Mar.* blocks all names that start with "Mar".
The system is powerful and must be used with care: an entry E.* in the company field prevents the registration of all company names that start with E. Upper and lower case do not matter.
For spam with arbitrary strings of letters there is the extreme check. It is switched off by default.
Installation and setup #
- Install the plugin under Extensions > My extensions and activate it.
- Open the configuration, switch on "Active" and enter your filters, one per line.
- Test a registration with a blocked address.
Settings #
You find the settings under Extensions > My extensions at "Registration filters against spam registrations". They apply per sales channel.
| Setting | Default | Effect |
|---|---|---|
| Active | off | Switches the plugin on or off for the sales channel. |
| Filter e-mail | empty | Blocked email addresses, one per line, also as a regular expression. |
| Filter name | empty | Blocked first names and last names, one per line. |
| Filter company | empty | Blocked company names, one per line. |
| Filter for allowed zip code | pattern for DE | Valid postal codes per country in the format ISO => Regex, one line per country. |
| Error message | German text | Message the customer sees when a filter matches. |
| Extreme check: Active | off | Switches on the additional check against random strings. |
| Extreme check: Filter name | pattern | Regular expression of the extreme check, see below. |
Checking postal codes #
Under "Filter for allowed zip code" you enter one pattern per country: the ISO code of the country, then =>, then the regular expression. By default the pattern for Germany is entered there:
DE => ([0]{1}[1-9]{1}|[1-9]{1}[0-9]{1})[0-9]{3}According to this pattern, a German postal code is valid if it starts with 0 and has 1 to 9 in the second position or if it starts with 1 to 9. The remaining three characters are digits. For a country with four-digit postal codes a simple pattern is enough, for example for Austria:
AT => \d{4}Extreme check #
The extreme check is meant for cases in which the normal filters do not work, for example when spam registrations use arbitrary strings of letters. If the regex field of the extreme check (labeled "Filter name" in the "Extreme check" card) is empty, enter this expression:
(.*((([A-Z]{2,}[a-z]{1,}.*){2,})|(([A-Z]{1,}[a-z]{2,}.*){4,}))+.*)It blocks entries in which at least two uppercase letters followed by at least one lowercase letter occur at least twice or in which one uppercase letter followed by at least two lowercase letters occurs at least four times. If the extreme check does not work either, write to us. We will then develop an expression for your case.
Frequently asked questions #
How do I test a regular expression beforehand?
For example on regex101.com. The plugin ignores upper and lower case, so select the option i there. If the expression is correct, the whole test text is highlighted.
What are examples of common spam patterns?
This expression blocks registrations with links:
http[s]?:\/\/.*Entries with question marks:
.*\?+.*A specific text, here "gehen sie gerne essen?":
.*gehen\ssie\sgerne\sessen\?.*Does the filter also apply to guest orders?
Yes, as long as the customer fills in the Shopware form. If the customer buys via an express checkout button such as PayPal Express, they enter their data on the page of the payment provider. The plugin cannot check these entries.
Help #
If this guide does not answer your question, write to us via the contact form on enno.dev.
