Magento Login with username

Support specific to the Magento plugin (http://www.magentocommerce.com/).

Moderator: hwevers

Forum rules
Please post all the bugs you encounter on our issue tracker.

Re: Magento Login with username

Postby diglin on Tue Aug 24, 2010 8:56 pm

This module can help to add username attribute -> http://www.magentocommerce.com/magento- ... attributes
I don't know it but it seems to do the work.

The principe to add an attribute to any entity (here a customer but it can be a product, a quote or any EAV entity) is not so complex. Take a look in core files of Magento and analyze some files of a module (Customer or Catalog) like the config.xml, the folder sql and most of time the folder Model/Entity.php or Model/Mysql4/Setup.php it depends I don't have the whole structure in the head. But those file, contains the line to setup a new attribute.

Here an example how I made a new attribute entity for product entity, it's a free module I made and it will be available soon in Magento COnnect (it waits the moderator validation), the name is Rissip_Addinfotoemail
I created a sql php script (/code/local/MyCompany/MyModule/sql/blabla_setup/mysql4-install-1.0.0.php):
Code: Select all
$installer = $this;
/*@var $installer Rissip_Catalog_Model_Entity_Setup */

$installer->startSetup();
$entityTypeId = $installer->getEntityTypeId('catalog_product');
$defaultAttributeSetId = $installer->getDefaultAttributeSetId($entityTypeId);
/*$attributeGroupId = $installer->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);*/

$installer->addAttributeGroup($entityTypeId, $defaultAttributeSetId, 'Additional options',50);

$installer->addAttribute($entityTypeId, 'comment_mail',  array(
        'group'         => 'Additional options',
        'label'         => 'Additional comment in Mail',
        'type'         => 'text',
        'input'         => 'textarea',
      'frontend'      => '',
        'backend'       => '',
        'class'         => '',
        'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
        'visible'       => true,
        'required'      => false,
      'default'       => '',
        'user_defined'  => false,
      'searchable'    => false,
        'filterable'    => false,
        'comparable'    => false,
        'visible_on_front'          => false,
        'unique'                    => false,
      'wysiwyg_enabled'          => true,
      'is_html_allowed_on_front'    => true,
      'used_for_price_rules'      => false,
      'is_configurable'         => false,
    )
);

$installer->endSetup();
JFusion Team Developer - Magento plugin and JFusion core
Personnal website about Joomla/Magento integration - http://www.diglin.com
Engineer Computer Science for rissip http://www.rissip.com
User avatar
diglin
Developer
Developer
 
Posts: 241
Joined: Thu Feb 26, 2009 2:52 pm

Re: Magento Login with username

Postby diglin on Wed Apr 13, 2011 7:58 am

A Magento module will be published soon in the Magento Connect. The name is JFusion_Customer (or JFusion Customer). By Magento Connect it waits to be validated by the moderators that's why I cannot giive you the link
JFusion Team Developer - Magento plugin and JFusion core
Personnal website about Joomla/Magento integration - http://www.diglin.com
Engineer Computer Science for rissip http://www.rissip.com
User avatar
diglin
Developer
Developer
 
Posts: 241
Joined: Thu Feb 26, 2009 2:52 pm

Re: Magento Login with username

Postby mage on Fri Apr 29, 2011 8:39 am

this is awesome :D
.:mage[nto]::.
User avatar
mage
JFusion Newbie II
JFusion Newbie II
 
Posts: 22
Joined: Wed Apr 27, 2011 11:19 am
Location: Germany, Hannover

Re: Magento Login with username

Postby diglin on Fri Apr 29, 2011 2:02 pm

JFusion Team Developer - Magento plugin and JFusion core
Personnal website about Joomla/Magento integration - http://www.diglin.com
Engineer Computer Science for rissip http://www.rissip.com
User avatar
diglin
Developer
Developer
 
Posts: 241
Joined: Thu Feb 26, 2009 2:52 pm

Re: Magento Login with username

Postby mage on Sat Apr 30, 2011 2:02 pm

not working with magento set to master and joomla as slave with dual login yet because if you try to login with username joomla don't find it in master as it's searching for the email and than login does fail but else it's nice
we need to tell jfusion to use the username in magento to use for creating Accounts into joomla in username field
.:mage[nto]::.
User avatar
mage
JFusion Newbie II
JFusion Newbie II
 
Posts: 22
Joined: Wed Apr 27, 2011 11:19 am
Location: Germany, Hannover

Re: Magento Login with username

Postby diglin on Sat Apr 30, 2011 4:38 pm

The current Magento plugin doesn't support yet username. It needs to be updated to work with the new Magento module. I will take care of that.
JFusion Team Developer - Magento plugin and JFusion core
Personnal website about Joomla/Magento integration - http://www.diglin.com
Engineer Computer Science for rissip http://www.rissip.com
User avatar
diglin
Developer
Developer
 
Posts: 241
Joined: Thu Feb 26, 2009 2:52 pm

Re: Magento Login with username

Postby mage on Sat Apr 30, 2011 7:26 pm

that's what I try to do, works so far in all scenario expecting on user creation I cannot login with username until I think it manually. it's looking for correct email in magento before it creates the user at sync moment. where I find the function for this, just need to change the check with my simple username part I made I think cause in manual usersync of jfusion addmin it works fine


by the way

for my installation I use static attribute_id in query to fetch username from db, don't understand where it's saved before the var must be an array cause the other shit as last first name etc is in same table iam looking for

not my Problem, until I wanna share or must reinstall than it's changed to any random atribute id ツ
.:mage[nto]::.
User avatar
mage
JFusion Newbie II
JFusion Newbie II
 
Posts: 22
Joined: Wed Apr 27, 2011 11:19 am
Location: Germany, Hannover

Re: Magento Login with username

Postby diglin on Wed May 16, 2012 5:15 pm

You will find a new version of the module to support Username in Magento here is the link into Magento Connect http://www.magentocommerce.com/magento-connect/username-support-login-register-checkout-by-diglin.html
JFusion Team Developer - Magento plugin and JFusion core
Personnal website about Joomla/Magento integration - http://www.diglin.com
Engineer Computer Science for rissip http://www.rissip.com
User avatar
diglin
Developer
Developer
 
Posts: 241
Joined: Thu Feb 26, 2009 2:52 pm

Previous

Return to Magento

Who is online

Users browsing this forum: No registered users and 2 guests