lildog Posted July 25, 2008 Share Posted July 25, 2008 I am trying to register and recall later a session variable. Below it the basic code. Looks like it is pretty straight forward but there is no value for $wa_dest_tax_rate['rate'] on pages used later. Obviously I am doing something wrong. tep_session_register('wa_dest_tax_rate'); $wa_dest_tax_rate['rate']='9'; $wa_dest_tax_rate['resultcode']='0'; Thank you, lildog Link to comment Share on other sites More sharing options...
lildog Posted July 25, 2008 Author Share Posted July 25, 2008 I also tried this with the same effect: $wa_dest_tax_rate = array( 'rate' => '9', 'resultcode' => '0' ); Link to comment Share on other sites More sharing options...
lildog Posted July 27, 2008 Author Share Posted July 27, 2008 Here is a little more info. The code in my posts above is in a function file of it's own and is called when tep_get_tax_rate is called. The array is fine at the end of the file but is lost or wiped out when it leaves the function file. Link to comment Share on other sites More sharing options...
germ Posted July 27, 2008 Share Posted July 27, 2008 Is the code constructed like this: if ( !tep_session_is_registered('wa_dest_tax_rate') ) { tep_session_register('wa_dest_tax_rate'); } :unsure: If you just register it programatically without checking to see if it is already there you may be wiping out the contents. I've never screwed with session variables, this is just an "educated guess" on my part. :blush: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
lildog Posted July 28, 2008 Author Share Posted July 28, 2008 Thanks germ I thought that was it, but I did not add the session variable to the global declaration at the beginning of the function. global $customer_zone_id, $customer_country_id, $billto, $sendto, $cart, $customer_id, $order, $wa_dest_tax_rate; I didn't know it needed to be, but it does? lildog Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.