Hi I needed this functionality and had to edit uc_order/uc_order.ca.inc (also fixed an issue with postcodes in that they could be in upper or lower case!)
Old code:
function uc_order_condition_delivery_postal_code($order, $settings) {
// Trim the wildcard off the pattern.
$pattern = rtrim($settings['pattern'], '*');
// Return TRUE if the delivery postal code begins with the pattern.
return strpos($order->delivery_postal_code, $pattern) === 0;
}
My new code:
function uc_order_condition_delivery_postal_code($order, $settings) {
$found = FALSE;
$p_array = explode(',', $settings['pattern']);
foreach ($p_array as $p) {
// Trim the wildcard off the pattern (don't really need the * anyway!)
$pattern = rtrim($p, '*');
if(strpos(strtolower($order->delivery_postal_code), strtolower($pattern)) === 0) {
$found = TRUE;
}
}
// Return TRUE if the delivery postal code begins with the pattern.
return $found;
}Code probably could be a bit more efficient, but hope this helps someone
