I've recently upgraded Hikashop to the latest version (com_hikashop_business_2.1.0_2013-02-12.tar.gz) and once again this problem has re-occured.
Fine - I figure the code has been over-written. I just need to change it again...
But when I look at /home/mywebsite/public_html/plugins/hikashoppayment/bf_rbsbusinessgateway/bf_rbsbusinessgateway.php the code for the function onPaymentDisplay has changed from the fix given by Mohamed.
I now have:
function onPaymentDisplay(&$order,&$methods,&$usable_methods){
if (!$this->isShippingValid(@$order->shipping)) return false;
if (empty($order->total)) return false;
if (empty($methods)) return false;
$user = hikashop::loadUser(true);
$found = false;
foreach($methods as $method){
if($method->payment_type!='bf_rbsbusinessgateway') continue;
if ($method->payment_params->testMode) {
if (isset($user->user_tester)) {
if (@$user->user_tester != 'Y') continue;
}
}
else if (@$user->user_tester == 'Y') continue;
if(!@$method->payment_params->displayForGuests){
if (!$user) continue;
}
if (!$method->enabled) continue;
if(!empty($method->payment_zone_namekey)){
$zoneClass=hikashop::get('class.zone');
$zones = $zoneClass->getOrderZones($order);
if(!in_array($method->payment_zone_namekey,$zones)) continue;
}
$currencyClass = hikashop::get('class.currency');
$null=null;
$currency_id = intval(@$order->total->prices[0]->price_currency_id);
$currency = $currencyClass->getCurrencies($currency_id,$null);
if(!empty($currency) && !in_array(@$currency[$currency_id]->currency_code,$this->accepted_currencies)){
continue;
}
$usable_methods[$method->ordering]=$method;
$found = true;
}
return $found;
}
What do I need to change to get WorldPay to show up as an option before someone logs on like before?
Thanks,
Steve