Adds products to a specified collection.
You can only call this method when authenticated as a Wix app or Wix user identity.
function addProductsToCollection(
_id: string,
productIds: Array<string>,
): Promise<void>;
Collection ID.
IDs of the products to add to the collection, separated by commas.
import { products } from "@wix/stores";
async function addProductsToCollection(id, productIds) {
const response = await products.addProductsToCollection(id, productIds);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.