Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

denotes questions related to the customers module

0
votes
0answers
14 views

How can I restrict customer accounts to a specific store view?

If a customer registered on a specific storeview, it has to use the account only on that storeview. So I want to turn off the shared customer accounts. If a customer tries to log in with that account ...
0
votes
0answers
14 views

Add list of users with specific role as customer attribute

How can I add customer attribute similar to Group attribute but with users with specific user role? With this site > http://www.silksoftware.com/magento-module-creator/magento2x.php I generated ...
0
votes
0answers
4 views

Adding an index to a Magento2 MySQL Core Table - recommended best practice?

I need an index on the updated_at field of the Magento2 core table customer_entity. What would be the best practices in that case? Should I just add it to the core table? Or better create a second ...
0
votes
0answers
24 views

GET products for my cart with customer token

I want to insert items in a cart using a customer token. I already found how to insert the products but it needs the SKU of the products. The problem is I can't find a way to get the product's SKU ...
0
votes
0answers
19 views

M2 problem logging in with old MD5 customer password after importing customers from M1 [duplicate]

I imported customers from M1 into M2.2.5 using the M1 export and M2 import functions. Works fine however the old passwords are not accepted. I know this is due to a change change in hash method. How ...
0
votes
0answers
16 views

Magento 2, How to create API for customer login by using facebook

Using Magento 2.2, API. How to create login/logout into magento by using Facebook. I got user profile info form facebook and I need to use this info to get Get Customer Token.
0
votes
2answers
30 views

Magento 2, How to create API for customer forget password?

Using Magento, API. I need to create an API for customer send forget password. I found the page that allows to customer send e-mail for request change password but I don't how to use this page for web ...
3
votes
1answer
22 views

Change add to cart button based on customer group

Can anyone explain me how and where I can customize the add to cart button functionality based on the current customer group? I’d like to show a popup or redirect to a CMS page but only for a specific ...
0
votes
0answers
11 views

Magento 2 clearing cache per customer group

Is it possible to clear the cache just for 1 customer group? If yes how do you do this?
0
votes
1answer
20 views

New Customer Attribute with UpgradeData

I have used below code in my setup folder to create custom customer attributes, use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\...
0
votes
0answers
10 views

Customer has no tokens error during customer update in Magento2

I am using below code in my controller to update customer from the post values: $userId = $this->getRequest()->getParam('user_id', false); $oldUser = $this->_getUser($userId); $...
0
votes
0answers
33 views

How to Enable and Disable Customer in Magneto2

I am looking for code how the customer can be enabled and disabled using customer Id in Magento 2. When customer is disabled we should not allow customer to login from front end. I tried setting ...
1
vote
1answer
28 views

How to send Transaction email from controller in Magento 2 [duplicate]

