Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ShoppingCart.java #127

Open
wants to merge 14 commits into
base: stable-ocp-3.11
Choose a base branch
from
108 changes: 108 additions & 0 deletions coolstore-gw/.factorypath

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public class ShoppingCart {


private String cartId;

public double cartItemTotal=0.0;

public double cartItemPromoSavings=0.0;
Expand All @@ -20,12 +21,26 @@ public class ShoppingCart {

public List<ShoppingCartItem> shoppingCartItemList = new ArrayList<ShoppingCartItem>();


public ShoppingCart(String cartId) {
this.cartId = cartId;
}

public ShoppingCart() {
}


public String toString() {
return ("cart: total: " + cartTotal + " sci list: " + shoppingCartItemList);
}


public String getCartId() {
return cartId;
}

public void setCartId(String cartId) {
this.cartId = cartId;
}
public double getCartItemTotal() {
return cartItemTotal;
}
Expand Down
7 changes: 5 additions & 2 deletions coolstore-gw/src/main/resources/static/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
s<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
Expand Down Expand Up @@ -34,12 +34,15 @@
<script type="text/javascript">
$(function () {
var url = window.location.search.match(/url=([^&]+)/);
console.log("**url Initial="+url);

if (url && url.length > 1) {
url = decodeURIComponent(url[1]);
} else {
url = "/api/api-docs";
}

console.log("**url Final="+url);

hljs.configure({
highlightSizeThreshold: 5000
});
Expand Down
Loading