View Single Post
  #6  
Old 07-05-2008, 04:59 AM
  rogue's Avatar 
rogue rogue is offline
 

X-Adept
  
Join Date: Apr 2007
Location: Loveland, Ohio
Posts: 770
 

Default Re: Retrieve $login variable outside of x-cart pages

Not very good coding practice but you can use a global variable to allow access to the data. To add this all you need is to add this line to any php module where $login is being either set and used.

Code:
global $login;

Then use the $login variable as you would normally.

To use the $login in a tpl module it will be more complicated. To access it on a tpl page you can use this code:

Code:
{php} global $login; $this->assign("login", $login); {/php}
__________________
Richard Williams
Rogue Wave Limited

Initial Inventory Imports
Daily Inventory Updates
Daily Inventory Reports
Drop Ship Support
Order Export to Shipper/Supplier
Shopping Feeds That Work
Programming for X-Cart

richard@roguewavelimited.com
http://www.roguewavelimited.com
Reply With Quote