Skip to main content

How to get the Add to Cart button class

In VenCorner Upsell Cross Sell, we offer a feature called Sticky Add to Cart. This feature ensures that the Add to Cart (ATC) button remains visible as users scroll down the page.

We provide an option called Add to Cart button isn't in viewport, which means the sticky Add to Cart button will only appear when the ATC button is not visible on the screen.

However, there are instances where the ATC button class we use does not match your theme. This guide will help you identify the correct ATC button class to ensure the feature functions properly.

Sticky Add to Cart

Steps to Find the Add to Cart Button Class

  1. Open the Product Page: Navigate to the product page on your website.

  2. Inspect the Page: Right-click on the page and select Inspect to open the developer tools.

  3. Locate the Add to Cart Button: Find the Add to Cart button in the HTML structure and copy its class name.

Sticky Add to Cart

For example, if the class name is product-form__submit button button--full-width button--secondary, copy this class name and paste it into the Add to Cart button selector field, then click Save.

Sticky Add to Cart

Conclusion

By following these steps, you can successfully identify the ATC button class and ensure the sticky Add to Cart feature works correctly.

If you have any questions or need further assistance, please don't hesitate to contact us. We're always happy to help!