src/ShopBundle/objects/db/TShopShippingGroupList.class.php
public static function &GetShippingGroupsThatAllowPaymentWith($sPaymentInternalName)
    {
        $oList = &TdbShopShippingGroupList::GetAvailableShippingGroups();
        $bFound = false;
        $oShippingGroup = null;
        while (!$bFound && ($oShippingGroup = &$oList->Next())) {
            $oPaymentMethods = &$oShippingGroup->GetValidPaymentMethods();
            $oPayPal = $oPaymentMethods->FindItemWithProperty('fieldNameInternal', $sPaymentInternalName);
            if ($oPayPal) {
                $bFound = true;
            }
        }

        if (!$bFound) {
            $oShippingGroup = false;
        }

        return $oShippingGroup;
    }
public static function &GetShippingGroupsThatAllowPaymentWith($sPaymentInternalName)
    {
        $oList = &TdbShopShippingGroupList::GetAvailableShippingGroups();
        $bFound = false;
        $oShippingGroup = null;
        while (!$bFound && ($oShippingGroup = &$oList->Next())) {
            $oPaymentMethods = &$oShippingGroup->GetValidPaymentMethods();
            $oPayPal = $oPaymentMethods->FindItemWithProperty('fieldNameInternal', $sPaymentInternalName);
            if ($oPayPal) {
                $bFound = true;
            }
        }

        if (!$bFound) {
            $oShippingGroup = false;
        }

        return $oShippingGroup;
    }
public static function & GetShippingGroupsThatAllowPaymentWith ( $ sPaymentInternalName ) { $ oList = & TdbShopShippingGroupList :: GetAvailableShippingGroups ( ) ; $ bFound = false ; $ oShippingGroup = null ; while ( ! $ bFound && ( $ oShippingGroup = & $ oList -> Next ( ) ) ) { $ oPaymentMethods = & $ oShippingGroup -> GetValidPaymentMethods ( ) ; $ oPayPal = $ oPaymentMethods -> FindItemWithProperty ( 'fieldNameInternal' , $ sPaymentInternalName ) ; if ( $ oPayPal ) { $ bFound = true ; } } if ( ! $ bFound ) { $ oShippingGroup = false ; } return $ oShippingGroup ; }
search for a shipping group that supports the given payment type
returns false if nothing is found.

@param string $sPaymentInternalName

@return bool
search for a shipping group that supports the given payment type returns false if nothing is found .