Skip to main content
Skip to main content

updateCollections - Product Module Reference

This documentation provides a reference to the updateCollections method. This belongs to the Product Module.

updateCollections(id, data, sharedContext?): Promise<ProductCollectionDTO>

This method is used to update a collection.

Example

const collection =
await productModuleService.updateCollections("pcol_123", {
title: "Summer Collection",
})

Parameters

idstringRequired
The ID of the collection to be updated.
The attributes of the collection to be updated
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ProductCollectionDTO>Required
The updated collection.

updateCollections(selector, data, sharedContext?): Promise<ProductCollectionDTO[]>

This method is used to update a list of collections matching the specified filters.

Example

const collections =
await productModuleService.updateCollections(
{
id: ["pcol_123", "pcol_321"],
},
{
title: "Summer Collection",
}
)

Parameters

The filters specifying which collections to update.
The attributes to be updated on the selected collections
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<ProductCollectionDTO[]>Required
The updated collections.
Was this section helpful?