Thread: Dual Login

Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2016
    Location
    Philippines
    Posts
    6
    Plugin Contributions
    0

    Default Dual Login

    I have a website with a back office login (separate from zen cart).

    I would like to have the customer automatically logged on & off to my store when they log on & off in the back office AND vice versa.

    This is what I have so far:

    1) I have modified the "create new account" file to require a company ID number and record that to the DB...and moved "email address" to Other Contact Details section.
    2) I have modified the admin customer edit form by adding the company ID,
    3) I have modified the customer's "Account Edit" form by adding the company ID.
    4) I have modified the login form to request the company ID instead of email address. By renaming the input field and label. This is consistent with my member's current log on credentials to the existing back office.

    Numbers 1-3 all function as expected.

    To complete #4, I need to change the actual log on from using "email address" & password to use "company ID" and password.

    My problem here is that I can't find the php file that actually processes the log on.

    I am a programmer so I'm pretty sure I can handle the change if I could just find the correct file.

    Thanks so much for your help on this.

    Kind Regards,
    John

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: Dual Login

    John, you could use the Encrypted Master Password plugin as a starting point. That plugin allows an authorized admin user to use their Zen Cart admin password to sign into any customer's account.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Dual Login

    Quote Originally Posted by Kuya View Post
    To complete #4, I need to change the actual log on from using "email address" & password to use "company ID" and password.

    My problem here is that I can't find the php file that actually processes the log on.
    See /includes/modules/pages/login/header_php.php
    and since you're hacking apart the default login handling process to not use email address you'll need to update the updateNotLoggedInCustomerPassword() function in zcPassword class to key on something other then email address.
    There may be other places too.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Jul 2016
    Location
    Philippines
    Posts
    6
    Plugin Contributions
    0

    Default Re: Dual Login

    Thank you DrByte for your reply. That was exactly what I was looking for.

    I have it working, (using "Company/Customer ID" instead of "Email Address") and yes it did take several modifications. The actual login template had to be modified as well as create new account template, customer account edit template, admin create customer template, admin (customer) account edit template, header_php.php, language files and more. But, it keeps everything in line with what my customers are used to.

    Quote Originally Posted by DrByte View Post
    and since you're hacking apart the default login handling process to not use email address ...
    I don't mean to offend or degrade the work that has been done to create and continuously update the software. I think the words "hacking apart" might be a bit strong.

    Every customer that uses the software has unique requirements, otherwise why are there so many plugins created to add additional functionality.

    As the saying goes... "Necessity is the mother of invention." When someone needs functionality the original software doesn't provide, they create it.

    I have hundreds of customers who are already accustomed to a particular logon process. Why disrupt them by changing it when I can change the process on ZC to accommodate them?

    The "dual" logon is yet to be completed. I will try to post my steps for accomplishing this when all is complete and working.

    Kind Regards,
    John

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Dual Login

    Quote Originally Posted by Kuya View Post
    I don't mean to offend or degrade the work that has been done to create and continuously update the software. I think the words "hacking apart" might be a bit strong.
    Apologies. Evidently your skills are stronger than those of most others who have asked about this sort of thing ... and *they* were indeed just hacking away.
    I occasionally use the word to help flesh out the person's perspective.


    Your next challenge will probably be what to do about sessions and whether to seamlessly link people already-logged-in to the other system to be instantly given an authorized session in this system without ever facing a login prompt. And then also syncing data between the systems, such as personal address/profile changes.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v139a Customor can't login after dual pricing installed
    By liderbug in forum General Questions
    Replies: 2
    Last Post: 16 Nov 2014, 04:41 PM
  2. Why is there a dual email login on my site??
    By huntleybill in forum General Questions
    Replies: 6
    Last Post: 5 Dec 2011, 03:54 AM
  3. dual zen cart, one login??
    By secondnature in forum Managing Customers and Orders
    Replies: 12
    Last Post: 12 Jul 2011, 09:38 PM
  4. Installed Dual Pricing 1.5 now users cannot login
    By digipete in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 5 Nov 2009, 09:13 PM
  5. DUAL PRICING (login only if approved)
    By kgmmusic in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 10 Mar 2007, 10:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR