Adds a search hit to the cart.
The type of search that the hit belongs to.
The search hit to add to the cart.
The quantity of the hit to add to the cart.
import { addToCart } from '@nosto/search-js'// Add a single product to cartawait addToCart('serp', { productId: '123', skuId: 'sku-123'})// Add multiple quantitiesawait addToCart('serp', { productId: '456', skuId: 'sku-456'}, 3) Copy
import { addToCart } from '@nosto/search-js'// Add a single product to cartawait addToCart('serp', { productId: '123', skuId: 'sku-123'})// Add multiple quantitiesawait addToCart('serp', { productId: '456', skuId: 'sku-456'}, 3)
Adds a search hit to the cart.