View Issue Details

IDProjectCategoryView StatusLast Update
0005780OXID eShop (all versions)4.07. Source code, Testpublic2014-06-26 10:12
ReporterJhonny2010 Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionunable to reproduce 
Product Version4.7.8 / 5.0.8 
Summary0005780: No calculating of delivery costs in basket if oxdelivey__paramend->value == iAmount
DescriptionWe have found a Bug in the oxDelivery-Class.

If you turn on the OXID feature which supports the calculating of delivery costs in the Basket you sometimes get no delivery costs although there is a fitting shipping cost rule.

Steps To ReproduceFor the shipping costs rule you are able to define a range for price, weight, size or amount of Basket contents.

If you have defined for Example an shipping cost rule which starts at 0kg weight und ends by 14kg weight, you will get this issue if the weight of your basket contents fits exactly 14kg. Then there will be no delivery costs shown in basket and no Deliveryset is shown in step 3 of checkout process.

I think the Problem is this code in Class: "oxDelivery" Method: "_checkDeliveryAmount".

if (
$iAmount >= $this->oxdelivery__oxparam->value
&&
$iAmount <= $this->oxdelivery__oxparamend->value ) {
    return true;
}

$iAmount is given to the method as a float.
$this->oxdelivery__oxparamend->value $this->oxdelivery__oxparam->value are strings.

The problem seems to by that PHP have issues hisself to compare float and string if there are no decimal places
in float values.

If iAmount is 13.99 or 14.01 all works fine.
TagsNo tags attached.
ThemeAll
BrowserAll
PHP Version5.4
Database Versionany

Activities

svetlana

2014-06-10 08:53

reporter   ~0009946

Reminder sent to: Jhonny2010

Hi,

Thanks for the issue, but we found some difficulties to reproduce this issue. Could you please send us more details how to do it.
It is how we reproducing it:
1. created shipping cost rule:
Condition: weight:0-14
2. created product with weight 14 kg
3. Try to purchase this product and for us shipping rule created in 1st step is used for calculating shipping cost.
Could you reproduce it on our demo shop? demoshop.oxid-esales.com/community-edition/