Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Out of Stock Broken

  • With just GP Premium, Generate Blocks and WooCommerce enabled, the Out of Stock looks completely button.

    How do I fix this?

    This is how it works with just these 3 plugins enabled, the product in stock:
    https://ibb.co/xY4zD9t

    This is what it looks like when the item is out of stock (button is completely wonky).
    https://ibb.co/FWDDFQv

    Thanks

  • Hi there,

    can you share a link to the page where I can see the wonky button ?

  • Hmmm…. Woocommerce should really remove the add to cart from when a product is out of stock.
    So I am not sure if theres other code or a another plugin thats changing that behaviour.

    However you can add this CSS to the site:

    
    .outofstock .quantity.buttons-added {
        display: none !important;
    }
    

    it will simply hide the quantity buttons if the product is out of stock.

  • well like I said in my original post, this is just with 3 plugins activated, so another plugin isn’t causing it…

  • Hi there,

    It seems that an inline style of display: block is being added to the “Add to Cart” button when an item is out of stock. Not sure of the source, but you can override it with the CSS that David provided above.

  • Is there any way for a better solution? Because once I select variants it shows broken again, and it doesn’t show out of stock immediately here, so people are bound to select it.

  • Swap my CSS for this:

    
    .outofstock .quantity.buttons-added,
    .woocommerce-variation-add-to-cart-disabled .quantity.buttons-added {
        display: none !important;
    }
    

    That will remove the Quantity buttons if either the item is out of stock or the variation cart is disabled.

  • This causes the quantity button to break on items in stock…

  • Add this CSS as well:

    .woocommerce-variation-add-to-cart-enabled .quantity.buttons-added {
        display: flex !important;
    }
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.