WIP: Add to cart element bug?

Browser: Chrome 130
OS: Windows 11

Hi! :grin:

The add to cart button element stays even when the product is out of stock and the stock option is also disabled. The add to cart is set to zero height, but it’s still there and there’s an extra gap. Maybe it should be set to display:none instead? I’m uploading screenshots.

How to reproduce:

  1. Create a single product template
  2. Add “add to cart” element along a few others
  3. Set some row gap like 16 or 20 pixels.
  4. Hide stock from the stock options
  5. Visit a product that’s out of stock

Cheers!

Hi,

thank you for the report. I’ll create an improvement task for this, as it’s not really a bug, but I can see the way it could be improved.

Thank you.
Matej

1 Like

Thank you, Matej! The WooCommerce elements have a lot of space for improvement :grin:
But it’s pretty great overall! Thanks for all the hard work!

1 Like

Hi @petlov ,

We’ve fixed this in Bricks 1.12 BETA, now available as a manual download (Bricks – Account)

Please let us know if you are still experiencing issues.

You can see the full changelog here: Bricks 1.12 Changelog – Bricks

As with any beta release, please do not use it on a production/live website. It is only meant for testing in a local or staging environment.

Best regards,
Matej

1 Like

Thanks very much, Matej! I’ll give it a go :slight_smile:

1 Like

Hello @Matej ,

this removal has actually led to an issue for our page.

We are using this plugin:

This hooks into the add to cart and displays the subscription form to get notified about a possible restock only when the add to cart is loaded.

Do you see a solution to this?
Thank you in advance for looking into this.

I can imagine that this is a issue for more similiar plugins and solutions.

Greetings!
Matthias

Hi @madse,

thank you for your input. You are right, because we don’t render it, it can cause the issue in your case. I was able to reproduce it locally and I’ve created a new internal bug report.

I guess that for a workaround, you can disable “Hide stock” option and hide the stock manually, if needed.

%root% .out-of-stock{
  display:none;
}

I’ve also set this topic back to WIP.

Thanks,
Matej