hakkim
hakkim

Reputation: 658

Sending customer id in customer registration email opencart 3.0.2

I need to add customer id in customer registration email template. When I looked in mail function in catalog/controller/mail/register.php I could see that $args passing the parameters of customers details. But in that variable. there is no customer id. How can I pass customer ID too to this variable?

Upvotes: 0

Views: 517

Answers (1)

DigitCart
DigitCart

Reputation: 3000

In this file:

catalog/controller/mail/register.php

Find:

$data['firstname'] = $args[0]['firstname'];

Add before it:

$data['customer_id'] = $output;

In this file:

catalog/view/theme/default/template/mail/register_alert.twig

Add where you want:

Customer ID: {{ customer_id }}

Then clear caches (twig cache, ocmod cache).

Upvotes: 0

Related Questions