feat(medusa): cart context (#201)

- Adds a context field to Cart
- context is automatically populated with ip + user agent
- context can be updated via POST /store/cart/:id or set when creating via POST /store/cart
This commit is contained in:
Sebastian Rindom
2021-03-12 11:48:51 +01:00
committed by GitHub
parent a031f1f338
commit dd7b306333
20 changed files with 3499 additions and 657 deletions

View File

@@ -8,6 +8,9 @@ class SegmentService extends BaseService {
* e.g.
* {
* write_key: Segment write key given in Segment dashboard
* use_ga_id: If set to true the plugin will look for a ga_id in the cart
* context if present this id will be used as the Google Analytics
* client id.
* }
*/
constructor({ totalsService, productService }, options) {