Skip to content

Commit 67218e7

Browse files
committed
deployed to maven
1 parent 61a1a0a commit 67218e7

File tree

2 files changed

+2
-33
lines changed

2 files changed

+2
-33
lines changed

README.md

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Add the following dependency to your POM file:
99
<dependency>
1010
<groupId>com.github.chen0040</groupId>
1111
<artifactId>java-magento-client</artifactId>
12-
<version>1.0.8</version>
12+
<version>1.0.9</version>
1313
</dependency>
1414
```
1515

@@ -345,37 +345,6 @@ System.out.println("cartTotal: " + JSON.toJSONString(cartTotal, SerializerFeatur
345345
```
346346

347347

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-
379348
# Notes
380349

381350
* http://devdocs.magento.com/guides/v2.1/howdoi/webapi/search-criteria.html

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.github.chen0040</groupId>
88
<artifactId>java-magento-client</artifactId>
9-
<version>1.0.9</version>
9+
<version>1.0.10</version>
1010

1111

1212

0 commit comments

Comments
 (0)