How to show "In stock" letters in product at shop page?

Hello everyone,

i have a question about my eccomerce websites.
Iam looking for solution how to show “In stock” on every single products which I have in stock. I dont need to show quantity. Just “In stock”.
Is there any chance to code it in VELO? Have you got any other way to do it?
I already tried app called Available inventory display but it doesnt work.
Thanks a lot for your response.
(please see attachement)

Hello,

To display “In stock” on every product that is available in your e-commerce website, there are a few different approaches you can consider:

VELO (formerly known as Corvid) - If you are using Wix as your e-commerce platform and have access to VELO (Velo by Wix) for custom coding, you can achieve this by modifying the product display code. Here’s a basic example of how you can implement it using VELO:
$w.onReady(function () {
// Fetch the product data from your database or backend
// Assuming you have an array of products with a “stock” property indicating availability

// Example data:
const products = [
{ name: “Product 1”, stock: true },
{ name: “Product 2”, stock: false },
// …
];

$w(“#productRepeater”).onItemReady(($item, itemData, index) => {
const product = products[index];
const stockLabel = product.stock ? “In stock” : “Out of stock”;
$item(“#stockLabel”).text = stockLabel;
});
});
In the above code, productRepeater refers to the repeater element displaying your products, and stockLabel is a text element within each item of the repeater that will display the stock status.

Custom code on other platforms - If you’re using a different e-commerce platform or CMS, you can still achieve this by customizing the code that generates your product listings. You would need to fetch the product data from your database or backend and modify the template that generates the product display, adding a conditional statement to display “In stock” or “Out of stock” based on the availability of the product. targetpayandbenefits

Third-party apps or plugins - Alternatively, you can explore third-party apps or plugins specific to your e-commerce platform that provide inventory management and display options. These apps usually offer features like displaying stock status, managing inventory, and updating product availability automatically.