Example #1
0
 public function cleanDownSelectedData()
 {
     $requestData = $this->checkoutSession->getShipperhqData();
     //  $key = $this->getKey($data);
     unset($requestData['checkout_selections']);
     $this->checkoutSession->setShipperhqData($requestData);
 }
 public function setSessionStuffOnRequest($request)
 {
     //TODO this should happen before this is passed to shippermapper.
     $requestData = $this->checkoutSession->getShipperhqData();
     //need a map so the request always uses the data in known structure
     $data = $requestData['checkout_selections'];
     if (!isset($data)) {
         return;
     }
     if ($data->getSelectedDate()) {
         $request->setDeliveryDateSelected($data->getSelectedDate());
     }
     if ($data->getCarrierGroupId()) {
         $request->setCarriergroupId($data->getCarrierGroupId());
     }
     if ($data->getCarrierId()) {
         $request->setCarrierId($data->getCarrierId());
     }
 }