This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Input quantity and stock status in vertical results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Input quantity and stock status in vertical results Reply To: Input quantity and stock status in vertical results

#48744
Ernest MarcinkoErnest Marcinko
Keymaster

There is a nifty trick where you can do that by using a bit of custom CSS trickery

For the field use this:

<span class="{_stock_status}"></span>

This will apply a class name instead of the actual text. Now add this custom CSS somewhere (either in your theme settings or under here):

span.instock::after {
   content: 'In Stock';
   color: green;
}

span.outofstock::after {
   content: 'Out of Stock';
   color: #ff6600;
}

So the text appearing via CSS will depend on the stock status itself 🙂