antonythorpe / silvershop-jsonresponse
SilverShop submodule that provides JSON responses for cart updates
Installs: 35
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 1
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- php: ^8.1
- silvershop/core: dev-main
- silverstripe/cms: ^5
README
SilverShop submodule that provides JSON responses for cart updates
Based upon the excellent work of Mark Guinn with SilverShop Ajax.
How it works
Utilises the SilverShop extension points to provide a JSON response for cart changes.
Use Case
Enhanced UX utilising a MV* Javascript library.
Features
- Additional endpoint of
shoppingcart/get
to obtain a JSON copy of the cart - JSON includes urls to
addLink
,removeLink
,removeallLink
, andsetquantityLink
for each product item in the cart - JSON includes image link, height, width, and alt for each item in the cart
- Includes Subtotal and Grandtotal
- Extension points for all endpoints, plus also for Modifiers
Limitations
Variations or the clear method have not been used in production.
Requirements
Documentation
Support
None sorry