NC 3.90
In \Views\Shared\_ProductBox.cshtml to show the stocks availability I use following code:
<div class="productIDandStock">
<!--Product ID-->
<div class="productId">@T("productid"): @Model.Id</div>
<!-- Availability -->
@if (productQuantity < 1)
{
<div class="out-of-stock">@T("products.availability.outofstock")</div>
}
@if (productQuantity > 1)
{
<div class="in-stock">@T("products.availability.instock")</div>
}
</div>
I have a plugin to control all stocks (Suppliers, Incoming Products, Returning and etc..).
There are some products which I don't currently have in stock, but I want to allow customers buy them. Anf if thete is a customer for this product, then I create Purchase from supplier and then receive it and the quantity will be updated.
So, I put following settings in inventory management:
Inventory method — Track inventory
Stock quantity — 0
Display availability — Checked
Low stock activity — Nothing
Backorders — Allow qty below 0
So, in this case it shows OUT OF STOCK... I need it to show IN STOCK like as if there are some stocks of this product.
How can I do it?
Is there any solution like this maybe? :) I am not much coder :)
<!-- Availability -->
@if (productQuantity < 1) (backorders = false)
{
<div class="out-of-stock">@T("products.availability.outofstock")</div>
}
@if (productQuantity > 1) (backorders = true)
{
<div class="in-stock">@T("products.availability.instock")</div>
}
Don't laugh at me! :) And thanks in advance. Hope someone helps me!