Log in
Model

Button

Magento\Catalog\Model\ProductRender\Button

What it does

This class represents a button (typically 'Add to Cart') in product rendering contexts, such as product listings or catalog widgets.

It stores button-related data including the URL, POST data for form submissions, and whether the product has required options that must be configured before adding to cart.

Developers use this when rendering product information via API or custom product list implementations.

Public Methods

  • setPostData()
  • getPostData()
  • setUrl()
  • getUrl()
  • setRequiredOptions()
  • hasRequiredOptions()
  • getExtensionAttributes()
  • setExtensionAttributes()