Depending on server setting, I have inside my
function mytheme_preprocess_hotel_booking_search_results(&$vars)
$vars exposing differences in serialized $data values
Example:
echo print_r ($vars['user']);
stdClass Object
(
[uid] => 0
[hostname] => 1.2.3.4
[roles] => Array
(
[1] => anonymous user
)
[session] => hotel_booking_defaults|a:5:{s:6:"nights";s:1:"2";s:6:"adults";s:1:"2";s:8:"children";s:1:"0";s:7:"smoking";i:3;s:8:"check_in";s:31:"Mer, 13 Apr 2011 00:00:00 +0200";}uc_cart_id|s:32:"7cd940f6a5264edae170d84e58114d8e";partial_payment_balance|s:38:"<span class="uc-price">35.00€</span>";cart_order|s:3:"209";
[cache] => 0
which keeps correctly 2 nights from the search form, while
inside the same mytheme_preprocess_hotel_booking_search_results function I have
echo print_r ($vars['form']['rooms'][]) exposing a different number of nights (3 in my case).
[data] => a:3:{s:7:"contact";i:0;s:13:"form_build_id";s:37:"form-f187f5a7ba487da313d6f1193c521865";s:21:"hotel_booking_details";a:5:{s:6:"nights";s:1:"3";s:6:"adults";s:1:"2";s:8:"children";s:1:"0";s:7:"smoking";i:3;s:8:"check_in";s:31:"Wed, 11 May 2011 00:00:00 +0200";}}
Is this normal?
Where those 3 nights come from?
Thanks
Comments
Comment #1
larowlanThe user data is unrelated to the search results.
It is a save of their previous search to auto-fill the form.
print_r($vars['form']['rooms']) should be an array of search results.
I'm going to need some more information here.
Comment #2
afagioliThanks!
Please do ask if you need further details
Comment #3
afagioli