Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Login and Logout PHP link on a different website “php newbie coder”
 
deansmitty
Sr. Member
 
Total Posts:  132
Joined:  2008-02-23
 

Ok, I am going to be extending outside my comfort zone, lol.

I need to learn php so this is the best way to start “to start” lol.

I am using Joomla for my website and going to be using magento for my store. “I am not creating a bridge or anything complex “atleast not yet” There is a bridge with Jfusion however only with Magento 1.0

I guess to sum it up, I want to copy the php in header and put that php on my joomla site.

I hope what I want to accomplish is possible.

On the joomla website I simply want the links such as my cart, checkout, login etc to connect with the magento website

Here is code I have come up with so far from looking at websites etc.

“<?php
session_start();
?>
<a href=’http://www.instockdiecast.com/m/customer/account/’>My Accont</a>
<a href=’http://www.instockdiecast.com/m/wishlist/’>My Wishlist</a> <a href="http://www.instockdiecast.com/m/checkout/cart/">My Cart</a> <a href="http://www.instockdiecast.com/m/checkout/cart/">Checkout</a>
<?php
if(isset($_SESSION['username']) && $_SESSION['username']!="")
{
echo("<a href='http://www.instockdiecast.com/m/customer/account/logout//'>Logout</a> ");
echo($_SESSION['username']);// displays username
}
else
{
echo("<a href='http://www.instockdiecast.com/m/customer/account/login/'>Login</a> ");
}
?>”

 
Magento Community Magento Community
Magento Community
Magento Community
 
deansmitty
Sr. Member
 
Total Posts:  132
Joined:  2008-02-23
 

Please, does anyone know how to do this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ChipH
Jr. Member
 
Total Posts:  4
Joined:  2008-05-02
Cincinnati, OH
 

Are you trying to just link to the Magento pages, or are you trying to share login information between Joomla and Magento? If you’re just wanting to link over to the Magento pages, you don’t need any PHP. Just links to:

http://www.yourmagentosite.com/checkout/cart/
http://www.yourmagentosite.com/checkout/
http://www.yourmagentosite.com/customer/account/login/

in your Joomla header. I’m assuming by your wanting to use the Log In link that users do not log in to your Joomla site. If that’s the case then the only logging in that users do is through the Magento site and there is no need to share any login information between the two.

 
Magento Community Magento Community
Magento Community
Magento Community
 
vianetz
Guru
 
Avatar
Total Posts:  537
Joined:  2008-04-13
Munich, Germany
 

In case you want to share the login informations please use the forum search.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikefido
Guru
 
Avatar
Total Posts:  481
Joined:  2008-07-11
New Haven, CT
 

If you want to show your magento header area in the top of Joomla, you can do this following this method:

http://www.exploremagento.com/magento/run-magento-code-outside-of-magento.php

That should help you get started. See the first example especially, as that outputs certain blocks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
deansmitty
Sr. Member
 
Total Posts:  132
Joined:  2008-02-23
 

Thanks,

I simply want the login / logout to work when on the home page using Joomla, I tried to copy the code but I get errors.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top