NO BUG: AJAX Popup Woo Add to Cart [Variable Product]

Browser: All
OS: All
URL: Link to a page that illustrates this issue

When using the new AJAX popup for WooCommerce products, the add to cart button component does not show the product variations in the popup. The demo link I provided is a bricks playground showing this behaviour. The fruit and veggies products are variable, and we see the “Select Options” button rather than the variation choices in the popup. The wheat product is simple, and shows the add to cart as expected. On the actual product pages, the Add To Cart component behaves as expected.

Hi @tpod ,

Thanks for checking with us.
This is the expected result.
When you are inside a loop, the add to cart button will only show if it’s a simple product, otherwise, it will be the “Select Option” button which directs visitors to the single product page.
Just like in a WooCommerce loop / Shop page.

Regards,
Jenn

Are there any plans to fix this so that we see the variations options in the popup? This would be very useful to quickly choose options and add an item to cart, and greatly improve the WooCommerce experience in Bricks

1 Like

Hi @tpod ,

We don’t have any plan yet based on the idea board https://bricksbuilder.io/ideas/
Kindly submit one and we will review them :slight_smile:
Thanks for your time.

Regards,
Jenn

I would also love this.

I’ve tried this to add the variations, but the they don’t work properly. You choose a variant, click add to cart and it adds the product with no variant included. After the item is added to cart it seems to update the form and the variations start working (you can now see what’s out of stock) and when adding another the product variant gets added as it should.

<?php

  global $product;
if ( $product->is_type( 'variable' ) ) {
    $default_attributes = $product->get_default_attributes();
 
  
    woocommerce_variable_add_to_cart( $product, $default_attributes, array(), true );
} else {
    woocommerce_simple_add_to_cart();
}

?>

@itchycode @timmse @charaf Do you know if there’s a temporary workaround for this?

Hi @ChrisBeattie ,

I am not so sure what is the full code of your example and where you hook this.
Please create a new topic for your custom code issue.

Regarding the AJAX Popup + “Woo Quick View” support, we are already working on this improvement.

Regards,
Jenn

I just added this in a code block underneath the Add to Cart element for testing.

If this is in progress for improvement I can wait for it, depending on the timescale. Would you know if this is in the next update or not?

Hopefully, these will be ready soon.

Was this fixed in the new update?

Hi,

please check this article. There was an improvement on 1.10.2 version.

Best regards,
M