Controller/ExpressCheckoutDispatcher.php
public function makeUniqueNames($deliverySetList)
    {
        $result = array();
        $nameCounts = array();

        foreach ($deliverySetList as $deliverySet) {
            $deliverySetName = trim($deliverySet->oxdeliveryset__oxtitle->value);

            if (isset($nameCounts[$deliverySetName])) {
                $nameCounts[$deliverySetName] += 1;
            } else {
                $nameCounts[$deliverySetName] = 1;
            }

            $suffix = ($nameCounts[$deliverySetName] > 1) ? " (" . $nameCounts[$deliverySetName] . ")" : '';
            $result[$deliverySet->oxdeliveryset__oxid->value] = $deliverySetName . $suffix;
        }

        return $result;
    }
public function makeUniqueNames($deliverySetList)
    {
        $result = array();
        $nameCounts = array();

        foreach ($deliverySetList as $deliverySet) {
            $deliverySetName = trim($deliverySet->oxdeliveryset__oxtitle->value);

            if (isset($nameCounts[$deliverySetName])) {
                $nameCounts[$deliverySetName] += 1;
            } else {
                $nameCounts[$deliverySetName] = 1;
            }

            $suffix = ($nameCounts[$deliverySetName] > 1) ? " (" . $nameCounts[$deliverySetName] . ")" : '';
            $result[$deliverySet->oxdeliveryset__oxid->value] = $deliverySetName . $suffix;
        }

        return $result;
    }
public function makeUniqueNames ( $ deliverySetList ) { $ result = array ( ) ; $ nameCounts = array ( ) ; foreach ( $ deliverySetList as $ deliverySet ) { $ deliverySetName = trim ( $ deliverySet -> oxdeliveryset__oxtitle -> value ) ; if ( isset ( $ nameCounts [ $ deliverySetName ] ) ) { $ nameCounts [ $ deliverySetName ] += 1 ; } else { $ nameCounts [ $ deliverySetName ] = 1 ; } $ suffix = ( $ nameCounts [ $ deliverySetName ] > 1 ) ? " (" . $ nameCounts [ $ deliverySetName ] . ")" : '' ; $ result [ $ deliverySet -> oxdeliveryset__oxid -> value ] = $ deliverySetName . $ suffix ; } return $ result ; }
Makes delivery set array with unique names

@param array $deliverySetList delivery list

@return array
Makes delivery set array with unique names