Hook: sortPaymentOrShippingMethods

Nachdem die erlaubten Zahlungs- und Versandmethoden ermittelt wurden

/*
 * -- Registration: --
 * $GLOBALS['MERCONIS_HOOKS']['sortPaymentOrShippingMethods'][] = array('myMerconisHookClass', 'mySortPaymentOrShippingMethods');
 *
 * -- Invocation: --
 * After the allowed payment or shipping methods have been determined
 *
 *
 * -- Parameters: --
 * 	1. $arr_methods - an array holding all the methods
 * 	2. $str_type - the method type (shipping or payment)
 *  
 * -- Return value: --
 * $arr_methods - the modified/sorted methods array
 *
 * -- Objective: --
 * implement custom sorting of payment or shipping methods
 *
 */

public function mySortPaymentOrShippingMethods($arr_methods, $str_type) {
	switch ($str_type) {
		case 'payment':
			krsort($arr_methods);
			break;
		case 'shipping':
			ksort($arr_methods);
			break;
	}
	
	return $arr_methods;
}