Search by

therealworld / specialcustomer-module

therealworld

Customers can tell you are 'special' during signup. The OXID7 shop merchant then receives an email and can start further manual actions.

Package info

bitbucket.org/therealworld/specialcustomer-module

Homepage

Type:oxideshop-module

pkg:composer/therealworld/specialcustomer-module

Statistics

Installs: 77

Dependents: 0

Suggesters: 0

v2.0.7 2026-10-25 14:50 UTC

This package is auto-updated.

Last update: 2026-10-25 14:51:41 UTC


README

Deutsche Fassung: README.de.md

vendor-logo the-real-world.de

description

Adds a checkbox to the customer registration and to the checkout (with or without account) with which a customer can say they are a "special" customer and ask for additional rights. When the box is ticked, the shop operator receives an e-mail and decides by hand what to do with the account (e.g. assign a customer group).

  • Composer package: therealworld/specialcustomer-module
  • OXID module id: trwspecialcustomer

Requirements and installation

  • OXID eShop CE >= 7.4, PHP ^8.3
  • therealworld/tools-plugin >= 3.2
composer require therealworld/specialcustomer-module
vendor/bin/oe-console trw:module:setup trwspecialcustomer

trw:module:setup comes with therealworld/clirun-plugin; without it use oe:module:install vendor/therealworld/specialcustomer-module and oe:module:activate trwspecialcustomer. The module has no database tables and no migration.

Configuration

Extensions > Modules > the-real-world - Special customer > Settings

Setting (admin)NameDefaultEffect
Activate additional checkbox in the checkoutboolTRWSpecialCustomerActiveonShows the checkbox
Text for the checkbox in the registration processaarrTRWSpecialCustomerCheckboxde => Ich bin ein besonderer Kunde, …, en => I am a special customer, please enable additional rightsLabel of the checkbox
Text for the help text on the checkbox in the registration processaarrTRWSpecialCustomerCheckboxHelpde => Der Shopbetreiber wird …, en => The shop merchant will be informed by e-mail and will contact you.Hint below the checkbox; empty means no hint
Text for notification email - SubjectaarrTRWSpecialCustomerEMailSubjecten => The customer with the email address %s is requesting additional rights. (de likewise)Subject of the notification
Text for notification email - TextaarrTRWSpecialCustomerEMailTextsame as the subjectBody of the notification

The four text settings are lists of language abbreviation => text (de => …, en => …). Add a line for every active shop language — a language without a line gets an empty text. In subject and body %s is replaced by the customer's e-mail address.

Behaviour

  • The checkbox appears below the newsletter checkbox in three places: on the registration page (cl=register) and in the checkout step "address" (cl=user) both when opening an account and for a guest order. Fieldsets: form/fieldset/user_account.html.twig (block user_account_newsletter) and form/fieldset/user_noaccount.html.twig (block user_noaccount_newsletter).
  • When the account (or the guest customer) is created with the box ticked, the module sends a mail to the shop's info e-mail address (Master Settings > Core Settings), with the customer's address as reply-to. The subject is converted to plain text.
  • Nothing is stored at the customer: the mail is the only trace. What happens next (customer group, price group, activation) is up to the operator.

    The mail goes out once per created customer; logging in or changing the address later does not send it again.

Limits

  • With private sales enabled, OXID does not log the new customer in after registration, so no mail is sent.
  • The mail is sent through OXID's sendContactMail(); there is no own mail template.

For developers

  • Chain extensions: Application\Component\UserComponent (afterLogin() sends the mail when the request parameter btrwspecialcustomer=1 is set — createUser() calls afterLogin() once after a successful registration, on cl=register as well as in the checkout), Application\Controller\UserController (template parameter isSpecialCustomerCheck, getters getSpecialCustomerCheckboxText(), getSpecialCustomerCheckboxHelp(); the core RegisterController extends UserController and inherits them), Application\Model\User (adds the DataGetter trait).
  • Templates: @trwspecialcustomer/frontend/trwspecialcustomer_checkout.html.twig (the checkbox), included through the theme extensions of form/fieldset/user_account.html.twig and form/fieldset/user_noaccount.html.twig.
  • Helper: Core\SpecialCustomerHelper::getSpecialCustomerConfigText() reads a text setting for the current language and fills in %s.