Questions tagged [customer]

denotes questions related to the customers module

Filter by
Sorted by
Tagged with
71
votes
20answers
78k 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?
64
votes
3answers
65k 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. ...
39
votes
11answers
62k 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 ...
29
votes
6answers
20k 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() == '...
19
votes
5answers
17k 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/...
16
votes
3answers
9k 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.
16
votes
1answer
21k 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 ...
16
votes
3answers
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 ...
16
votes
1answer
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 ...
15
votes
6answers
12k 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 ..? ...
15
votes
2answers
4k 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 ...
14
votes
4answers
19k 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()) { $...
13
votes
3answers
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 ...
12
votes
7answers
43k 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\...
12
votes
3answers
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 ...
12
votes
2answers
14k 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.
12
votes
2answers
4k 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 ...
11
votes
4answers
16k 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 ...
11
votes
1answer
1k 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 ...
10
votes
4answers
21k 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 ...
10
votes
1answer
28k 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
10
votes
3answers
6k 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 ...
10
votes
2answers
3k 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. ...
10
votes
4answers
8k 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 ...
9
votes
4answers
6k 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?
9
votes
5answers
17k 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 ...
9
votes
1answer
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(); ...
9
votes
3answers
8k views

How to get customer phone from order shipping data?

How to get customer telephone number mentioned in order shipping address?
9
votes
3answers
8k 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', ...
9
votes
3answers
4k 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?
9
votes
5answers
8k 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 ...
9
votes
3answers
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 ...
8
votes
1answer
7k 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\...
8
votes
2answers
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. ...
8
votes
2answers
8k 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 ...
8
votes
2answers
28k 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 ...
8
votes
2answers
857 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 ...
8
votes
3answers
5k views

Customer password not working after migration from Magento 1 to Magento 2

I have migrated only customers from Magento 1.6.2.0 to Magento 2.2.3 and customers migrated successfully and listed properly in the admin section. But when I try to login with the Magento 1 password ...
8
votes
0answers
452 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 ...
7
votes
2answers
34k views

Getting shipping and billing addresses from a guest-checkout order

For orders checked out by a non-registered customer (i.e. guest), Magento doesn't create a customer. However, it does store the address information in sales_flat_order_address. How do you access this ...
7
votes
2answers
6k views

customer session does not work except customer page - Magento 2

Block <?php namespace Vendor\Module\Block; class CustomerLink extends \Magento\Framework\View\Element\Template { protected $_customersession; public function __construct( \Magento\...
7
votes
2answers
4k 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 ...@163.com and ...@mail.ru how to block this type email ...
7
votes
2answers
15k views

Magento 2 How to select fields in query

I'm using below code $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $resource = $objectManager->get('Magento\Framework\App\ResourceConnection'); $connection = $resource->...
7
votes
8answers
9k views

cannot read property 'section loadurl' of undefined

I'm getting this error on the firebug while loading homepage. Due to this error the pages are not loading fully. only the Header, Nav Menu and Footer and showing. The main content sections are not ...
7
votes
2answers
6k views

Magento 2 - How to call REST API to register a new customer

In Magento2, How to call REST API to register a new customer (What APIs need to call step by step). Thanks!
7
votes
2answers
7k 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?
7
votes
2answers
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
7
votes
2answers
1k views

“We can't save the customer” error after Migration - Magento 2.3

I have migrated store from Magento 1.7.0.2 to Magento 2.3. When i Create the customer it shows me error "We can't save the customer." I have checked log file and i can see log, "Class Magento\Eav\...
7
votes
1answer
578 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. ...
7
votes
0answers
3k views

Duplicate Order Increment ID Issue [closed]

I'm experiencing a rare issue where existing customers completing checkout place the order successfully. However, the following strange behavior occurs: The order confirmation email is not sent, The ...

1
2 3 4 5
40