Desciption
We are updating our SDK to work in Shopify store environment. For that we are doing a bunch of modifications to support this use case. I will list down the general philosophy we have followed.
Introduced a new mode in Account. For now this is an internal change and we have not exposed setting mode by customers. By default its WEB. We are controlling all the Shopify related changes using this new mode variable.
A new endpoint /shopify is added.
Added an async read and write mechanism in StorageManager since Shopify api returns a promise for reading and writing into localStorage. Also added a saveMode in StorageManager which will be used to determine which method to call.
Wrapped all window calls in a condition isWindowDefined to make sure we do not run into any runtime errors while calling window.
Desciption We are updating our SDK to work in Shopify store environment. For that we are doing a bunch of modifications to support this use case. I will list down the general philosophy we have followed.
mode
in Account. For now this is an internal change and we have not exposed setting mode by customers. By default itsWEB
. We are controlling all the Shopify related changes using this newmode
variable./shopify
is added.read
andwrite
mechanism inStorageManager
since Shopify api returns a promise for reading and writing into localStorage. Also added asaveMode
inStorageManager
which will be used to determine which method to call.window
calls in a conditionisWindowDefined
to make sure we do not run into any runtime errors while calling window.