Git Product home page Git Product logo

magefan / module-login-as-customer Goto Github PK

View Code? Open in Web Editor NEW
106.0 9.0 32.0 227 KB

Allows admin to login as a customer (enter to customer account).

Home Page: https://magefan.com/login-as-customer-magento-2-extension

License: Other

PHP 95.89% HTML 2.94% JavaScript 1.17%
magento2 magento2-module magento2-extension magento2-plugin magento2-extension-free magento2-free-extension magento2-module-free magento-2 magento-2-module magento-2-extension

module-login-as-customer's Introduction

Allows admin to login as a customer (enter to customer account).

Total Downloads Latest Stable Version

Important

This module has been officially moved to the Magento2 GitHub repo as part of Magento 2.4.0 or greater. Find out more: https://magefan.com/magefan-login-as-customer-extension-now-is-part-of-magento-240-core

Requirements

  • Magento Community Edition 2.0.x-2.4.x or Magento Enterprise Edition 2.0.x-2.4.x

Installation

Support

If you have any issues, please contact us then if you still need help, open a bug report in GitHub's issue tracker.

Please do not use Magento Marketplace Reviews or (especially) the Q&A for support. There isn't a way for us to reply to reviews and the Q&A moderation is very slow.

Need More Features?

Please contact us to get a quote https://magefan.com/contact

License

The code is licensed under EULA.

Magento 2 Point of Sale

Magento 2 Theme

module-login-as-customer's People

Contributors

andriysvyryda avatar barryvdh avatar erfanimani avatar ihormandzyuk avatar ihorvansach avatar kozakserhii avatar lewisvoncken avatar magefan avatar mandatoryhashtags avatar nntoan avatar termos008 avatar tjitse-e avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

module-login-as-customer's Issues

2.1.5 is installed via composer, shouldn't be 2.1.8?

$ composer require magefan/module-login-as-customer
Using version ^2.1 for magefan/module-login-as-customer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals

  • Installing magefan/module-community (2.0.2): Loading from cache
  • Installing magefan/module-login-as-customer (2.1.5): Downloading (100%)
    Package sjparkinson/static-review is abandoned, you should avoid using it. Use phpro/grumphp instead.
    Writing lock file
    Generating autoload files

2.1.5 vs 2.1.8 https://github.com/magefan/module-login-as-customer/releases

Duplicate Active Quotes

When you use the login as customer functionality for an existing customer which already has a filled quote then a new quote will be create.

Because of this situation it is possible that a customer has multiple active quotes and when the customer submits the new quote and places an order the original quote will be activated. Now the customer has random old products in his shopping cart form his own original quote

See the screenshot of the quote table with 3 active quotes

image

Customer data not invalidated private content after logged in

Magento Commerce 2.2.1 & 2.2.2
FPC: Varnish

The current sections.xml does not invalidate customer section after the redirect. (Welcome message..etc is blank)

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Customer:etc/sections.xsd">
    <action name="loginascustomer/login/post" />
</config>

But if we add the specified section into sections.xml, then it will invalidate private content properly. For e.g:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Customer:etc/sections.xsd">
    <action name="loginascustomer/login/post">
        <section name="checkout-data"/>
        <section name="wishlist"/>
        <section name="multiplewishlist"/>
        <section name="customer"/>
        <section name="cart"/>
    </action>
</config>

If multiple stores exist under a specific website, user is logged into the default website for that store

When multiple stores exist under a specific website, user is logged into the default store instead of the correct store.

Preconditions

  1. Magento 2.1.9 installed with version 2.1.3 of this Login as Customer Plugin
  2. A website with multiple stores
  3. A Customer attached to a different store than the default in the Website

Steps to reproduce

  1. Go to Admin -> Customers
  2. Click "Log in as Customer" on the Customer with a different store than the default

Expected result

  1. Customer is logged in on the front end in the correct store

Actual result

  1. Customer is logged into the default store for the Website (one with the lowest sort order)

Does not work with Magento 2.1.9

Hello there,

First of all, thank you for your awesome module

Second of all, we just updated from 2.1.6 to 2.1.9 and installed the latest version of this module (through composer).
The module does not work as well ad before.

