Developer forum

Forum » Ecommerce - Standard features » Change behaviour of "A check for stock status"

Change behaviour of "A check for stock status"

Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

Hi,

On the cart we can configure "A check for stock status" which will not allow the customer to add more than the stock level to the cart.

I now have a requirement that the customer should still be allowed to add any amount, but they should receive a message stating that everything above the current stock level will be registered as a back order. I guess I cannot change the behaviour of this since it is a validation?

Would I be able to get there changing the template and for example looping through all order lines comparing order qty > stock qty for all products?

@foreach (LoopItem orderline in GetLoop("OrderLines")) {

Thanks,

Justin


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

You could use "Never out of stock" which will allow for ordering above the current stock level.

Then you an use "Expected delivery date" field on the product.

In your cart you can take a look at orderline qty and compare to stock level and display a message if qty is above stock level

Votes for this answer: 1
 
Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

Hey Nicolai, 

Thanks. After trying some stuff I'm not sure I understand the "A check for stock status" setting on a Cart level.

If the setting is unchecked, I was expecting that the user could add more than the stock into the cart, but it seems in the cart it will alwyas check this, and give a message:

Can I get the cart to skip that check or is it custom? (Seems so) 

For this customer I would need 2 situations:

1: the product is "NOS" can always be ordered in any amount without warning

2: the product has stock level. the customer can still order more than the stock level but will get a warning that some will be back-ordered

Cheers,

Justin

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

The setting on the cart module is related to running the stock state check during checkout for products that is not marked as NOS.

The quantifier you show is an implementation specific detail, probably Swift, that does not take NOS into account when rendering that field. We have recent activity on that, see https://doc.dynamicweb.com/forum?PID=1605&ThreadID=89112

 

You must be logged in to post in the forum