Alokai

deleteCustomerProductListItem

Removes an item from a customer product list. Works for both registered and guest customers.

This method communicates with the deleteCustomerProductListItem endpoint of the Vue Storefront API Middleware. In turn, it receives data from the deleteCustomerProductListItem or the Remove item from customer's product list endpoints exposed by SCAPI / OCAPI depending on the middleware configuration. *

Signature

export declare function deleteCustomerProductListItem(
	params: DeleteCustomerProductListItemParams
): Promise<DeleteCustomerProductListItemResult>;

Parameters

NameRequiredTypeDescription
paramsRequiredDeleteCustomerProductListItemParams

Returns

Returns a representation of a Product List Item.

Referenced Types

  • DeleteCustomerProductListItemParams
  • DeleteCustomerProductListItemResult

Examples

Remove the first item in the current customer's wishlist.

import { sdk } from '~/sdk.config.ts';

const lists = await sdk.commerce.getCustomerProductLists();
const wishlist = lists.find((list) => list.type === 'wish_list');

const customer = await sdk.commerce.deleteCustomerProductListItem({
  listId: wishlist.id,
  itemId: wishlist.customerProductListItems[0].id
});

On this page