src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php
public function SetActiveShippingGroup($oShippingGroup)
    {
        $bGroupAssigned = false;
        if (!is_null($oShippingGroup)) {
            $oAvailableShippingGroups = $this->GetAvailableShippingGroups();
            if (!is_null($oAvailableShippingGroups) && $oAvailableShippingGroups->IsInList($oShippingGroup->id)) {
                $bGroupAssigned = true;
                $this->oActiveShippingGroup = $oShippingGroup;

                // if a payment method is selected, then we need to make sure it is available for the selected shipping group.
                // since the SetActivePaymentmethod performs the check we call it.
                if (!is_null($this->GetActivePaymentMethod())) {
                    $this->SetActivePaymentMethod($this->GetActivePaymentMethod());
                }
            }
        } else {
            $this->oActiveShippingGroup = null;
            $this->SetActivePaymentMethod(null);
        }

        return $bGroupAssigned;
    }
public function SetActiveShippingGroup($oShippingGroup)
    {
        $bGroupAssigned = false;
        if (!is_null($oShippingGroup)) {
            $oAvailableShippingGroups = $this->GetAvailableShippingGroups();
            if (!is_null($oAvailableShippingGroups) && $oAvailableShippingGroups->IsInList($oShippingGroup->id)) {
                $bGroupAssigned = true;
                $this->oActiveShippingGroup = $oShippingGroup;

                // if a payment method is selected, then we need to make sure it is available for the selected shipping group.
                // since the SetActivePaymentmethod performs the check we call it.
                if (!is_null($this->GetActivePaymentMethod())) {
                    $this->SetActivePaymentMethod($this->GetActivePaymentMethod());
                }
            }
        } else {
            $this->oActiveShippingGroup = null;
            $this->SetActivePaymentMethod(null);
        }

        return $bGroupAssigned;
    }
public function SetActiveShippingGroup ( $ oShippingGroup ) { $ bGroupAssigned = false ; if ( ! is_null ( $ oShippingGroup ) ) { $ oAvailableShippingGroups = $ this -> GetAvailableShippingGroups ( ) ; if ( ! is_null ( $ oAvailableShippingGroups ) && $ oAvailableShippingGroups -> IsInList ( $ oShippingGroup -> id ) ) { $ bGroupAssigned = true ; $ this -> oActiveShippingGroup = $ oShippingGroup ; // if a payment method is selected, then we need to make sure it is available for the selected shipping group. // since the SetActivePaymentmethod performs the check we call it. if ( ! is_null ( $ this -> GetActivePaymentMethod ( ) ) ) { $ this -> SetActivePaymentMethod ( $ this -> GetActivePaymentMethod ( ) ) ; } } } else { $ this -> oActiveShippingGroup = null ; $ this -> SetActivePaymentMethod ( null ) ; } return $ bGroupAssigned ; }
set the active shipping group - return false, if an invalid group is selected.

@param TdbShopShippingGroup $oShippingGroup

@return bool
set the active shipping group - return false if an invalid group is selected .