EcommerceService
is used to get all the data related to the e-commerce operations such as get cart details, search products, add products to the wishlist. You can import the EcommerceService
from the experro-storefront
package.
EcommerceService
provides.
getCart
createCart
updateCustomerId
addToCart
updateCart
deleteItemInCart
search
facetedSearch
getFacetByCategoryName
getProductReviewsByProductId
addProductReview
addCouponCode
removeCouponCodeById
createWishlist
updateWishlist
deleteWishlist
getAllWishlists
getWishlistById
addItemToWishlist
deleteItemFromWishlistById
customerId
and line_items
as properties.
userId
as a customerId
and line_items
is an array of the products object that need to be added in cart.
customerId
and cartId
the properties.
userId
as a customerId
.
line_items
as the property.
line_items
is an array of the product object.
itemId
and line_item
as the properties.
itemId
is the id of the product item or line_item
you want to update in the cart.
itemId
as the property.
searchObj
as property.
searchObj
can have the following properties.
Property | Description | Type |
---|---|---|
search_term | Search text | String |
skip | Skip the result (for pagination) | Number |
limit | Limit the result (items per page) | Number |
sortBy | Sort the result by | String |
facets | Filters applied to the search | Array |
searchObj
property.
All
for a random search.
productId
as the property.
productId
and body
as the properties.
productId
is the provider_id_esi
of the particular product. body
is an object with following properties.
Property | Description | Type |
---|---|---|
title | Title of the review | String |
date_reviewed | Date of the submitting the review | Date |
text | Review comment | String |
rating | Rating between 1 to 5 | Number |
name | Name of the user | String |
email | Email of the user | String |
body
as the property.
body
is an object with following property
Property | Description | Type |
---|---|---|
coupon_code | Coupon code | String |
couponId
as property.
couponId
is an id of the particular coupon that should be removed.
body
property.
body
is an object with following property.
Property | Description | Type |
---|---|---|
customer_id | Logged in customer id | Number |
is_public | Make this wishlist public or not | Boolean |
name | Name of the wishlist | String |
items | Product items to add in wishlist. | Object |
wishlistId
and body
as the properties.
wishlistId
is an id of an existing wishlist. body
is an object.
wishlistId
property.
wishlist
by given id. It accepts an object with wishlistId
as property.
wishlistId
and body
as properties.
wishlistId
is an id of the existing wishlist in which item needs to be added.
The items
is an array of the object with product_id
and variant_id
properties.
wishlistId
and itemId
as properties.
wishlistId
is an id of the existing wishlist and itemId
is the product item id which is going to be deleted from wishlist.
This method is designed to handle newsletter subscriptions within the context of a BigCommerce store, for now.This function serves as a valuable tool for incorporating newsletter subscription functionality into a BigCommerce store. You only need to provide an
email-id
as an input parameter to enable the integration.