How to access Magento customer's session from outside Magento?
You will need to enter in .domain.com
in Magentos admin->system->configuration->web->cookie domain
. Like erickthered mentioned, you will need to make the cookie available to your other subdomains in order for it to be read. This is the same with all web applications.
Reference: http://www.magentocommerce.com/wiki/modules_reference/english/mage_adminhtml/system_config/edit/web#session_cookie_management_field_descriptions
How to access Magento user's session from outside Magento?
I would recommend checking the path of the cookie that Magento sets. Most likely, it is set to /shop
, so the cookie will not be accessible to your file above it.
You can modify the path that Magento uses to set its cookie in the control panel under System -> Configuration -> Web (under the General heading) -> Session cookie management
How to Create session for customer login with session outside magento
Sessions are stored in database session table or something like that or, more commonly, in var/session. Depends on the install.
Login user programmatically in magento not working properly?
tells you how to log someone into magento "outside" of the magento. I do think the answer in the link is missing:
Mage::app('mysite');
before running the code. So something like this:Mage::app('mysite');
$session = Mage::getSingleton( 'customer/session' );
try
{
$session->login( $email, $password );
$session->setCustomerAsLoggedIn( $session->getCustomer() );
return true;
}
catch( Exception $e )
{
//error handling code
}
to create a user look here:http://inchoo.net/ecommerce/magento/programming-magento/programatically-create-customer-and-order-in-magento-with-full-blown-one-page-checkout-process-under-the-hood/
Related Topics
Checking If String Contains "Http://"
Facebook Graph API - Friends Using Application
Remove "(Optional)" Text from Checkout Fields in Woocommerce 3.4+
Bool Parameter from Jquery Ajax Received as Literal String "False"/"True" in PHP
Jquery Ajax Form Data Serialize Using PHP
Calling a Stored Procedure from Codeigniter's Active Record Class
Php-Font-Lib Must Either Be Installed via Composer or Copied to Lib/Php-Font-Lib
PHP Date Function Seven Days Previous
Difference Between $_Server['Document_Root'] and $_Server['Http_Host']
How to Split a String into an Array of Unicode Characters in PHP
In Magento 1.9.0.0 How to Enable Template Path Hint
Dynamic Class Property $$Value in PHP
How to Find "Related Items" in PHP
PHP Redirect with Http Query String Variables
Deny Direct Download of File Using PHP
Create an Assoc Array with Equal Keys and Values from a Regular Array