I have code like below in Magento1 to send Transaction email to customer public function createPostAction() { $user = Mage::getModel('customer/customer')->setId(46210); $user->save(); $...
1
vote
1answer
28 views

magento spam customers registering with chinese and some other languages

How to prevent spam customers registering with Chinese and some other languages with multiple accounts. For this I have done input fields not to paste but also other language accounts are being ...
2
votes
2answers
66 views

load customer object update issue in magento 2?

I have used below code in my controller use Magento\Customer\Api\Data\CustomerInterfaceFactory; class editPost extends \Magento\Framework\App\Action\Action { protected $_customer; protected $...
0
votes
2answers
46 views

Javascript function in phtml files

I am using onclick function in my template file, here is my html <div class="input-box"> <input type="checkbox" name="change_password" id="change_password" value="1" onclick="...
1
vote
1answer
47 views

Fatal error in Constructor controller in Magneto2

I am creating sub user for current logged in customer below is my controller code use Magento\Framework\App\Action; use Magento\Framework\Exception\NotFoundException; use Magento\Framework\...
2
votes
0answers
15 views

Parameter to give permissions to Role in order to modify customer information

I would like to have a parameter which if selected Yes, the dealers of the webpage aren't able to modify any customer information. If selected No, nothing happens and they can modify anything they ...
3
votes
2answers
37 views

Getting current customer with registry in Magento2

below is my block file code class View extends \Magento\Framework\View\Element\Template { protected $_registry; protected $_customerSession; protected $_customer; public function __construct( ...
0
votes
1answer
41 views

How to use getFieldset for customer in magento2?

I have used below code in magento1 to get customer attributes. $customerAccount = Mage::getConfig()->getFieldset('customer_account'); foreach ($customerAccount as $code => $node) { ...
1
vote
1answer
18 views

How to do form validation in Magento 2?

I have added custom form in customer account navigation. Looking for code to form validation. is there anything like form-validate like in magento1? I have used in magento1 like below. var ...
0
votes
2answers
36 views

How to add pagination with limit for collections in Magento 2?

I have filtered customer collection and showing in account navigation with one new custom link. upon clicking custom link on left nav i need to show collection on right side with pagination. How this ...
1
vote
1answer
33 views

How to Change Magento 2.2 Customer Password Hash During the Account Creation

I want to change magento 2 default customer hash password to compatible with some other applications related to registering customers. currently i'm using magento 2.2.5 and I was unable to got ...
0
votes
2answers
35 views

Get current customer collection in custom account navigation link

I have created the custom link in customer account left navigation. I am successfully created it. I am trying to get current customer Data in template file. I am getting 500 server error. Below is ...
2
votes
0answers
23 views

How to disable billing address edit or update in Magento2 checkout page?

I don't want to allow customers edit or update their billing address in Magento2 checkout page. Even i want to disable add new address in checkout page .
0
votes
0answers
16 views

Online Customer is not showing in Admin panel in Magento-2.1

In the Admin Panel, Online customer is not showing up. It always shows : "We couldn't find any records". Please Let me know how to solve it.
0
votes
2answers
48 views

Add Custom link in customer account navigation in Magento 2

How to add custom link in customer account navigation? I am looking for code to show form upon clicking custom link on left navigation. Can we submit form using custom link?
2
votes
3answers
94 views

How can I change the login link to logout when customer logged in Magento2?

I have added a login link in the footer by cms like as: <a href="{{store url="customer/account/login"}}">Login</a> As soon as customer login I want to change that in the Logout link ...
2
votes
1answer
40 views

Magento 1.9.2. - If the current customer does not place an order in a pre-established time

I would like to create an if with php where I assign an action if the current customer registered on my site in magento does not place an order after 6 months from his last order. if(customer not ...
1
vote
0answers
25 views

Magento 2 | customer grid error

I added a custom customer attribute to the customer_grid and now it displays following error: Something went wrong with processing the default view and we have restored the filter to its original ...
0
votes
2answers
54 views

Magento2 Check if Customer is logged in - Not working

I have taken the reference from this link Created the variable protected $_customerSession; Done the injection \Magento\Customer\Model\Session $customerSession, But in my Function in my block class ...
0
votes
1answer
10 views

Create a search filiter textbox on admin page

I am using the https://webkul.com/blog/add-ui-select-with-search-filter-admin-form-magento2/ to create a search filter but what I was expecting was I am getting is this, No search area.
0
votes
1answer
21 views

Magento : Got Protected Data Of Customer in Observer

I tried to get the information about a logged customer into an observer, but I can't get it even when I get customer object and maybe it's because I have the "protected" data In the Observer file: $...
0
votes
2answers
31 views

Magento 2 : Programmatically Create Customer and Then Login

I am trying to create customer and then login programmatically. Below is my code : <?php use Magento\Framework\App\Bootstrap; require __DIR__ . '/app/bootstrap.php'; $params = $_SERVER; $...
0
votes
0answers
26 views

Admin Customer Form fieldset renderer. How to edit input fields?

In: app\design\adminhtml\default\default\template\store\switcher\form\renderer\fieldset.php there are: <table cellspacing="0" class="<?php echo $_element->hasTableClass() ? $_element->...
4
votes
2answers
55 views

How to get CustomerId in API in magento 2? and how magento gets customerId for the same?

Magento didn't load the customer session in API as used in web session based authentications. and i am aware about the API <magento.host>/rest/V1/customers/me My question is, how do I make ...
0
votes
0answers
14 views

Invalid method Mage_Customer_Model_Customer::cleanPasswordsValidationData

Hi guys how can I fix the problem of "cleanPasswordsValidationData" i have the customer control of mage 1.9.1.0 but i running a mage 1.9.0.1 so i wanted to averride the file but seems is not possible ...
1
vote
1answer
39 views

Fatal error: Uncaught Error: Call to undefined method addAttributeToSelect()

After deleted custom attribute and getting Fatal error: Uncaught Error: Call to undefined method Magento\Customer\Model\Indexer\Source::addAttributeToSelect() in /vendor/magento/framework/...
0
votes
2answers
23 views

Custom customer attribute not being created

I have written the following script to create a custom customer attribute in Magento 2.2.3. When I run setup:upgrade magento tells me data was installed but the attribute does not appear in ...
3
votes
2answers
221 views

Magento 2 : cannot save customer phone number

Using Magento 2.2, Backend, Customers. I cannot update or save suctomer telephone number, but after Save no message Error. Customer -> All Customer -> Customers NOTE: This is original code, ...
0
votes
1answer
22 views

Magento2: Add Checkout Terms and Conditions to Customer Registration Page

I am trying to include terms and conditions that are shown on the checkout on the customer registration form. I have tried various ways and managed to get it to display correctly but no matter what I ...
0
votes
0answers
33 views

Magento 2 - Registration page add Shipping address checkbox

I made some changes on the registration page of my store. I add billing address in this file vendor/magento/module-customer/view/frontend/templates/form/register.phtml This address is add it as ...
0
votes
1answer
17 views

Magento 1.9.2 - Display any single address of a customer in account dashboard (frontend)

I would display any single address of a customer and show it on account dashboard for a my work. How can i do? I tried with this: echo Mage::getModel('customer/address')->getAddress(2); echo ...
0
votes
1answer
29 views

How to implement a Customer custom attribute using EAV?

Scenario I'm trying to implement a custom attribute for Magento Customer, that should accept boolean values (True/False, Yes/No...). I'm using Magento CE 2.2.4. This is part of a custom Module ...
0
votes
2answers
32 views

Customer custom attribute value not getting set

I have created a custom attribute for a customer in Magento 2 and when I tried to save the value it gives me an error "Trying to get property of non-object". How can I save the attribute value? Here ...
0
votes
0answers
31 views

1.9.0.1 how to solve The password cannot be empty.problem?

I continue to search for the solution of this problem in magento 1.9.0.1 nothing have worked for me,.please help
0
votes
0answers
33 views

Magento 2.1 spam users even when captcha is enabled

In Magento 2.1.10, I have successfully enabled captcha for customer registration form but I am still getting fake users registered on website. This is the registration form: These are fake users in ...
0
votes
2answers
28 views

How to override .phtml files in Magento 2 without customising theme

I just want to override the customer account and login form for adding custom fields and external link. How do I do that using custom module please avoid creating the theme or customize the theme.
0
votes
1answer
28 views

Include customer group selection on registration form - Magento 2

I'm using Magento 2.2.3 and what I want to achieve is to put a dropdown selection for customer group on the registration page because some of them are resellers. Is this possible and if so, how do we ...
0
votes
1answer
32 views

Magento 2: How to remove attributes of the customer in the backend?

I need remove from customer addresses the next attributes: Prefix, Middle name and Suffix. How I do this?