The stock message should be displayed regardless of whether the allow-backorder flag is set or not.
Two simple changes are all that is needed to make stock values show regardless of whether you accept backorders or not for the product. Simply edit the /ConLib/BuyProductDialog.ascx.cs file with your favorite text editor. As always, make a backup copy of the original file before making these changes.
For the first change, find this section of code in the UpdateInventoryDetails() function:
Code: Select all
private void UpdateInventoryDetails(InventoryManagerData inv)
{
if ((inv.InventoryMode == InventoryMode.None) || (inv.AllowBackorder)) return;
if (inv.InStock > 0)
{
Code: Select all
private void UpdateInventoryDetails(InventoryManagerData inv)
{
if ((inv.InventoryMode == InventoryMode.None)) return;// || (inv.AllowBackorder)) return;
if (inv.InStock > 0)
{
Code: Select all
CommerceBuilder.Stores.Store store = Token.Instance.Store;
if (store.EnableInventory && store.Settings.InventoryDisplayDetails
&& (_Product.InventoryMode != InventoryMode.None) && (!_Product.AllowBackorder))
{
Code: Select all
CommerceBuilder.Stores.Store store = Token.Instance.Store;
if (store.EnableInventory && store.Settings.InventoryDisplayDetails
&& (_Product.InventoryMode != InventoryMode.None)) // && (!_Product.AllowBackorder))
{