@@ -9,7 +9,7 @@ Add the following dependency to your POM file:
9
9
<dependency >
10
10
<groupId >com.github.chen0040</groupId >
11
11
<artifactId >java-magento-client</artifactId >
12
- <version >1.0.8 </version >
12
+ <version >1.0.9 </version >
13
13
</dependency >
14
14
```
15
15
@@ -345,37 +345,6 @@ System.out.println("cartTotal: " + JSON.toJSONString(cartTotal, SerializerFeatur
345
345
```
346
346
347
347
348
- The sample code below shows how to create a new guest shopping cart, add/update/delete items in the shopping cart:
349
-
350
- Note that creating guest shopping cart does not require login
351
-
352
- ``` java
353
- MagentoClient client = new MagentoClient (Mediator . url);
354
- String cartId = client. guestCart(). newCart();
355
-
356
- CartItem item = new CartItem ();
357
- item. setQty(1 );
358
- item. setSku(" product_dynamic_758" );
359
-
360
- // add new item to shopping cart
361
- item = client. guestCart(). addItemToCart(cartId, item);
362
- System . out. println(" cartItem: " + JSON . toJSONString(item, SerializerFeature . PrettyFormat ));
363
-
364
- // update item in the shopping cart
365
- item. setQty(3 );
366
- item = client. guestCart(). updateItemInCart(cartId, item);
367
- System . out. println(" cartItem: " + JSON . toJSONString(item, SerializerFeature . PrettyFormat ));
368
-
369
- // delete item in the shopping cart
370
- boolean deleted = client. guestCart(). deleteItemInCart(cartId, item. getItem_id());
371
-
372
- Cart cart = client. guestCart(). getCart(cartId);
373
- CartTotal cartTotal = client. getGuestCart(). getCartTotal(cartId);
374
-
375
- System . out. println(" cart: " + JSON . toJSONString(cart, SerializerFeature . PrettyFormat ));
376
- System . out. println(" cartTotal: " + JSON . toJSONString(cartTotal, SerializerFeature . PrettyFormat ));
377
- ```
378
-
379
348
# Notes
380
349
381
350
* http://devdocs.magento.com/guides/v2.1/howdoi/webapi/search-criteria.html
0 commit comments