Spark Theme add to cart fly out not working

Topic summary

A user is experiencing an issue with the Spark theme’s cart fly-out functionality.

Working scenario: The fly-out cart displays correctly when clicking “add to cart” on product detail pages.

Problem: In a custom product grid section, the same ‘product-form’ snippet is used, but instead of triggering the fly-out, it redirects users directly to the cart page.

Technical details: The custom section uses the ‘product-form’ render with identical parameters (product and current_variant) as the working product detail page.

Current status: The user is unsure what’s causing the discrepancy and whether there’s an additional setting or configuration needed to enable the fly-out behavior in custom sections.

Summarized with AI on November 10. AI used: claude-sonnet-4-5-20250929.

I’m using the Spark theme. I have the Cart settings set to Fly-out. It works when I click “add to cart” on a product details page. However, I have a custom section that lists products in a grid, and I added the ‘product-form’ to it to add the ‘add to cart’ button to each product in the grid, however, the fly out menu does not work from my custom section. It always redirects to the cart page after adding to the cart. I’m using the exact same ‘product-form’ that the product details page is using. Not sure what I’m doing wrong, or if there’s another setting somewhere that I’m missing


{%- for product in collections['new-arrivals'].products -%}
{%- assign grid_item_width = 'post-large--one-quarter medium--one-quarter small--one-half' -%}

{% render 'product-item' with
product: product
%}

{%
render 'product-form' with
product: product,
current_variant: product.variants.first
%}

{%- endfor -%}