saveReferer example

&& $optinAttribute->get('sendOptinMail') === true
                && $customer->getDoubleOptinRegister()
                && $customer->getDoubleOptinConfirmDate() === null
            ) {
                $hash = Random::getAlphanumericString(32);

                $optinId = $this->doubleOptInSaveHash($customer$hash);
                $this->saveOptinIdToCustomer($optinId$customer);
                $this->doubleOptInVerificationMail($shop$customer$hash);
            }

            $this->saveReferer($customer);

            $this->modelManager->commit();
        } catch (Exception $ex) {
            $this->modelManager->rollback();
            throw $ex;
        }
    }

    private function saveReferer(Customer $customer): void
    {
        if (!$customer->getReferer()) {
            
Home | Imprint | This part of the site doesn't use cookies.