Developer forum

Forum » Development » FavoriteProduct Quantity

FavoriteProduct Quantity

Martin Moen

Why is not the Quantity available through the FavoriteProduct class? Note is there, but not Quanity.


Morten Snedker Dynamicweb Employee
Morten Snedker

Hi Martin,

Quantity has deliberately been removed from the API in order to simplify the "Favorite product" concept. We (now) understand "favorite product" as nothing more than that, which is why we believe quantity is no longer relevant. 

Older templates and the data structure will reference Quantity, but it should be considered deprecated.

In relation to Favoritelists, in most cases, quantity becomes relevant when you use want to use Favoritelists for building cart content on a regular basis. But this has become a side-track for which is not meant. For this purpose context cart should be used instead.



Martin Moen

Hi Morten!

Thanks for your reply.
Yes, we use it as a way to create multiple lists, that may be used for building carts on a regular basis.

You say that context cart (guess you mean Order Contexts?) can be used, and I partially agree on that.
But as far as I can see there are no way for the customers to create their own order contexts?

An order context has to be pre defined by an administrator, in order for a customer to be able to add products to the order context.
We like the list because the customer can create their own lists, and be able to add products to multiple lists.

So unless I have missed something, we do not agree that order contexts can be used in the same way as lists.

Adrian Ursu Dynamicweb Employee
Adrian Ursu

Hi guys,

I can confirm that the way our customers are using "Favorites" functionality is more towards using it as a pre-saved list for quick shopping rather than the usual Favorite products used in the B2C scenarios.

We have encountered serious issues before because of the quantity field. @Morten if you remove the quantity from this functionality, we will need a separate way of saving shopping list presets.

Thank you,

Nicolai Pedersen
This post has been marked as an answer

I have added the quantity back in the new models. Out in next 9.13 update of ecommerce.dll

Votes for this answer: 1
Martin Moen

Perfect, thanks!


You must be logged in to post in the forum