Developer forum

Forum » Development » Wrong stock amount for stock locations in multiple languages

Wrong stock amount for stock locations in multiple languages

Anders Ebdrup
Anders Ebdrup
Reply

Dear Dyanmicweb,

 

We have an issue with not having the right stock amount after a purchase in this tag: Ecom:Product.Stock. We see the problem when checking the stock amount in another language, where the stock amount is then taken directly from the product and not from EcomStockUnit.

I may have located the issue to the method: DefaultStockLevelProvider.FindStockLevel(product As Product, unitId As String, stockLocation As StockLocation) As Double?, where I can get the right amount if changing this line:

                    stockUnits = productUnits.Where(Function(u) u.StockLocationId = stockLocation.ID OrElse u.StockLocationId = 0)
to:
                   stockUnits = productUnits.Where(Function(u) u.StockLocationId = stockLocation.GroupID OrElse u.StockLocationId = 0)

 

Please look into this issue.

 

Best regards, Anders


Replies

 
Nicolai Pedersen
Reply

Hi Anders

I have send this to QA for verification and fixing.

Thanks, Nicolai

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi Anders,

Please, comment what DW version do you use to catch the issue? We had TFS 76419 fixed bug like this on DW9.8.2

BR, Oleg QA 

 
Anders Ebdrup
Anders Ebdrup
Reply

Dear Oleg,

 

It is the latest ecommerce-project from the TFS.

 

Best regards, Anders

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi Anders,

I've tried to check case with product translaed in two languages and having stock matrix with location/units translated to the languages as well. I see the tag takes values from stock matrix correctly in default language but it's taken from genaral product stock initially (and not descrieased on checking out in the second language, descriased from matrix - OK) - video. Please confirm the issue described by me and your one are the same not to have misunderstanding.

BR, Oleg QA

 
Anders Ebdrup
Anders Ebdrup
Reply

Dear Oleg,

 

Yes, that seems to be the exact problem, thank you.

 

Best regards, Anders

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi all,

The issue  is now bugged by TFS 78037 submitted, it will be fixed in an upcoming DW release. Thanks for observing.

BR, Oleg QA 

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply
This post has been marked as an answer

Hi Anders

The problem regarding #78037 Ecom:Product.Stock tag outputs wrong amount in multiple languages

Has been fixed in Dynamicweb version 9.8.4

You are able to find this build in the download section

https://doc.dynamicweb.com/downloads/releases

Kind Regards
Dynamicweb Support
Kristian Kirholt

Votes for this answer: 1

 

You must be logged in to post in the forum