View Issue Details

IDProjectCategoryView StatusLast Update
0004123OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2013-11-20 10:42
Status resolvedResolutionno change required 
PlatformallOSallOS Versionall
Product Version 
Target Version4.7.10 / 5.0.10Fixed in Version 
Summary0004123: Delivery costs for certain product category still don't work correctly

this issue has been reported several times in the past...

see for instance 0002357

it has been marked as resolved, but still, simple rules like having a certain delivery rule for items in a certain category don't work.


Books can generally be shipped cheaper than other goods in Germany.

So, shop should make a special delivery price for books... if the order just contains books, no other items.
Steps To ReproduceIn OXID demo shop add a new delivery rule: "Test" for Germany and add it to shipping set "Standard".

Set price range from 0 to 79.99
Price surcharge: 2.00 EUR
Once per basket
Sorting: 1500
No more rules.

Limit this delivery rule just to the category "Angebote".

Now add "Transportcontainer THE BARREL" (Art No. 3788) to your basket.

2,00 EUR will be calculated.

Works great so far!

Add another item, not from the "Angebote" category, like for instance:
"Kuyichi Ledergürtel JEVER" (Art. No. 3503)

The delivery fee will still be 2,00 EUR.

Additional InformationFor the isForBasket() method, it's sufficient, that only one of the items in the basket matches the rule.

I can't imagine one single scenario, where this would be a useful rule definition.

Now imagine the following:
You want to let the customer choose between the cheaper book devlivery service, and the faster "normal service". So you would create a delivery set for books, and you would limit the rule to the category of books for the books delivery set. Still, as soon as you add another item to the basket, you will be able to choose the "books delivery set", even if the basket might now contain heavy goods or whatever.

I think delivery cost settings and rules need to be refactored from scratch.

PHP Versionany
MySQL Versionany



2012-06-11 09:47

reporter   ~0006839

Reminder sent to: henrik.steffen

Hi. Could you please tell us on which version you reproduced this issue?


2012-06-11 14:47

reporter   ~0006851

This is basically a duplicate of 0001659, and as changes made there were rolled back in 4.4.7 (0002149), and the issue was moved to feature requests, it is reproducable in every version since 4.4.7.

The general problem is that oxDelivery::isForBasket is called in two places in oxDeliveryList, which have contradictory requirements, so if the isForBasket method is changed to meet the requirements of one call it will not meet the requirements of the other call.


2012-06-17 17:04

reporter   ~0006911

Hi! I was testing this in current 4.6.1 OXID demoshop.


2012-06-30 19:18

reporter   ~0007024

I looked into this again, the scenario you describe in "steps to reproduce" is not a bug imho, you have only one delivery set, and lower shipping costs if only certain articles are in basket can be set up right now according to this tutorial:
The rule definition "one article has to match" is OK i think for cost calculation inside one delivery set. Imagine you have heavy weight articles that cost 10€ extra for each article. Even if not all articles in basket are heavy weight, you still want to count the 10€ per article.

The second scenario described in "Additional Information" is somewhat different. You have 2 delivery sets, and here i agree, a delivery set should only be valid if all articles match at least one rule, because all articles will be delivered with this delivery set.

I wrote a small module that changes delivery set loading to check every article on its own, instead of the whole basket, and if one article has no matching rules for the delivery set, the delivery set cannot be selected. At first sight this resolves all related bugs, maybe someone could test:

Linas Kukulskis

2013-11-20 10:42

reporter   ~0009283

in this case as in example no changes required in code, just proper configuration of delivery cost rules. Manual how to do this: