Skip to content

Shopify cart.js ajax route with product tags included.

License

Notifications You must be signed in to change notification settings

rbkp/cart-json-with-tags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

cart-json-with-tags

A Shopify /cart ajax route with product tags included.

Used similarLy to to /cart.js, but includes the "product_tags" field. (Tags aren't included in /cart.js calls by default.)

There are subtle differences between using liquid in this fashion versus the results in cart.js, so please be careful of bugs. I have tried to mimic /cart.js as much as possible. See comments within the file for more info on these differences.

Example usage

const cart = await fetch('/cart?view=json-with-tags').then(res => res.json());

About

Shopify cart.js ajax route with product tags included.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages