Artifi.Add To Cart()

Artifi.AddToCart()


This operation is used to commence process of adding product to cart. This method requires only invocation call on click of button(button which will be responsible to initiate process of adding product to the cart)


Response Information

Response body formats

On Success

On success, event object (which will be received at your end)will have data parameter. It will carry sample response as below:

{"action":"add-to-cart","data":{"custmizeProductId":"custmizeProductId value","userId":"userId value","productCode":"productCode Value","sku":"sku value","customAttributes":[],"attributes":[],"savedDesigns":[],"cartParams":"Text_Text=Add Text Here&Text_Font=Abril Fatface&Text_Color=#000000&Template_Group_Data=undefined","savedDesignStandardImages":[],"Text_Text":"Add Text Here","Text_Font":"Applied font name","Text_Color":"Text color value","Template_Group_Data":"undefined"}}


On Error

On error, this method will call back the JavaScript method in website which is specified in "errorCallback" parameter with error information.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.