1

I need to unset the multivalued session in magento, because i have added a large amount of values into session on the based of particular params like:

 $postData = $this->getRequest()->getPost();
        Mage::getSingleton('core/session')->setSummaryParameters($postData);
        Mage::unregister('ajax');
        Mage::unregister('ajax_result');
        Mage::register('ajax_summary',true); 
        Mage::getSingleton('core/session')->setMassageType($postData['type']);
        $masseur = $postData['name'];
        $productId = $postData['id'];
         $aw_booking_date = $postData['day'];
         $parameters['product'] = $productId;

         // prepare arguments for book now button based on selected data of reservation page
         $parameters['aw_booking_from_display'] = $aw_booking_date;
         $parameters['aw_booking_from'] = $aw_booking_date;

         $parameters['aw_booking_time_from[hours-am]'] = 12;
         $parameters['aw_booking_time_from[hours-pm]'] = 12;
         $parameters['aw_booking_time_from[hours]'] = date('h',strtotime($postData['time']));
         $parameters['aw_booking_time_from[minutes]'] = date('i',strtotime($postData['time']));
         $parameters['aw_booking_time_from[daypart]'] = date('a',strtotime($postData['time']));

         $time = strtotime($postData['time']);
         $minutes = '+'.$postData['minutes'].' minutes';
         $to_time = date("H:i", strtotime($minutes, $time));
         $parameters['aw_booking_time_to[hours-am]'] = 12;
         $parameters['aw_booking_time_to[hours-pm]'] = 12;
         $parameters['aw_booking_time_to[hours]'] = date('h',strtotime($to_time));;
         $parameters['aw_booking_time_to[minutes]'] = date('i',strtotime($to_time));;
         $parameters['aw_booking_time_to[daypart]'] = date('a',strtotime($to_time));;
         $parameters['qty'] = 1;

but when i refresh the page or comes different page to action controller page it gives me mysql syntax error. because now session have no value with valid params, please tell me how i can unset the session as i register. thanks in advance.

3

Ohh god finally i got the answer of this question,

Mage::getSingleton('core/session')->unsSummaryParameters();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.