src/ShopBundle/objects/db/TShopOrderStep/TShopStepShippingCore.class.php
public function ChangeShippingGroup()
    {
        $oBasket = TShopBasket::GetInstance();
        $this->oActiveShippingGroup = $oBasket->GetActiveShippingGroup();
        // check if the group is still valid. if not, reload using default
        if (!$this->oActiveShippingGroup || false == $this->oActiveShippingGroup->IsAvailable()) {
            $oBasket->SetActiveShippingGroup(null);
            $oBasket->SetBasketRecalculationFlag(true);
            $this->oActiveShippingGroup = $oBasket->GetActiveShippingGroup();
        }
        $iShippingGroupId = null;
        if (array_key_exists('shop_shipping_group_id', $this->aRequestData)) { //shop_payment_methode_id?
            $iShippingGroupId = $this->aRequestData['shop_shipping_group_id'];
            /** @var $oShippingGroup TdbShopShippingGroup */
            $this->oActiveShippingGroup = TdbShopShippingGroup::GetNewInstance();
            if (!$this->oActiveShippingGroup->Load($iShippingGroupId)) {
                // if the requested group was not found, fetch default from basket again
                if (is_null($this->oActiveShippingGroup)) {
                    $this->oActiveShippingGroup = $oBasket->GetActiveShippingGroup();
                }
            } else {
                $oBasket->SetActiveShippingGroup($this->oActiveShippingGroup);
                $oBasket->SetBasketRecalculationFlag(true);
            }
        }
    }
public function ChangeShippingGroup()
    {
        $oBasket = TShopBasket::GetInstance();
        $this->oActiveShippingGroup = $oBasket->GetActiveShippingGroup();
        // check if the group is still valid. if not, reload using default
        if (!$this->oActiveShippingGroup || false == $this->oActiveShippingGroup->IsAvailable()) {
            $oBasket->SetActiveShippingGroup(null);
            $oBasket->SetBasketRecalculationFlag(true);
            $this->oActiveShippingGroup = $oBasket->GetActiveShippingGroup();
        }
        $iShippingGroupId = null;
        if (array_key_exists('shop_shipping_group_id', $this->aRequestData)) { //shop_payment_methode_id?
            $iShippingGroupId = $this->aRequestData['shop_shipping_group_id'];
            /** @var $oShippingGroup TdbShopShippingGroup */
            $this->oActiveShippingGroup = TdbShopShippingGroup::GetNewInstance();
            if (!$this->oActiveShippingGroup->Load($iShippingGroupId)) {
                // if the requested group was not found, fetch default from basket again
                if (is_null($this->oActiveShippingGroup)) {
                    $this->oActiveShippingGroup = $oBasket->GetActiveShippingGroup();
                }
            } else {
                $oBasket->SetActiveShippingGroup($this->oActiveShippingGroup);
                $oBasket->SetBasketRecalculationFlag(true);
            }
        }
    }
public function ChangeShippingGroup ( ) { $ oBasket = TShopBasket :: GetInstance ( ) ; $ this -> oActiveShippingGroup = $ oBasket -> GetActiveShippingGroup ( ) ; // check if the group is still valid. if not, reload using default if ( ! $ this -> oActiveShippingGroup || false == $ this -> oActiveShippingGroup -> IsAvailable ( ) ) { $ oBasket -> SetActiveShippingGroup ( null ) ; $ oBasket -> SetBasketRecalculationFlag ( true ) ; $ this -> oActiveShippingGroup = $ oBasket -> GetActiveShippingGroup ( ) ; } $ iShippingGroupId = null ; if ( array_key_exists ( 'shop_shipping_group_id' , $ this -> aRequestData ) ) { //shop_payment_methode_id? $ iShippingGroupId = $ this -> aRequestData [ 'shop_shipping_group_id' ] ; /** @var $oShippingGroup TdbShopShippingGroup */ $ this -> oActiveShippingGroup = TdbShopShippingGroup :: GetNewInstance ( ) ; if ( ! $ this -> oActiveShippingGroup -> Load ( $ iShippingGroupId ) ) { // if the requested group was not found, fetch default from basket again if ( is_null ( $ this -> oActiveShippingGroup ) ) { $ this -> oActiveShippingGroup = $ oBasket -> GetActiveShippingGroup ( ) ; } } else { $ oBasket -> SetActiveShippingGroup ( $ this -> oActiveShippingGroup ) ; $ oBasket -> SetBasketRecalculationFlag ( true ) ; } } }
changes the shipping group to the one passed via post or get in
shippinggroupid=id.
changes the shipping group to the one passed via post or get in shippinggroupid = id .