MatthewRitchie Posted June 2, 2009 Share Posted June 2, 2009 Hello, I have a separate folder at www_root/new_folder alongside www_root/catalog to which I would like to extend the customer side session so information will only be shown if the customer has logged into the shop. I have tried a couple of suggestions but the do not work, can you help... matthew Link to comment Share on other sites More sharing options...
MatthewRitchie Posted June 2, 2009 Author Share Posted June 2, 2009 in the catalog/account.php I have print_($_SESSION) giving: Array ( [sESSION_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30) [cart] => shoppingCart Object ( [contents] => Array ( [144] => Array ( [qty] => 1 ) [37] => Array ( [qty] => 1 ) ) [total] => 59.98 [weight] => 0 [cartID] => [content_type] => [shiptotal] => 19.49 ) [language] => english [languages_id] => 1 [currency] => GBP [navigation] => navigationHistory Object ( [path] => Array ( [0] => Array ( => xaccount.php [mode] => NONSSL [get] => Array ( ) => Array ( ) ) ) [snapshot] => Array ( ) ) [customer_id] => 2 [customer_default_address_id] => 2 [customer_first_name] => Matthew [customer_country_id] => 222 [customer_zone_id] => 0 [output] => 1 ) but in new_folder/account.php with same code and using the catalog/includes/applicationtop.php I have: Array( [sESSION_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30) [cart] => shoppingCart Object ( [contents] => Array ( ) [total] => 0 [weight] => 0 [content_type] => [shiptotal] => 0 ) [language] => english [languages_id] => 1 [currency] => GBP [navigation] => navigationHistory Object ( [path] => Array ( [0] => Array ( => Array ( ) ) ) [snapshot] => Array ( => Array ( ) ) ) [output] => 1) => xaccount.php [mode] => NONSSL [get] => Array ( ) => xaccount.php [mode] => NONSSL [get] => Array ( ) hence the following is missing: [customer_id] => 2 [customer_default_address_id] => 2 [customer_first_name] => Matthew [customer_country_id] => 222 [customer_zone_id] => 0 Link to comment Share on other sites More sharing options...
MatthewRitchie Posted June 2, 2009 Author Share Posted June 2, 2009 customer id is not being shown by print_r and thus the account.php is not dupicating the same information. have a go, signin and login at www.bluegreentechnologies.com/shop I have links there to the other test files. Link to comment Share on other sites More sharing options...
MatthewRitchie Posted June 2, 2009 Author Share Posted June 2, 2009 I have tried both the contribution external sessions and changing the defined session path in configure.php neither work at present. I'll check back tomorrow, off to the pub to fix these square eyes. MJR Link to comment Share on other sites More sharing options...
MatthewRitchie Posted June 5, 2009 Author Share Posted June 5, 2009 Never mind, didnt think anyone would come up with a solution. SO I CHEATED in the catalog folder I made a new file and in it I simply included the external file, THATS ALL. extra work needed to make sure paths are still correct and links are working. e.g. <?PHP include('../new_folder/external_file.php'); ?> NOTE no white space before and after php tags otherwise you get the headers already sent error messages. THIS WAY, YOU CAN HAVE THE EXTERNAL FILE USE THE SESSION DATA BECAUSE IT IS EFFECTIVELY RUNNING IN THE CATALOG FOLDER BY WAY OF THE INCLUDE. I do this because I do not want excessive NEW files in the catalog folder when I add new applications/contributions. Also I can build quite complicated CRM/ERP like systems outside the catalog folder and self contained with in its own unique folder for that application. Matthew John Ritchie Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.