Questions tagged [customer]

denotes questions related to the customers module

Filter by
Sorted by
Tagged with
80 votes
22 answers
137k views

How to check if customer is logged in or not?

How to find if a customer is logged in or not in Magento 2. If the customer is logged in then how to get customer data from a session?
Rakesh Jesadiya's user avatar
64 votes
3 answers
69k views

Adding custom attribute to Customer

We need a simple way to add an attribute to a customer record that is not editable by the customer or admin, only programatically. Essentially, we have an ExpressionEngine site coupled with Magento. ...
MB34's user avatar
  • 771
39 votes
11 answers
63k views

How to Remove Customer Account Dashboard Links

I want to remove following links in the customer account dashboard left panel? My Applications Gift Registry Reward Points Gift Card Link I'm working in the Magento 1.7 Community Edition. Any ...
Oshan's user avatar
  • 1,952
29 votes
6 answers
21k views

Adding columns to customer grid using observer or overriding the customer grid

I am facing an issue of adding a column on customer grid and showing values in that column. Here is the observer code that I have been trying to show the column:- if ($block->getType() == '...
Kuldeep's user avatar
  • 428
20 votes
8 answers
84k views

Magento 2 Get customer ID from session in a block class

How to get customer ID from session? I tried this but not work. protected $_customerBonusPointFactory; protected $_customerSession; public function __construct(Session $customerSession, \Magento\...
TFS's user avatar
  • 4,319
20 votes
6 answers
21k views

Magento 2: How to show address field in registration form?

I want to display address fields (to save in default billing address) in customer registration form. I know how to do in Magento 1. But I'm struck with Magento 2. Have anybody done this before ..? ...
Elavarasan's user avatar
20 votes
1 answer
39k views

Magento2 : Best way to load Customer by customer Id

What is the best way to load Customer by Id? using customer interface or customer factory or another way ? In most of solutions I found, it is done by directly using objectManager (which should be ...
Vishwas Bhatnagar's user avatar
19 votes
5 answers
18k views

How do I remove customers middle initial/name from the checkout page?

Since upgrading to the latest version of Magento, I noticed that a new entry has appeared on the checkout page asking for the customers middle name/initial. How do I remove the entry "Middle name/...
SR_Magento's user avatar
  • 5,209
17 votes
6 answers
40k views

Magento 2 - Redirect customer to custom page after login

Which class I should override in order to redirect a customer to a specific page after login? I have tried to set Redirect Customer to Account Dashboard after Logging in in the store configuration ...
TFS's user avatar
  • 4,319
16 votes
3 answers
10k views

How to show address fields in register

I have tried to do it in register.phtml, but it did't working for me. I can't find local.xml file too. How i can enable it? This is really important thing in my shop.
Yardi's user avatar
  • 293
16 votes
3 answers
2k views

Why Magento re-saves existing customer addresses during checkout?

During the checkout process even if customer selects existing address form the drop-down the customer_address entity is being re-saved. Any idea what for? Update: It starts at ...
Tim Bezhashvyly's user avatar
16 votes
1 answer
3k views

Magento 2 minicart, welcome message, other do not work with page cache disabled after customer login

With Magento 2.0.4 cache, more specifically page cache enabled, everything works. If I disable it, clear cookies, and login as customer than products in minicart are not there. Welcome message does ...
Daniel Ifrim's user avatar
  • 3,404
15 votes
2 answers
5k views

Autologin on frontend from the backend

See the following scenario. I have some custom module that allows the frontend user to perform some actions on some custom entities. (details are not really important). The request is that an admin ...
Marius's user avatar
  • 198k
14 votes
4 answers
20k views

How to check if customer is already subscribed to newsletter

I need to check if the customer is subscribed to news letter or not. Currently I am using this code and it is returning nothing: if (Mage::getSingleton('customer/session')->isLoggedIn()) { $...
Ravi Soni's user avatar
  • 1,515
13 votes
3 answers
1k views

Creating customers programatically issue

I want to create some customers programatically and I have an issue when I want to save the website ID. I have multiple website IDs: 0 => admin 1 => germany 2 => hungary 3 => romania ...
Attila Naghi's user avatar
12 votes
3 answers
25k views

Customer Can't log in

I just migrated my website. But I got a problem. My customers can't log in to their account. When click log in on log-in page. http://www.mywebsite.com/customer/account/login/ It should be log in on ...
Nattapong Lip Kiatmongkollert's user avatar
12 votes
2 answers
15k views

How can i get customer data from observer after successful login?

I have made a custom module in which I have an observer file. I need to display all information about the logged in user.
user2656802's user avatar
12 votes
2 answers
5k views

Is it possible for customers to login with a customer number instead of a email address

I want to create a login page that uses a assigned customer number instead of their email address. The way my business is setup, on a separate eComms platform, they access their account with a ...
Alex W G's user avatar
  • 153
11 votes
6 answers
29k views

Magento 2 customer-data.js:90:23 [object Object]

I'm using Magento 2.2 with Porto theme and getting an [object Object] javascript error at customer-data.js line 90 in the console after logging into the store and refreshing the page or switching to ...
Lez's user avatar
  • 2,917
11 votes
1 answer
2k views

How to automatically add a comment on order when is placed

I have the following situation: I am on the checkout page, and i have 3 Shipping methods. If i select a specific method form all 3 and i finish the order, i want a comment to be added automatically ...
Alin Lupoiu's user avatar
  • 2,662
10 votes
4 answers
9k views

In Magento 2 - How to remove a column in customer_entity table?

In Magento 2, How to remove a column in customer_entity table?
MrTo-Kane's user avatar
  • 3,656
10 votes
5 answers
18k views

Redirect user after login

I wanted to redirect user to "Home" page instead of "My Account" page after login, and i was successful to achieve this making use of <customer_login> event. But I was also redirected to ...
Trimantra Software Solution's user avatar
10 votes
1 answer
11k views

Magento 2 Check If Customer is Subscribed to Newsletter

I am developing this custom xml export/import. In magento 2 how can I check if a customer is subscribed to newsletter? Right now I am loading the customer factory. \Magento\Framework\App\...
André Ferraz's user avatar
10 votes
3 answers
13k views

How to get customer phone from order shipping data?

How to get customer telephone number mentioned in order shipping address?
Sandesh's user avatar
  • 1,649
10 votes
1 answer
29k views

Get Customer Address

I have customer id . Using customer id i want customer address. so how to get customer address and using country id how to get full name of country
ND17's user avatar
  • 5,181
10 votes
3 answers
7k views

Event/Observer for customer password change?

I'm looking for a way to hook into the event of customers changing their passwords. So if someone changes the password in the customer frontend, I'd like to send an e-mail somewhere. I did consult ...
oschloebe's user avatar
  • 926
10 votes
2 answers
4k views

What does the Customer is_active flag do?

During a discussion today I was informed that the Customer is_active flag doesn't actually do anything. This is a unique flag, like the customer email address, in that it's not an EAV attribute. ...
Ryre's user avatar
  • 1,147
10 votes
4 answers
11k views

Magento Default Captcha shows "Incorrect CAPTCHA" even if correct code is entered

In my magento site I have enabled Captcha for Create Account form of custom theme which I built from scratch(not "rwd"), but when I try to register a customer with providing correct captcha code in ...
H.D.'s user avatar
  • 361
9 votes
2 answers
8k views

customer session does not work except customer page - Magento 2

app/code/Vendore/Module/Block <?php namespace Vendor\Module\Block; class CustomerLink extends \Magento\Framework\View\Element\Template { protected $_customersession; public function ...
Bilal Usean's user avatar
  • 9,977
9 votes
2 answers
12k views

Magento 2 - Change customer password programmatically

I have build a plugin on the authenticate() method in Magento\Customer\Model\AccountManagement with beforeAuthenticate(). It is working and I can change the firstname of something else of the ...
Evrijn's user avatar
  • 320
9 votes
1 answer
25k views

How to list all users

As part of an exercise I am trying to list all users email from my database on one page. So far the closest i've got is $user = mage::getModel('customer/customer')->getCollection()->getData(); ...
tony09uk's user avatar
  • 1,707
9 votes
4 answers
15k views

magento2 check if customer is logged in or not in knockout template

How do I check if customer is logged in or not in knockout template? my template <!-- ko if: customer().firstname --> <!-- /ko --> my js define( [ 'ko', 'jquery', ...
Nagendra Kodi's user avatar
9 votes
6 answers
13k views

Magento 2 - How to rearrange Customer "My Account" links

Now it looks like this: Account Dashboard Account Information Address Book My Downloadable Products My Orders Newsletter Subscription Billing Agreements My Product Reviews My Wish List I want to ...
Mark's user avatar
  • 993
9 votes
3 answers
6k views

Is there customer session support via Magento's REST api?

I'm working on extending wishlist functionality to Magento's REST api. It would be nice to access the customer's session. Does Magento have any support for accessing the customer's session via REST?
Ryre's user avatar
  • 1,147
9 votes
2 answers
29k views

Adding custom attribute to customer registration form

I needed to create two new customer attributes. I have followed the guide from: http://www.fontis.com.au/blog/magento/know-more-about-your-customers-adding-custom-signup-attributes to create these ...
user1669256's user avatar
9 votes
3 answers
6k views

Determine if customer is new in customer_save_after

I have events that I wish to execute when a customer registers or saves their details. For this, I am using two events: customer_register_success and customer_save_after. The problem I am having is ...
Matthew Haworth's user avatar
8 votes
5 answers
58k views

Magento 2: How to get order information using REST API?

I want to get order,customer information by using REST API. Anyone have idea about this?
BornCoder's user avatar
  • 1,498
8 votes
2 answers
23k views

how to load customer by email in magento2?

In magento 1.9, I used loadByEmail method from resource model. But in magento2 in Magento\Customer\Model I see loadByEmail method. Customer factory, as well as customer entity which I get from quote, ...
Ilja's user avatar
  • 1,268
8 votes
4 answers
16k views

How to block/remove registration of new customers in Magento 2?

I want to disable the possibility to register as a new customer on the frontend of my Magento 2 Community Edition store (new customers are being created through a different process). I think I could ...
7ochem's user avatar
  • 7,532
8 votes
2 answers
5k views

Magento 2: Restrict customer registration by specific mail extension

Anyone know how to block customer registration with specific email extension? I am getting so many automated user registrations with [email protected] and [email protected] how to block this type email ...
Riyas Muhammed's user avatar
8 votes
2 answers
4k views

Is there any way to set different theme depends on customer group?

I want to show different theme depends on customer group.Is there any way to set different theme dynamically? For Eg.: Theme A for General customer group and Theme B for Wholesale customer group. ...
Bijal Bhavsar's user avatar
8 votes
5 answers
9k views

How to add a new address (shipping or billing or another) via Magento 2 REST API?

There are API's available to fetch and delete address of a customer but not create a new one. GET /V1/customers/addresses/:addressId GET /V1/customers/me/billingAddress GET /V1/customers/:...
devdoe's user avatar
  • 460
8 votes
3 answers
3k views

Magento 2: When/Why to do customer:hash:upgrade?

When I run below command, it gives below output. $ php bin/magento customer:hash:upgrade . Finished What actually this command do? When I have to run this command? What changes it will do? Will ...
Jackson's user avatar
  • 9,909
8 votes
2 answers
2k views

How to remove Delete option from massaction dropdown for specific user role in Magento2?

I have different user role for my website. For a particular user role, I want to remove "Delete" from mass action dropdown which displays on customer grid in admin section. The Delete option is got ...
Megha's user avatar
  • 81
8 votes
2 answers
12k views

Magento 2 - Event after customer edit account and address

I need to add some custom logic in my extension after Edit Account Information Change Password Edit Address The customer_save_after_data_object event can be used for case 1. How about 2 & 3?
TFS's user avatar
  • 4,319
8 votes
2 answers
2k views

Make customer attribute unique

is it possible to make a customer attribute unique, preferably on a website basis bit if not then globally? I cant see how to do this. Similar to the email address
Marty Wallace's user avatar
8 votes
1 answer
1k views

Sales flat order: ext_customer_id, ext_order_id

Does anyone know what the purpose is of the order attributes "ext_customer_id" and "ext_order_id"? The Magento code appears to introduce these attributes and they appear on each order, but never ...
Turpachull's user avatar
8 votes
1 answer
635 views

How to import not confirmed customers via CSV import?

I'm trying to import customers via CSV Import: System > Import/Export > Import > Customers > Append Complex Data I'd like to import customers which are "not confirmed" after import. ...
Anna Völkl's user avatar
  • 17.3k
8 votes
1 answer
1k views

Magento 2 : What is the Best Way to Implement Favorite Products List for Regular Customer?

The majority of our customers not very tech savvy and have trouble with basic website functions and they need to order same or similar items every week or quickly. What is best way for me to assign ...
Sabiancym's user avatar
  • 163
7 votes
6 answers
28k views

Set value to created customer custom attribute in magento 2

I have created custom attribute for customer using below code. setup/installData.php class InstallData implements InstallDataInterface { const LEGALITY_DOCUMENT_1 = 'user_legality_document_1'; ...
Developer Webile's user avatar

1
2 3 4 5
43