creative designer

If you're someone that has a Shopify site but runs an offsite blog (like wordpress) you'll probably want to be able to show the cart contents on that blog. The usual AJAX API calls won't work since you'll hit CORS errors but JSONP comes to the rescue.

Not all AJAX API endpoints support JSONP, but the cart does. Throw some JavaScript on your offsite blog to grab the cart JSON and then show it however you like. That showing part is up to you to figure out but I'll throw some teeny bits of JS below to get you started on pulling the data in the first place. 

Some quick code examples

Vanilla / Plain JS:

grabbing the JS code...

jQuery example lives in the Shopify snippet repo if you need it.

Like to work with me?

Let's talk