Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 outofstock class on products page not appearing
Author « Topic »  

atlend
Advanced Member

USA
349 Posts

Pre-sales questions only
(More Details...)

Posted - 04/24/2025 :  10:33:05  
I wanted to add additional styling to the products page with items that are out of stock. I was hoping that with the update that it would also see down to the options level, but I noticed that even on my product that have no options and are out of stock, I don't see the css class anywhere on products. What could be causing that?

If I apply $noshowoutofstock=TRUE; it does hide the products correctly, but what I want to do is leave them visible so that people can click through and join the notification list. On the products page, I do want to add some styling, but don't see the .outofstock class anywhere on those products.

Vince
Administrator

43018 Posts

Posted - 04/25/2025 :  03:46:33  
Hi Atlend
It sounds like you are expecting a product which is out of stock to have an "outofstock" class added to the <div class="product"> no? If that's the case then no, that isn't added. But you could maybe style the product div based on having the outofstock class added to the buy button with something like this...

div.product:has(button.outofstock) { border: solid 1px red !important; }

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

atlend
Advanced Member

USA
349 Posts

Pre-sales questions only
(More Details...)

Posted - 04/26/2025 :  12:55:16  
Ah, I did not have the addtocart as part of the $productpagelayout. When I enabled it, the out of stock buttons were classed "ectbutton notifystock prodnotifystock" (for items that are out of stock and not stock controlled in the options) and the recent change to how the add to cart button works on the details page does not seem to extend out the products page. So if I have an item where all of the options are out of stock, the button classes on the products page don't appear to change. If it did, I can see how you can use that kind of css selecting method.
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000