Cart(reference) NOT working


#1

I am trying to build 2 different carts and create a reference…

Error :
moltin.js:16 Uncaught TypeError: Moltin.Cart is not a function


#2

Hi @MyNordicRoom

Are you able to provide me the version of the SDK you are using and where Moltin is instantiated?

Thanks :slight_smile:


#3

HI again ,thanks for fast reply

"@moltin/sdk": "^2.3.0", is version I use :)

#4

Hi @MyNordicRoom

Cart is not a function on 2.3.0 of the SDK. I recommend you upgrade the SDK version to the latest 3.12.0 to take advantage of using the Cart function SDK.

If you cannot upgrade, you must pass in the reference to AddProduct function as shown in the file below.

I hope this helps :slight_smile:


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.