Developer forum

Forum » Ecommerce - Standard features » Adding products to cart with stock < 1

Adding products to cart with stock < 1

Ólafur Einar Þorbergsson
Reply

Hi. I'm having problems when adding products to cart when stock is less than 1, even though the "never out of stock" field is checked.

The cart app is giving no indications of errors. The product simply doesn't get added. 

Could there be a setting that I'm overlooking? Or maybe some other suggestions?

 

Kind regards,

Ólafur


Replies

 
Ólafur Einar Þorbergsson
Reply

The solution is running on DW 9.13.4

 

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

Hi Ólafur

Are you using Units on some of these products? The stock for a given unit can also be marked as never out of stock:

I am looking into the code related to Never out of stock and there might be something not 100% ok in our end if not running in a live integrated environment - are you using live integration for stock validation or DW built in?

BR Nicolai

Votes for this answer: 1
 
Ólafur Einar Þorbergsson
Reply

Thanks for the reply. We're not using units on these products no. This is running in a live intergrated env and we are not using DW built in stock validation. To explain further, these are "on-demand" products, so they are generally not in stock.

I managed to find one that is in stock and that gets added to the cart without problems, so my thoughts were that something might not be 100% with the "never out of stock" field. Could there still be something off with the Never out of stock functionality? I'm pretty sure I've exhausted everything on my end and am stumped. I've checked all subscribers related to the cart, all settings I could find and so far, no dice.

Regards, Ólafur

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

Yeah - Never out of stock does not work with these 2 settings:

If they are enabled, it seems like it is not possible to add a product to cart that has 0 in them - regardless of the NOS setting.

Also this setting on the cart app does not currently work with NOS setting:

I have created a task to look into NOS and stock status checks that might change the behavior related to NOS and stock checks.

Can you verify the above 3 settings and see if those should be set?

BR Nicolai

Votes for this answer: 1
 
Ólafur Einar Þorbergsson
Reply

Yes! That seems to be the problem. I had Only show products "that are in stock" checked in the General settings. Thank you!

Kind regards, Ólafur

 
Dynamicweb Employee
Theint Thandar Soe
Reply

Hi,

I’m facing an issue with stock validation. We are using the stock matrix, but we currently have only one unit, 'METER'.

The problem occurs on the cart page: when a product reaches out-of-stock status, the order lines are automatically removed. This issue affects all order lines starting from the out-of-stock item, even though we have enabled the 'Never Out Of Stock' option in the stock matrix.

For example:

  • Cart 1: Customer A adds Item 001 with a quantity of 100, and the available stock is 100.
  • Cart 2: Customer B adds Item 001 with a quantity of 10 (or another amount).

If Customer A checks out and completes their order, Customer B’s order line disappears from their cart while they are still on the cart page. Additionally, the cart feed does not reflect any order lines, as shown in the attached screenshot.

Do you have any suggestions for resolving this issue? Specifically, we need to allow negative stock to better manage and validate stock on the cart page.

Could you also clarify if the 'Never Out Of Stock' setting works with the stock matrix and how it is intended to function? Is it possible that this behavior is a bug in the stock matrix?

This issue is occurring in Dynamicweb Application version 9.16.4.

Best Regards,
Theint

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

I do not think there is a bug.

On the cart page you can choose if products that are not available should be removed or 'ignored'. 

If you choose to ignore unavailable products, you can use validations on the stock level instead.

Never out of stock means that a given product is allowed to go under 1 - so if you have 0 in stock, you can still order 10 resulting in a negative stock level.

 

You must be logged in to post in the forum