public function save()
    {
        Session::clear("Checkout.PostageID");
        
        // Extend our save operation
        $this->extend("onBeforeSave");

        // Save cart items
        Session::set(
            "Checkout.ShoppingCart.Items",
            serialize($this->items)
        );

        // Save cart discounts
        Session::set(
            "Checkout.ShoppingCart.Discount",
            serialize($this->discount)
        );

        // Update available postage
        if ($data = Session::get("Form.Form_PostageForm.data")) {
            $country = $data["Country"];
            $code = $data["ZipCode"];
            $this->setAvailablePostage($country, $code);
        }
    }
public function save()
    {
        Session::clear("Checkout.PostageID");
        
        // Extend our save operation
        $this->extend("onBeforeSave");

        // Save cart items
        Session::set(
            "Checkout.ShoppingCart.Items",
            serialize($this->items)
        );

        // Save cart discounts
        Session::set(
            "Checkout.ShoppingCart.Discount",
            serialize($this->discount)
        );

        // Update available postage
        if ($data = Session::get("Form.Form_PostageForm.data")) {
            $country = $data["Country"];
            $code = $data["ZipCode"];
            $this->setAvailablePostage($country, $code);
        }
    }
public function save ( ) { Session :: clear ( "Checkout.PostageID" ) ; // Extend our save operation $ this -> extend ( "onBeforeSave" ) ; // Save cart items Session :: set ( "Checkout.ShoppingCart.Items" , serialize ( $ this -> items ) ) ; // Save cart discounts Session :: set ( "Checkout.ShoppingCart.Discount" , serialize ( $ this -> discount ) ) ; // Update available postage if ( $ data = Session :: get ( "Form.Form_PostageForm.data" ) ) { $ country = $ data [ "Country" ] ; $ code = $ data [ "ZipCode" ] ; $ this -> setAvailablePostage ( $ country , $ code ) ; } }
Save the current products list and postage to a session.
Save the current products list and postage to a session .