Skip to content

Product Buy Button

Displays the “Add to Cart” button for a single product on product detail pages. This block is part of the product detail page template and allows customers to add products to their cart.

  • Parent block: Must be inside commerce-connect/product-details-page
  • BigCommerce data: Product variant information, pricing, and inventory status
  • settingsId (string) - Settings configuration identifier
    • Default: ""
  • dropzone (string) - Dropzone identifier for block placement
    • Default: ""
  • HTML editing: Not supported
  • Multiple instances: Not allowed (only one per product page)
  • Spacing: Margin control available

This block must be placed inside the Single Product template (Product Details Page block). It cannot be used outside of this context.

From the demo video script, the buy button is typically placed below the product price and variant selectors:

Product Image Gallery
Product Title
Product Pricing
[Variant Selector if applicable]
→ Product Buy Button ← (Click to add to cart)
Product Description

When a customer clicks the button, the product is added to their BigCommerce cart, and the cart icon in the header updates immediately to reflect the new item count.

  • Uses standard block wrapper attributes
  • Dropzone ID applied when specified

The block uses context provided by the parent Product Details Page block:

  • commerce-connect/singleProductRefinedPayload - Simplified product data
  • commerce-connect/singleProductFullPayload - Complete product information
  • commerce-connect/singleProductSelectedProduct - Currently selected product variant
  • commerce-connect/singleProductDropzones - Available dropzone positions
  • commerce-connect/singleProductIsFetching - Loading state indicator

The add-to-cart action communicates with the BigCommerce backend to update the customer’s cart.

  • Verify the block is inside a Product Details Page parent block
  • Check that the product has available inventory in BigCommerce
  • Ensure the BigCommerce connection is active
  • Product may be out of stock in BigCommerce
  • Product may require variant selection before adding to cart
  • Check browser console for JavaScript errors