Developer forum

Forum » Ecommerce - Standard features » most frequently bought items not right?

most frequently bought items not right?

Anders Ebdrup
Anders Ebdrup
Reply

Hi Dynamicweb,

 

I have a question about the most frequently bought items as it seems to most bought items and not most frequently bought items as it sums the quantity bought and not the number of orderlines with the current product.

Is that assumption right?

 

Best regards, Anders


Replies

 
Nicolai Pedersen
Reply

Hi Anders

What loop are you referring to? I cannot find a most frequently bought loop...

BR Nicolai

 
Anders Ebdrup
Anders Ebdrup
Reply

Hi Nicolai,

 

We have this function: "GetFrequentlyBoughtItems" in "Dynamicweb\eCommerce\CustomerCenter\Renderer.vb" and the sql-statement sums the quantity here: Sum(EcomOrderLines.OrderLineQuantity) AS ProductAmount which I think should be: Count(EcomOrderLines.OrderLineProductID) AS ProductAmount.

 

Best regads, Anders

 
Christian Rud Skovgaard
Reply

Hi Anders,

This bug has been created as TFS-28533.

 

Kind regards

Christian

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Anders

The problem TFS#28533 "GetFrequentlyBoughtItems uses sum instead of count" has now been fixed in version 9.1.4

You are able to find this build in the download section:

http://doc.dynamicweb.com/releases-and-downloads/releases

Please contact Dynamicweb Support if you need any additional help regarding this.

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 
Mikkel Ulstrup
Reply

Hi,

 

Sorry for waking the dead here - but we are experiencing this problem again.

The module Customer Center has this loop GetLoop("FrequentlyBoughtItems").

It is listing the items that are bought with the highest quantity - not most frequently.

 

Has this bug re-introduced itself?

 

Testet in 9.6.12 and 9.7.4

 

Kind regards

Mikkel Ulstrup

 
Nicolai Pedersen
Reply

Hi Mikkel

Just checked the code - it is still using Count.

Only changes in the past 4 years is taking order contexts into consideration and handling BOM items.

BR Nicolai

 
Mikkel Ulstrup
Reply

Hi Nicolai,

 

We do have different contexts on the solution. I will check again and return.

Thank you for the quick reply!

 

- Mikkel

 
Mikkel Ulstrup
Reply

Hi again,

 

It works as expected. yes We were missing an orderstatus on the orders we got from the ERP system. 

 

Kind regards

Mikkel Ulstrup

 

You must be logged in to post in the forum