# Product Add to cart

### About Product Add to Cart Element

Summary: [Shopify Add To Cart](https://help.pagefly.io/manual/shopify-elements-product-add-to-cart/) element is a must-have for any product listed on a page or product page. It presents the "**Add to Cart**" button, which allows visitors to quickly and easily add products to their shopping cart with just one click.

You can also watch this video tutorial:

{% embed url="<https://youtu.be/4sw7OiT7_3k>" %}

### How To Access Product Add To Cart Element

* **Step 1**: Click on the “**Elements**” icon. Then, in the “**Shopify**” tab choose the Product add to cart
* **Step 2**: Drag and drop the the element into the page editor

You also can use the search function to find this element quickly

![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-c044045c0fdc28d4a559ed7f791f1edef8c6f764%2FAD_4nXe5NnOUVCLvRGbKsBZslV-EDx0Y8VpNK8cpeS76AEFhV57tbZUIb0dH-PLnaUGzqxhPAup7DmWx5aNOLfi0QIkqnAd7NYp8mofYTKuR_waDKroHR5GqMr7kkcB6NRBvlT8LIEU5yXvC2UdxLcCK8wkeyl8SO04IsaCo-BIcO7ipcIg.gif?alt=media)

### How To Configure Product Add To Cart Element

The Product Add to Cart element offers a variety of parameters to optimize appearance for the best possible conversion rate.

Click on the element in the page canvas to access its parameters in the General and Styling tabs, which are specific to this element.

#### General Configuration

| <p><strong>Product Source</strong> 2 options as explained above:</p><p>- <strong>Auto</strong>: If you're on the Product Page, the product assigned to this page will be displayed in the editor.</p><p>- <strong>Custom Product</strong>: Allows you to select a specific product to display. <strong>Note</strong>: The Product Source option is unavailable on Regular Pages.</p> | ![Product Source in General Setting of Product Add to Cart element](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-a1f8e323e29025bc571d7cd5708cbb83bd4bf699%2FAD_4nXemGdYXCPZZFLduDJh9rdT7Y8JoE3HICww8kFhoNfIiLKL-_SykI_2q7WvX9rUQ5FjYhLnJ3oZAIASLoJqCmyRPoiE7WuntjL1_ylhSbWm0e1VNEk-7x0OqG10rWksw62N6zuy881XeqF4q96Ghkeyl8SO04IsaCo-BIcO7ipcIg.png?alt=media) |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><strong>After Add To Cart Action</strong></p><p>There are 4 options after clicking on ATC button:</p><p>- Stay on the same page</p><p>- Go to cart page</p><p>- Go to checkout page</p><p>- Go to custom link</p>                                                                                                                                                                 | ![After Add To Cart Action](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-0a5d14b1b43f9c4060b6fc84d3d0f6bbff32fbed%2FAD_4nXfP2TQGh0FpBlayZGDJ4fFuiQ7nTCZuT9BeN_BiB6YCyquEuBTVdqjPDZjeqiOB1hJ2bMQ2pL9y9pr8LAXot7XPDSTqgWn4NY4XmKlXTa2O47BbWf66neWZNIHoaiXRetL8kYZ1mRpsQ9kt-r5keyl8SO04IsaCo-BIcO7ipcIg.gif?alt=media)                                          |
| **Button Type** There are 3 types of buttons: Text Only, Text With Icon and Icon Only                                                                                                                                                                                                                                                                                                | ![Button Type](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-686cb5b8d202dc2354a16a456ceaa23e8e1d9e61%2FAD_4nXcu7jcZmpiEz6vOChtrhsGX4bkEkTCA8VCDqgsg2bYF4EnW0UDOUXZuR_01bxEF3WdqKFX2wbFK1-kHVkztOJ87-51K976DyqF0BeAPrK9oulTAtfueppNqRSrM20S_qilbhg8YMDK3v3XoEhaNkeyl8SO04IsaCo-BIcO7ipcIg.gif?alt=media)                                                      |
| **Button Text** Enter the text to appear on the button (e.g., "**Add to cart**")                                                                                                                                                                                                                                                                                                     | ![Button Text](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-1b1d279ae59927e6a1cf78e83b3deb297ee35a76%2FAD_4nXfTBaM78SBeFxJ2lnmXRalUmpeMKnpj6qe3DD_tP0Ka6-RZGBLyf9wz8cKXE1sOgRC1M_sDia2YvH8Dj2FcA4WAyo6uRAEZ3UciSh8IsWSAKWrlk4cumKt3-sX47Rpq78eOoBESwftLnbdkDj2K9Akeyl8SO04IsaCo-BIcO7ipcIg.png?alt=media)                                                    |
| **Adding Text** Enter custom text displayed when a product is being added to the cart.                                                                                                                                                                                                                                                                                               | ![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-73ac7dc9419eef19661a9ad85fb1f9670c53ace4%2FAD_4nXfE-Z_Hx2IAoiaVCZXPZ4mNjUqqMkOoOY5CMwX1_ambzwaNLjzqi8h8y5KDQ1-567doBKyvMlE9lW_r408khnGZ9e6CnIVD_px2cN6bwqwfaSTxE5TWDbovlVZZkVcc2i1hmzFY7I_O2kIhDzkh7gkeyl8SO04IsaCo-BIcO7ipcIg.png?alt=media)                                                               |
| **Added Text** Enter custom text displayed when a product is successfully added.                                                                                                                                                                                                                                                                                                     | ![Added Text](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-a8410a919b4447dfce47014d7b182b82e5336a2a%2FAD_4nXeQiq64Te7FhxOGWgb69hF_g1-goITui94ISUmfF4nd2fdOEJvr-sJ0jwCVzDjPsb2T5a8UDk9QN42QgueD87lhQVBDbTE9_rJ8fXuw8f1Owzthmg6H7uBIQbzT-MuAmEYxM0fda3rjz-fbfKd3jgkeyl8SO04IsaCo-BIcO7ipcIg.png?alt=media)                                                     |
| **Sold out Text** Enter custom text displayed when a product is sold out.                                                                                                                                                                                                                                                                                                            | ![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-12f0d661f1558523be996e85663c6e6bb8e3a083%2FAD_4nXdoSZ1EWA5NPiYeb4LgrrfjTqvqfF5RuMzWNuPeeRD2Ho5z5ySGe9-m2xJFm1m5r_ZV-7H20txuOr_B25_iMzHNAVgk1PIGz6xjCqIwiLl7_0cOHOSH9BFoncfN5iZZ2gxKT7WHTPW4gzlGwWKtUAkeyl8SO04IsaCo-BIcO7ipcIg.png?alt=media)                                                               |
| **Enable Full Width** Make the "**Add to Cart**" button span the full width of its container.                                                                                                                                                                                                                                                                                        | ![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-9a793f850bcc83b56fd985a43ef55b3ff7ee0717%2FAD_4nXd_4aywqFXzHhRT5H9yn96f0anrTeXzoNBZwy32ZQGLhJ0Y2gWSxFmce8t9sZItSS6uA4R2si38XAnKfryoznjxjAiiH4D-ObspUjeP1wZgfTP7eD2godm6_PJzzQt0c2sJ0-YeYtUtjdfgL7iukeyl8SO04IsaCo-BIcO7ipcIg.gif?alt=media)                                                                 |

You can get further information about [ATTRIBUTES, VISIBILITY, ANIMATION parameters.](https://help.pagefly.io/manual/elements-style-settings/)

#### Styling Configuration

In the Styling tab, you can set up and apply Global style for the Add to Cart button. This allows you to define a consistent style that can be applied across multiple elements on your site.

Read more about [How to set up and how to use Global style](https://help.pagefly.io/manual/global-styling-feature/) here.

![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-a2c833f04fba8c7b3e740cebd3650cf8956c76b1%2FAD_4nXcb8OTIiWHhaBQdeMdG0DRgXeBRmnButBUbHFMk-CpkGljvYE9t0Epa8ueLRMDuvYYMf0NXljuCuF28Uws5lmR5G8yBvIoB0G1wedIwXcqj_FJiblFGfVUTha6Zmc9_DyKnTMd-93F2f-3idsRNkeyl8SO04IsaCo-BIcO7ipcIg.png?alt=media)

You also can customize how the button looks in the different states: Normal state, Mouse Over state, Active/Selected state, and Disabled state.

![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-a30d26bd4cb431cab127444073c3fc8332bff1eb%2FAD_4nXfn0exxloLhA9Fig4dYAPkmQOZgDzUWEgcnM2vs4EXKpMkfRnpeJipmst2VJ0MG_CK44MA4boZNZm17eY710z1yXdH68O_S8UkbQZ0bRW0AjQtV_litwpLwiBX_rNu-pN2u6-sck8XpQoBduJ3mtgkeyl8SO04IsaCo-BIcO7ipcIg.png?alt=media)

You can check more information about the [PageFly Element Styling](https://help.pagefly.io/manual/elements-style-settings/)

Check out how to create a [Buy It Now button](https://help.pagefly.io/manual/button-element/%23how-to-create-a-dynamic-checkout-button-buy-it-now) which redirects to the Checkout page.

### Common Cases

#### 1. Change Color Of The Add To Cart Button

To alter the color of the Add to cart button, click on the **Button > Styling tab**. There are 2 parameters to settings for the color of the button:

* **Content color**: select color for the button text
* **Background color**: select color for the button’s background

![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-067cc64c1612b5abb2fba038fa0da5b73a8b86d4%2FAD_4nXePwjR-xycf4ijipEQFuiZWSUpZM6pPqZ9Y3EcurxpeHlKiAwRIobNLFINUszB_Qccff_0lwIfNCmVTNQaMtRlpubpr7aXRHX7-O6qPJ4-4JN6APXLDNvwsvHZnuP11t1wTyEPcyVo5oU_KeXwFewkeyl8SO04IsaCo-BIcO7ipcIg.gif?alt=media)

#### 2. Add Hover State For Add To Cart Button

Adding hover state for the Add to cart button will make it more active in liveview and more call to action. To achieve that, click on the button, go to Styling tab and switch to “**Mouse over state**” and then start to change color for the Content color and Background color.

![](https://2800568630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLf471SpmnojuhVGQb2E%2Fuploads%2Fgit-blob-83f7bcc92ea368b2ae2a515c51365dd2ea79ac02%2FAD_4nXchTtAj_1w_JTirKk4KNoAawoLLgHsQcDcfylToVoq92Lj9sD9nhZxWw75ctYT4gKFWIYQulIIQSYLq3cfm724P7xNpkpxzmWfg11z8mQiMd7nJcKUNUTv-6CDt4sJCQCZ5weknrmXUOg6hVRODMAkeyl8SO04IsaCo-BIcO7ipcIg.gif?alt=media)

#### 3. Create A Sticky Product Add To Cart Button

To create a sticky "**Add to Cart**" button for a product, you need to create a section that contains the "**Add to Cart**" button element, then enable the "**Sticky Top**" function for that section. You can see the full details in the video below.

{% embed url="<https://www.youtube.com/watch?v=SyCsCorvFNU>" %}

### Tips And Best Practices

* Use contrasting colors for the content and background in the Normal and Hover states to make the button stand out.
* Keep the Add to Cart button on a single line for better visibility and user attention.

### Frequently Asked Questions

**1. What is a Product Add-To-Cart?**

The Add to Cart feature allows shoppers to save items in their cart, continue shopping, and complete the checkout process later after selecting all their desired items.

**2. What is the difference between Add-To-Cart and Order?**

The cart is a temporary holding space where shoppers can store items they intend to purchase, modify, or remove. An order is the next step after the shopper finalizes their selections and provides shipping, delivery, and payment information.

**3. What is the Add-To-Cart rate in marketing?**

The Add to Cart Rate is the percentage of shoppers who add at least one item to their cart per session.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.pagefly.io/page-structure-and-elements/shopify-elements/product/shopify-elements-product-add-to-cart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
