View Issue Details

IDProjectCategoryView StatusLast Update
0006077OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2015-03-18 09:24
Reporterlus Assigned To 
PrioritynormalSeverityminorReproducibilityunable to reproduce
Status closedResolutionunable to reproduce 
PlatformOXID CEOSUbuntuOS Version14,04
Product Version4.8.7 / 5.1.7 
Summary0006077: delivery costs doubled
DescriptionSometimes delivery cost are doubled. On the final order page it is corrected but on "shipment & billing" page it is wrong.
We have articles with a special delivery rule: add abs 25 EUR for each article of this category in the basket. And they are only to be sent in two countries.

Steps To ReproduceIf you put one of it in the basket and checkout, everything is fine until you change your address country to a country in which the item could not be send. You get the message "there is no delivery found for this country..." you go back and change the country to one the item can be send to and procceed --> delivery cost is 50 EUR - it is doubled. If you proceed further costs are recalculated and will be correct in the final step.
Unfortunally, I was not able to reproduce the bug in the demo shop. I copied our staging server and upgraded it to the current version 4.9.3 and it's the same.
I know this means it is founded in our database, but none the less, if we can produce this error with our delivery rules, somebody else can also do so...
Additional InformationWell I'm experienced in PHP but a novice software developer. I tracked it down to the fact, that in models/oxdelivery.php the function "isForBasket" gets somehow called twice and will double the vaiables $this->_iItemCnt and $this->_iProdCnt through the function _isForArticle, which sums-up the values.
I fixed the problem for myself, by adding
        $this->_iItemCnt = 0;
        $this->_iProdCnt = 0;
at the beginning of function "isForBasket", as if I am correct, the intended use of the function is to check one deliveryrule if it should be applied to the basket. So there's no harm in resetting these values?
TagsNo tags attached.
ThemeAzure
BrowserAll
PHP Versionany
Database Versionany

Relationships

related to 0005645 closedQA Delivery Costs failed 

Activities

QA

2015-03-11 16:27

administrator   ~0010781

Last edited: 2015-03-12 11:50

Reminder sent to: lus

Could you please provide us with information on how to reproduce said issue ?

Thank you in advance.

lus

2015-03-11 17:03

reporter   ~0010782

Last edited: 2015-03-11 17:04

category A
category B ->subcat B2

delivery: standard, all countries (none selected)

deliveryrule (sort 500): subcat B2, abs +25 EUR, foreach article, country A
deliveryrule (sort 1000): category A, free shipping, countries A,B,C, apply no more rules
deliveryrule (sort 2000): category A, abs +16 EUR, once per cart, all other countries, apply no more rules


put an article of subcat B2 in basket, sign in or order without registration, but change your address to a country other than A.
proceed, and get message "no shippment found..."
go back, change your address to country A.
proceed and find deliverycost doubled (50 EUR),
proceed further to final checkout, find deliverycost correct (25 EUR)

lus

2015-03-11 17:13

reporter   ~0010783

If you like you can watch it on my staging server, I deactivated the module with my fix, so the effect is at large again. I also switched to azure theme, therefore you can be sure it has nothing to do with the template.

http://staging.groh-design.de

You'll have to use an article of categories "Wallspiration Poly" or "Wallspiration AD" which can only be delivered to germany or austria. Any other country will show the doubled deliverycosts.

QA

2015-03-12 15:38

administrator   ~0010785

Not reproducable in standard shop after creating identical rules as described by reporter.

martinwegele

2015-03-18 09:24

reporter   ~0010807

This is probably a duplicate of 0005650.