There was no issue during the installation, nor in the backoffice but when I clic on the "Login As Customer" button (from the "All customers list page", it redirects me to a page with a link that looks like "account/login/referer/aHR0cHM6Ly9kZXYubWVkZWx5cy5mci9jdXN0b21lci9hY2NvdW50L2luZGV4Lw%2C%2C/" but it does not work...

I have the same issue if I am on a client detail page.

Thank you to let me know
Matt

Changelog

Not necessarily an issue, but it would be great if we could include a changelog section inside the readme.md file :)

Login as customer does not Login as Customer's group

For example, if a customer has special cart or price rules that apply when they are logged in and shopping and if an admin user has an account with a different customer group (ie: customer group for employees) logs in as the customer, the admin will not get the same rules apply as the customer they are logged into. Also in some cases, the admin user's group gets attached to the customers quote instead causing incorrect pricing and order treatment for the customer even if the customer logs in afterwards.

In quote table, the value for customer_group_id is detected as the customer group of the admin user logged in rather then the customer who we are logging in as.

To solve I would imagine making sure to set the customer_group_id on the quote table as the customer's rather then the current user would work.

Two customer cart is merging

Hey,

I am login as customer 1 and add 2 product in cart. after that i am login as customer 2 (does not have any item in cart) then customer 1 cart item merge in customer 2 cart.

Can you please provide solution for that, I don't want to merge cart.

Multiple store login not working

Hi,
I've just updated to 2.2.3 and when testing multiple store login I get to the "You're logged in" notification, but then it immediately redirects to login page and I am now logged out.

I've also noticed that I continue to receive the notice upon login that there is an update available, but I can see in the database that the version number is correct.

Does not work with Magento 2.3.2

I success to install the module but cannot complete the di:compile command.
I can see that the construct of class Magefan\LoginAsCustomer\Model\AdminNotificationFeed is wrong cause the construct of parent class \Magento\AdminNotification\Model\Feed has updated in 2.3.2

bin/magento setup:di:compile
Compilation was started.
Interception cache generation... 6/7 [========================>---] 85% 1 min 478.0 MiBErrors during compilation:
Magefan\Community\Model\AdminNotificationFeed
Incompatible argument type: Required type: \Magento\Framework\Module\Manager. Actual type: \Magento\Framework\Model\ResourceModel\AbstractResource; File:
/src/vendor/magefan/module-community/Model/AdminNotificationFeed.php

Total Errors Count: 1

Does not work for Login Restricted Websites

Fails When Access Restriction Login is active

In Configuration, when General > Website Restrictions > Restriction Type is set to > Login
User can't login as customer, and is stuck on front-end Account Login Page

It would be great if Login as customer could also bypass this initial restriction by logging in and authenticating as customer at this entry point also.

Work Around

To work around the issue you need to first login manually on the front-end with any user that meets the access allowed criteria in admin (you can create one or use your own login). Then once logged in, go back to admin and click Login as customer. This isn't ideal because the sessions get mixed with the user used to bypass login restrictions.

How come module can't login as customer when login restrictions are on? Can it not authenticate prior to this block or restriction?

thanks

Secret Key Invalid

Hi There,
We are using your extension for one of our client. When we frequent users are click on "Login as Customer", it redirects to dashboard. Basically default magento's secret key got invalid.
Could you please check this on priority basis and give me update on it?

Thanks,
Darshan Khatri

how to save admin info to order level?

1.Magefan\LoginAsCustomer\Controller\Adminhtml\Login\Login

    $userName=$user->getUsername();
    $encodedUserName=strtr(base64_encode($userName), '+/=', '._-');

    $redirectUrl = $url->getUrl('loginascustomer/login/index', ['secret' => $login->getSecret(), '_nosid' => true,'csr'=>$encodedUserName]);

2.Magefan\LoginAsCustomer\Controller\Login\Index
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$catalogSession = $objectManager->get('\Magento\Catalog\Model\Session');
$csr = $this->getRequest()->getParam('csr');

        if($csr!='' && $csr!=null){               
          $userName=base64_decode(strtr($csr, '._-', '+/='));
          $catalogSession->setCsrValue($userName);
            }
    $this->messageManager->addSuccess(
        __('You are logged in as customer: %1', $login->getCustomer()->getName())
    );

    $this->_redirect('*/*/proceed');

public function execute(EventObserver $observer)
{
$order = $observer->getOrder();
$csrValue=$this->catalogSession->getCsrValue();
if($csrValue!='' && $csrValue!=null){
$order->setCsrname($csrValue);
}
return $this;
}

But its not working. Do you have any idea? can you help me on this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.