Developer forum

Forum » Ecommerce - Standard features » Cap quantity on order lines?

Cap quantity on order lines?

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

We recently had a site where (we think) a bot created a quote for a number of order lines with a line quantity of 4111111111111110. This then breaks the Quotes section in the backend when  OrderMappingConfiguration tries to sum the total quantity of all lines:

Couple of questions:

1. Would it make sense for DW to limit the quantity per line somehow?
2. If not, should we do this ourselves? In a subscriber probably against line added/increased?
3. Should this bad data prevent the backend from loading or can this be handled more gracefully somehow?

Note, we had a Quote in our example, but the issue is the same for carts. And since these are open anonymously, it'll be easy to break someone's backend.

Imar


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Bump. Anyone?

 
Andrew Rushworth
Reply

Hi Imar,

What I've done is add a custom field to the settings where i store a max value.
I then use this value on the template to limit this on the UI.
I also validate on the server level by extending the LineAdded subscriber and max the quantity at this level.

Regards,

 

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply
This post has been marked as an answer

bugged by task #29448. Thanks.

Oleg QA

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

>> What I've done is add a custom field to the settings where i store a max value.
Thanks Andrew. That works, but it would be nice to have this built-in.

And thanks Oleg, looks like 29448 and related items will fix this in the product; nice!

Imar

 

You must be logged in to post in the forum