# Function for adding product to cart

URL: https://shoptet.dev/news/frontend/function-for-adding-product-to-cart

August 31, 2020 · One min read
Pavel Husa

We want to make your work with templates easier, so we recently added a function for adding product to cart. It works on all templates and is possible to use it with miscellaneous products identificators. More on [https://developers.shoptet.com/home/shoptet-tools/editing-templates/how-to-properly-add-product-to-cart-with-javascript/](/templates/add-to-cart-javascript/) .

**Tags:**
- [Frontend](/news/tags/frontend/)
