Hi,
HikaShop 2.4.0 has been release on March 3th
www.hikashop.com/support/support/documen...ashop-changelog.html
We include the patch in HikaShop in our side but the current available package does not contain that patch yet ; they will be integrated in the next release.
Because you were using HikaShop 2.4.0 and we patched your website ; we didn't think that it was necessary to create an "hot patch" for HikaShop due to the fact that you were the only people currently concerned by that issue.
Like the modification of the hikashop_toFloat in the HikaShop helper
function hikashop_toFloat($val){
if(is_string($val) && preg_match_all('#-?[0-9]+#',$val,$parts) && count($parts[0])>1){
$dec=array_pop($parts[0]);
return (float) implode('',$parts[0]).'.'.$dec;
}
return (float) $val;
}
Ot the replacement in the class cart from
if(bccomp($cart->full_total->prices[0]->price_value_with_tax, 0, 5) <= 0) {
To
if(hikashop_toFloat($cart->full_total->prices[0]->price_value_with_tax) <= 0) {
There is also a modification in the class currency from
foreach(get_object_vars($total) as $key => $value){
if(!in_array($key,array('price_currency_id','price_orig_currency_id','price_value_without_discount_with_tax','price_value_without_discount','taxes')) && isset($price->$key)){
$total->$key = $total->$key + $price->$key;
}
}
To
foreach(get_object_vars($total) as $key => $value){
if(!in_array($key,array('price_currency_id','price_orig_currency_id','price_value_without_discount_with_tax','price_value_without_discount','taxes')) && isset($price->$key)){
$total->$key = $total->$key + (float)hikashop_toFloat($price->$key);
}
}
Regards,