Package Java

Examples of Java.ShoppingcartItem


                    cart.sort();
                    String curSymbol = "€";
                    double totalprice = 0.0;
                    session.setAttribute("carttoupdate", cart);
                    for (int i = 0; i < cart.size(); i++) {
                        ShoppingcartItem item = cart.get(i);
                        int amount = item.getAmount();
                        String photo = item.getPhoto();
                        double price = 0.00;
                        if("USD".equals(curCurrency))
                        {
                            curSymbol = "$";
                            double conversionRate = new CurrencyConvertor().getCurrencyConvertorSoap().conversionRate(Currency.EUR, Currency.USD);
                            price = (DatabaseKoppeling.getItemPrice(photo, item.getProduct()))*conversionRate;
                        } else {
                            price = DatabaseKoppeling.getItemPrice(photo, item.getProduct());
                        }
                        totalprice += price*amount;
                   
      out.write("\n");
      out.write("                        <tr>\n");
      out.write("                            <td>");
      out.print(photo);
      out.write("</td>\n");
      out.write("                            <td>");
      out.print(item.getProduct());
      out.write("</td>\n");
      out.write("                            <td>");
      out.print(item.getColor());
      out.write("</td>\n");
      out.write("                            <td>");
      out.print(curSymbol + new DecimalFormat("0.00").format(price));
      out.write("</td>\n");
      out.write("                            <td><input name=\"quantity");
View Full Code Here

TOP

Related Classes of Java.ShoppingcartItem

Copyright © 2015 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.