View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004123||OXID eShop (all versions)||1.02. Price calculations (discounts, coupons, additional costs etc.)||public||2012-06-05 19:32||2013-11-20 10:42|
|Status||resolved||Resolution||no change required|
|Target Version||4.7.10 / 5.0.10||Fixed in Version|
|Summary||0004123: 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 Reproduce||In 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
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 Information||For 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.
Reminder sent to: henrik.steffen
Hi. Could you please tell us on which version you reproduced this issue?
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.
||Hi! I was testing this in current 4.6.1 OXID demoshop.|
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: http://www.oxid-esales.com/fileadmin/files/TechDok/Archiv/oxency.pdf.
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: http://forum.oxid-esales.com/showthread.php?p=94053#post94053
||in this case as in example no changes required in code, just proper configuration of delivery cost rules. Manual how to do this: http://www.oxid-esales.com/en/support-services/documentation-and-help/archive-oxid-eshop/administer-eshop/set-shipping/lower-shipping-cost.html|