[pal-cvs 2811] [555] display order comfirmation page.

svnno****@sourc***** svnno****@sourc*****
2007年 9月 11日 (火) 22:29:16 JST


Revision: 555
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=555
Author:   shinsuke
Date:     2007-09-11 22:29:16 +0900 (Tue, 11 Sep 2007)

Log Message:
-----------
display order comfirmation page.

Modified Paths:
--------------
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/PompeiConstants.java
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/dxo/CustomerDxo.java
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/impl/CustomerServiceImpl.java
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/order/DeliveryMethodEditAction.java
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/order/DeliveryMethodListAction.java
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/checkout/PaymentSelectAction.java
    pompei/portlets/pompei-core/trunk/src/main/resources/jp/sf/pal/pompei/web/user/checkout/label.properties
    pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/cart/productList.html
    pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/checkoutConfirm.html
    pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/paymentSelect.html
    pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/userAddressSelect.html
    pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/userInfoEdit.html

Added Paths:
-----------
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/TaxService.java
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/impl/TaxServiceImpl.java
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/checkout/CheckoutConfirmAction.java
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/checkout/CheckoutConfirmPage.java


-------------- next part --------------
Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/PompeiConstants.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/PompeiConstants.java	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/PompeiConstants.java	2007-09-11 13:29:16 UTC (rev 555)
@@ -54,4 +54,6 @@
     public static final String CARD_EXPIRES = "cardExpires";
 
     public static final String DELIVERY_METHOD_ID = "deliveryMethodId";
+
+    public static final String CUSTOMERS_BASKET_ID_LIST = "customersBasketIdList";
 }

Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/dxo/CustomerDxo.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/dxo/CustomerDxo.java	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/dxo/CustomerDxo.java	2007-09-11 13:29:16 UTC (rev 555)
@@ -8,6 +8,7 @@
 import jp.sf.pal.pompei.exentity.Customers;
 import jp.sf.pal.pompei.web.admin.customer.CustomerConfirmPage;
 import jp.sf.pal.pompei.web.admin.customer.CustomerEditPage;
+import jp.sf.pal.pompei.web.user.checkout.CheckoutConfirmPage;
 import jp.sf.pal.pompei.web.user.checkout.UserAddressSelectPage;
 import jp.sf.pal.pompei.web.user.checkout.UserInfoEditPage;
 
@@ -49,4 +50,5 @@
 
     public void convert(UserAddressSelectPage page, AddressBook addressBook);
 
+    public void convert(AddressBook addressBook, CheckoutConfirmPage page);
 }

Added: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/TaxService.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/TaxService.java	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/TaxService.java	2007-09-11 13:29:16 UTC (rev 555)
@@ -0,0 +1,12 @@
+package jp.sf.pal.pompei.service;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+import jp.sf.pal.pompei.exentity.TaxRates;
+
+public interface TaxService extends Serializable{
+
+    public abstract TaxRates getTaxRatesByZoneId(BigDecimal zoneId);
+
+}
\ No newline at end of file


Property changes on: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/TaxService.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/impl/CustomerServiceImpl.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/impl/CustomerServiceImpl.java	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/impl/CustomerServiceImpl.java	2007-09-11 13:29:16 UTC (rev 555)
@@ -31,7 +31,7 @@
     private ZonesBhv zonesBhv;
 
     public void addCustomer(Customers customers) {
-
+//TODO??
     }
 
     public void addCustomer(AddressBook addressBook) {
@@ -132,7 +132,7 @@
         cb.setupSelect_Customers();
         //TODO needed?
         cb.setupSelect_Countries();
-        //TODO needed?
+        // needed(for tax)
         cb.setupSelect_Zones();
         cb.query().setAddressBookId_Equal(addressBookId);
         return getAddressBookBhv().selectEntity(cb);

Added: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/impl/TaxServiceImpl.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/impl/TaxServiceImpl.java	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/impl/TaxServiceImpl.java	2007-09-11 13:29:16 UTC (rev 555)
@@ -0,0 +1,59 @@
+package jp.sf.pal.pompei.service.impl;
+
+import java.math.BigDecimal;
+
+import jp.sf.pal.pompei.cbean.TaxRatesCB;
+import jp.sf.pal.pompei.exbhv.TaxClassBhv;
+import jp.sf.pal.pompei.exbhv.TaxRatesBhv;
+import jp.sf.pal.pompei.exentity.TaxRates;
+import jp.sf.pal.pompei.service.TaxService;
+
+public class TaxServiceImpl implements TaxService {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -601580607276944509L;
+
+    private TaxClassBhv taxClassBhv;
+
+    private TaxRatesBhv taxRatesBhv;
+
+    /* (non-Javadoc)
+     * @see jp.sf.pal.pompei.service.impl.TaxService#getTaxRatesByZoneId(java.math.BigDecimal)
+     */
+    public TaxRates getTaxRatesByZoneId(BigDecimal zoneId) {
+        TaxRatesCB cb = new TaxRatesCB();
+        cb.setupSelect_TaxClass();
+        cb.query().setTaxZoneId_Equal(zoneId);
+        return getTaxRatesBhv().selectEntity(cb);
+    }
+
+    /**
+     * @return taxClassBhv
+     */
+    public TaxClassBhv getTaxClassBhv() {
+        return taxClassBhv;
+    }
+
+    /**
+     * @param taxClassBhv 設定する taxClassBhv
+     */
+    public void setTaxClassBhv(TaxClassBhv taxClassBhv) {
+        this.taxClassBhv = taxClassBhv;
+    }
+
+    /**
+     * @return taxRatesBhv
+     */
+    public TaxRatesBhv getTaxRatesBhv() {
+        return taxRatesBhv;
+    }
+
+    /**
+     * @param taxRatesBhv 設定する taxRatesBhv
+     */
+    public void setTaxRatesBhv(TaxRatesBhv taxRatesBhv) {
+        this.taxRatesBhv = taxRatesBhv;
+    }
+}


Property changes on: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/impl/TaxServiceImpl.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/order/DeliveryMethodEditAction.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/order/DeliveryMethodEditAction.java	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/order/DeliveryMethodEditAction.java	2007-09-11 13:29:16 UTC (rev 555)
@@ -56,6 +56,9 @@
         } else {
             return DeliveryMethodListPage.class;
         }
+
+        // render FacesMessages
+        FacesMessageUtil.renderMessages();
         return null;
     }
 

Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/order/DeliveryMethodListAction.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/order/DeliveryMethodListAction.java	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/order/DeliveryMethodListAction.java	2007-09-11 13:29:16 UTC (rev 555)
@@ -33,8 +33,12 @@
     public Class<?> prerender() {
         List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
         getDeliveryMethodDxo().convert(
-                getDeliveryMethodSerivce().getDeliveryMethodDescriptionList(), list);
+                getDeliveryMethodSerivce().getDeliveryMethodDescriptionList(),
+                list);
         getDeliveryMethodListPage().setDeliveryMethodItems(list);
+
+        // render FacesMessages
+        FacesMessageUtil.renderMessages();
         return null;
     }
 

Added: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/checkout/CheckoutConfirmAction.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/checkout/CheckoutConfirmAction.java	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/checkout/CheckoutConfirmAction.java	2007-09-11 13:29:16 UTC (rev 555)
@@ -0,0 +1,363 @@
+package jp.sf.pal.pompei.web.user.checkout;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import jp.sf.pal.common.util.FacesMessageUtil;
+import jp.sf.pal.pompei.PompeiConstants;
+import jp.sf.pal.pompei.dxo.CustomerDxo;
+import jp.sf.pal.pompei.exentity.AddressBook;
+import jp.sf.pal.pompei.exentity.Customers;
+import jp.sf.pal.pompei.exentity.CustomersBasket;
+import jp.sf.pal.pompei.exentity.DeliveryMethodDescription;
+import jp.sf.pal.pompei.exentity.ManufacturersInfo;
+import jp.sf.pal.pompei.exentity.ProductsDescription;
+import jp.sf.pal.pompei.exentity.TaxRates;
+import jp.sf.pal.pompei.fee.DeliveryMethodCalculator;
+import jp.sf.pal.pompei.service.CartService;
+import jp.sf.pal.pompei.service.CustomerService;
+import jp.sf.pal.pompei.service.DeliveryMethodSerivce;
+import jp.sf.pal.pompei.service.ManufacturerService;
+import jp.sf.pal.pompei.service.ProductService;
+import jp.sf.pal.pompei.service.TaxService;
+import jp.sf.pal.pompei.util.SessionUtil;
+
+import org.seasar.framework.container.ComponentNotFoundRuntimeException;
+import org.seasar.framework.container.CyclicReferenceRuntimeException;
+import org.seasar.framework.container.S2Container;
+import org.seasar.framework.container.TooManyRegistrationRuntimeException;
+import org.seasar.teeda.extension.annotation.takeover.TakeOver;
+import org.seasar.teeda.extension.annotation.takeover.TakeOverType;
+
+public class CheckoutConfirmAction implements Serializable {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1684922335841191730L;
+
+    /**
+     * 
+     */
+    private CheckoutConfirmPage checkoutConfirmPage;
+
+    private CustomerService customerService;
+
+    private CartService cartService;
+
+    private ProductService productService;
+
+    private ManufacturerService manufacturerService;
+
+    private DeliveryMethodSerivce deliveryMethodSerivce;
+
+    private TaxService taxService;
+
+    private CustomerDxo customerDxo;
+
+    private S2Container container;
+
+    public Class<?> initialize() {
+        return null;
+    }
+
+    public Class<?> prerender() {
+        // check login
+        String remoteUser = FacesContext.getCurrentInstance()
+                .getExternalContext().getRemoteUser();
+        if (remoteUser == null) {
+            return UserInfoEditPage.class;
+        }
+
+        // check user info
+        Customers customers = getCustomerService().getCustomers(remoteUser);
+        if (customers == null) {
+            return UserInfoEditPage.class;
+        }
+
+        Map<String, Object> orderProcessMap = getOrderProcessMap();
+        if (orderProcessMap == null) {
+            // expires session
+            //TODO put message
+            return UserInfoEditPage.class;
+        }
+
+        List<CustomersBasket> baskets = getCartService().getCustomersBasket(
+                customers.getCustomersId());
+        if (baskets.isEmpty()) {
+            // clean up in the cart
+            //TODO put message
+            return UserInfoEditPage.class;
+        }
+
+        List<BigDecimal> customersBasketIdList = new ArrayList<BigDecimal>();
+
+        BigDecimal subTotalPrice = new BigDecimal(0);
+        List<Map<String, Object>> products = new ArrayList<Map<String, Object>>();
+        // TODO Dxo... it may be difficult..
+        for (CustomersBasket basket : baskets) {
+            customersBasketIdList.add(basket.getCustomersBasketId());
+            subTotalPrice = subTotalPrice.add(basket.getFinalPrice());
+            ProductsDescription pd = getProductService()
+                    .getProdcutsDescription(basket.getProductsId());
+            ManufacturersInfo mi = getManufacturerService()
+                    .getManufacturesInfo(
+                            basket.getProducts().getManufacturersId());
+            Map<String, Object> map = new HashMap<String, Object>();
+            map.put("customersBasketId", basket.getCustomersBasketId());
+            map.put("productsName", pd.getProductsName());
+            map.put("productsUrl", pd.getProductsUrl());
+            map.put("productsModel", basket.getProducts().getProductsModel());
+            map.put("manufacturersName", mi.getManufacturers()
+                    .getManufacturersName());
+            map.put("quantity", basket.getCustomersBasketQuantity());
+            map.put("productsPrice", basket.getProducts().getProductsPrice());
+            map.put("finalPrice", basket.getFinalPrice());
+            products.add(map);
+        }
+        getCheckoutConfirmPage().setSubTotalPrice(subTotalPrice);
+        getCheckoutConfirmPage().setCustomersBasketItems(products);
+
+        orderProcessMap.put(PompeiConstants.CUSTOMERS_BASKET_ID_LIST,
+                customersBasketIdList);
+
+        // address
+        String deliveryAddressBookId = (String) orderProcessMap
+                .get(PompeiConstants.DELIVERY_ADDRESS_BOOK_ID);
+        if (deliveryAddressBookId == null) {
+            //TODO put message
+            return UserInfoEditPage.class;
+        }
+        AddressBook deliveryAddressBook;
+        try {
+            deliveryAddressBook = getCustomerService().getAddressBook(
+                    new BigDecimal(deliveryAddressBookId));
+        } catch (NumberFormatException e) {
+            //TODO put message(IllegalState..)
+            return UserInfoEditPage.class;
+        }
+        if (deliveryAddressBook == null) {
+            //TODO put message
+            return UserInfoEditPage.class;
+        }
+        getCustomerDxo().convert(deliveryAddressBook, getCheckoutConfirmPage());
+
+        //  tax
+        TaxRates taxRates = getTaxService().getTaxRatesByZoneId(
+                deliveryAddressBook.getZones().getZoneId());
+        if (taxRates == null) {
+            //TODO put message(IllegalState..)
+            return UserInfoEditPage.class;
+        }
+        BigDecimal tax = subTotalPrice.multiply(taxRates.getTaxRate()).divide(
+                new BigDecimal(100));
+        getCheckoutConfirmPage().setTax(tax);
+
+        // total
+        getCheckoutConfirmPage().setTotalPrice(subTotalPrice.add(tax));
+
+        // payment
+        String paymentMethod = (String) orderProcessMap
+                .get(PompeiConstants.PAYMENT_METHOD);
+        if (paymentMethod == null) {
+            //TODO put message
+            return UserInfoEditPage.class;
+        }
+        getCheckoutConfirmPage().setPaymentMethodName(
+                getCheckoutConfirmPage().getLabelHelper().getLabelValue(
+                        paymentMethod));
+
+        // deliveryMethod
+        String deliveryMethodId = (String) orderProcessMap
+                .get(PompeiConstants.DELIVERY_METHOD_ID);
+        if (deliveryMethodId == null) {
+            //TODO put message
+            return UserInfoEditPage.class;
+        }
+        DeliveryMethodDescription dmd;
+        try {
+            dmd = getDeliveryMethodSerivce().getDeliveryMethodDescription(
+                    new BigDecimal(deliveryMethodId));
+            getCheckoutConfirmPage().setDeliveryMethodName(
+                    dmd.getDeliveryMethodName());
+        } catch (NumberFormatException e) {
+            //TODO put message(IllegalState..)
+            return UserInfoEditPage.class;
+        }
+
+        // delivery fee
+        String deliveryMethodClass = dmd.getDeliveryMethod().getDeliveryClass();
+        try {
+            DeliveryMethodCalculator dmc = (DeliveryMethodCalculator) getContainer()
+                    .getComponent(deliveryMethodClass);
+            getCheckoutConfirmPage().setDeliveryPrice(
+                    dmc.calculate(baskets, deliveryAddressBook));
+        } catch (ComponentNotFoundRuntimeException e) {
+            //TODO put message
+            //TODO logger
+        } catch (TooManyRegistrationRuntimeException e) {
+            //TODO put message
+            //TODO logger
+        } catch (CyclicReferenceRuntimeException e) {
+            //TODO put message
+            //TODO logger
+        }
+
+        // render FacesMessages
+        FacesMessageUtil.renderMessages();
+        return null;
+    }
+
+    @TakeOver(type = TakeOverType.NEVER)
+    public Class<?> doConfirm() {
+        //TODO
+        return null;
+    }
+
+    @TakeOver(type = TakeOverType.NEVER)
+    public Class<?> doCancel() {
+        SessionUtil.removeFromLocalScope(getCheckoutConfirmPage()
+                .getOrderProcessId());
+        //TODO put message (cancel order process)
+        return UserInfoEditPage.class;
+    }
+
+    private Map<String, Object> getOrderProcessMap() {
+        return (Map<String, Object>) SessionUtil
+                .getFromLocalScope(getCheckoutConfirmPage().getOrderProcessId());
+    }
+
+    /**
+     * @return checkoutConfirmPage
+     */
+    public CheckoutConfirmPage getCheckoutConfirmPage() {
+        return checkoutConfirmPage;
+    }
+
+    /**
+     * @param checkoutConfirmPage 設定する checkoutConfirmPage
+     */
+    public void setCheckoutConfirmPage(CheckoutConfirmPage checkoutConfirmPage) {
+        this.checkoutConfirmPage = checkoutConfirmPage;
+    }
+
+    /**
+     * @return customerService
+     */
+    public CustomerService getCustomerService() {
+        return customerService;
+    }
+
+    /**
+     * @param customerService 設定する customerService
+     */
+    public void setCustomerService(CustomerService customerService) {
+        this.customerService = customerService;
+    }
+
+    /**
+     * @return cartService
+     */
+    public CartService getCartService() {
+        return cartService;
+    }
+
+    /**
+     * @param cartService 設定する cartService
+     */
+    public void setCartService(CartService cartService) {
+        this.cartService = cartService;
+    }
+
+    /**
+     * @return productService
+     */
+    public ProductService getProductService() {
+        return productService;
+    }
+
+    /**
+     * @param productService 設定する productService
+     */
+    public void setProductService(ProductService productService) {
+        this.productService = productService;
+    }
+
+    /**
+     * @return manufacturerService
+     */
+    public ManufacturerService getManufacturerService() {
+        return manufacturerService;
+    }
+
+    /**
+     * @param manufacturerService 設定する manufacturerService
+     */
+    public void setManufacturerService(ManufacturerService manufacturerService) {
+        this.manufacturerService = manufacturerService;
+    }
+
+    /**
+     * @return customerDxo
+     */
+    public CustomerDxo getCustomerDxo() {
+        return customerDxo;
+    }
+
+    /**
+     * @param customerDxo 設定する customerDxo
+     */
+    public void setCustomerDxo(CustomerDxo customerDxo) {
+        this.customerDxo = customerDxo;
+    }
+
+    /**
+     * @return deliveryMethodSerivce
+     */
+    public DeliveryMethodSerivce getDeliveryMethodSerivce() {
+        return deliveryMethodSerivce;
+    }
+
+    /**
+     * @param deliveryMethodSerivce 設定する deliveryMethodSerivce
+     */
+    public void setDeliveryMethodSerivce(
+            DeliveryMethodSerivce deliveryMethodSerivce) {
+        this.deliveryMethodSerivce = deliveryMethodSerivce;
+    }
+
+    /**
+     * @return taxService
+     */
+    public TaxService getTaxService() {
+        return taxService;
+    }
+
+    /**
+     * @param taxService 設定する taxService
+     */
+    public void setTaxService(TaxService taxService) {
+        this.taxService = taxService;
+    }
+
+    /**
+     * @return container
+     */
+    public S2Container getContainer() {
+        return container;
+    }
+
+    /**
+     * @param container 設定する container
+     */
+    public void setContainer(S2Container container) {
+        this.container = container;
+    }
+
+}


Property changes on: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/checkout/CheckoutConfirmAction.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/checkout/CheckoutConfirmPage.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/checkout/CheckoutConfirmPage.java	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/checkout/CheckoutConfirmPage.java	2007-09-11 13:29:16 UTC (rev 555)
@@ -0,0 +1,283 @@
+package jp.sf.pal.pompei.web.user.checkout;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+import org.seasar.teeda.extension.util.LabelHelper;
+
+public class CheckoutConfirmPage implements Serializable {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 6101013818480233941L;
+
+    private LabelHelper labelHelper;
+
+    private List<Map<String, Object>> customersBasketItems;
+
+    private String deliveryMethodName;
+
+    private BigDecimal deliveryPrice;
+
+    private String entryCellphone;
+
+    private String entryCity;
+
+    private String entryCompany;
+
+    private String entryFax;
+
+    private String entryFirstname;
+
+    private String entryGender;
+
+    private String entryLastname;
+
+    private String entryPostcode;
+
+    private String entryState;
+
+    private String entryStreetAddress;
+
+    private String entryTelephone;
+
+    private BigDecimal finalPrice;
+
+    private String manufacturersName;
+
+    private String orderProcessId;
+
+    private String paymentMethodName;
+
+    private String productsModel;
+
+    private String productsName;
+
+    private BigDecimal quantity;
+
+    private BigDecimal subTotalPrice;
+
+    private BigDecimal tax;
+
+    private BigDecimal totalPrice;
+
+    /**
+     * @return labelHelper
+     */
+    public LabelHelper getLabelHelper() {
+        return labelHelper;
+    }
+
+    /**
+     * @param labelHelper 設定する labelHelper
+     */
+    public void setLabelHelper(LabelHelper labelHelper) {
+        this.labelHelper = labelHelper;
+    }
+
+    /**
+     * @return customersBasketItems
+     */
+    public List<Map<String, Object>> getCustomersBasketItems() {
+        return customersBasketItems;
+    }
+
+    /**
+     * @param customersBasketItems 設定する customersBasketItems
+     */
+    public void setCustomersBasketItems(
+            List<Map<String, Object>> customersBasketItems) {
+        this.customersBasketItems = customersBasketItems;
+    }
+
+    public String getDeliveryMethodName() {
+        return deliveryMethodName;
+    }
+
+    public void setDeliveryMethodName(String deliveryMethodName) {
+        this.deliveryMethodName = deliveryMethodName;
+    }
+
+    public BigDecimal getDeliveryPrice() {
+        return deliveryPrice;
+    }
+
+    public void setDeliveryPrice(BigDecimal deliveryPrice) {
+        this.deliveryPrice = deliveryPrice;
+    }
+
+    public String getEntryCellphone() {
+        return entryCellphone;
+    }
+
+    public void setEntryCellphone(String entryCellphone) {
+        this.entryCellphone = entryCellphone;
+    }
+
+    public String getEntryCity() {
+        return entryCity;
+    }
+
+    public void setEntryCity(String entryCity) {
+        this.entryCity = entryCity;
+    }
+
+    public String getEntryCompany() {
+        return entryCompany;
+    }
+
+    public void setEntryCompany(String entryCompany) {
+        this.entryCompany = entryCompany;
+    }
+
+    public String getEntryFax() {
+        return entryFax;
+    }
+
+    public void setEntryFax(String entryFax) {
+        this.entryFax = entryFax;
+    }
+
+    public String getEntryFirstname() {
+        return entryFirstname;
+    }
+
+    public void setEntryFirstname(String entryFirstname) {
+        this.entryFirstname = entryFirstname;
+    }
+
+    public String getEntryGender() {
+        return entryGender;
+    }
+
+    public void setEntryGender(String entryGenderString) {
+        this.entryGender = entryGenderString;
+    }
+
+    public String getEntryLastname() {
+        return entryLastname;
+    }
+
+    public void setEntryLastname(String entryLastname) {
+        this.entryLastname = entryLastname;
+    }
+
+    public String getEntryPostcode() {
+        return entryPostcode;
+    }
+
+    public void setEntryPostcode(String entryPostcode) {
+        this.entryPostcode = entryPostcode;
+    }
+
+    public String getEntryState() {
+        return entryState;
+    }
+
+    public void setEntryState(String entryState) {
+        this.entryState = entryState;
+    }
+
+    public String getEntryStreetAddress() {
+        return entryStreetAddress;
+    }
+
+    public void setEntryStreetAddress(String entryStreetAddress) {
+        this.entryStreetAddress = entryStreetAddress;
+    }
+
+    public String getEntryTelephone() {
+        return entryTelephone;
+    }
+
+    public void setEntryTelephone(String entryTelephone) {
+        this.entryTelephone = entryTelephone;
+    }
+
+    public BigDecimal getFinalPrice() {
+        return finalPrice;
+    }
+
+    public void setFinalPrice(BigDecimal finalPrice) {
+        this.finalPrice = finalPrice;
+    }
+
+    public String getManufacturersName() {
+        return manufacturersName;
+    }
+
+    public void setManufacturersName(String manufacturersName) {
+        this.manufacturersName = manufacturersName;
+    }
+
+    public String getOrderProcessId() {
+        return orderProcessId;
+    }
+
+    public void setOrderProcessId(String orderProcessId) {
+        this.orderProcessId = orderProcessId;
+    }
+
+    public String getPaymentMethodName() {
+        return paymentMethodName;
+    }
+
+    public void setPaymentMethodName(String paymentMethodName) {
+        this.paymentMethodName = paymentMethodName;
+    }
+
+    public String getProductsModel() {
+        return productsModel;
+    }
+
+    public void setProductsModel(String productsModel) {
+        this.productsModel = productsModel;
+    }
+
+    public String getProductsName() {
+        return productsName;
+    }
+
+    public void setProductsName(String productsName) {
+        this.productsName = productsName;
+    }
+
+    public BigDecimal getQuantity() {
+        return quantity;
+    }
+
+    public void setQuantity(BigDecimal quantity) {
+        this.quantity = quantity;
+    }
+
+    public BigDecimal getSubTotalPrice() {
+        return subTotalPrice;
+    }
+
+    public void setSubTotalPrice(BigDecimal subTotalPrice) {
+        this.subTotalPrice = subTotalPrice;
+    }
+
+    public BigDecimal getTax() {
+        return tax;
+    }
+
+    public void setTax(BigDecimal tax) {
+        this.tax = tax;
+    }
+
+    public BigDecimal getTotalPrice() {
+        return totalPrice;
+    }
+
+    public void setTotalPrice(BigDecimal totalPrice) {
+        this.totalPrice = totalPrice;
+    }
+
+    public String getEntryGenderString() {
+        return getLabelHelper().getLabelValue(entryGender);
+    }
+}


Property changes on: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/checkout/CheckoutConfirmPage.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/checkout/PaymentSelectAction.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/checkout/PaymentSelectAction.java	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/checkout/PaymentSelectAction.java	2007-09-11 13:29:16 UTC (rev 555)
@@ -13,6 +13,7 @@
 import jp.sf.pal.pompei.exentity.DeliveryMethodDescription;
 import jp.sf.pal.pompei.service.CustomerService;
 import jp.sf.pal.pompei.service.DeliveryMethodSerivce;
+import jp.sf.pal.pompei.service.TaxService;
 import jp.sf.pal.pompei.util.SessionUtil;
 
 import org.seasar.framework.util.StringUtil;
@@ -72,7 +73,7 @@
         if (map == null) {
             // expires session
             // TODO clear session info for card
-            //TODO put message
+            // TODO put message
             return UserInfoEditPage.class;
         }
 
@@ -160,7 +161,7 @@
         }
 
         // TODO
-        return null;
+        return CheckoutConfirmPage.class;
     }
 
     /**

Modified: pompei/portlets/pompei-core/trunk/src/main/resources/jp/sf/pal/pompei/web/user/checkout/label.properties
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/resources/jp/sf/pal/pompei/web/user/checkout/label.properties	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/resources/jp/sf/pal/pompei/web/user/checkout/label.properties	2007-09-11 13:29:16 UTC (rev 555)
@@ -1,2 +1,6 @@
 M=\u7537\u6027
 F=\u5973\u6027
+
+COD=\u4ee3\u91d1\u5f15\u63db\u3048
+BANK=\u9280\u884c\u632f\u8fbc\u307f
+CARD=\u30af\u30ec\u30b8\u30c3\u30c8\u30ab\u30fc\u30c9
\ No newline at end of file

Modified: pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/cart/productList.html
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/cart/productList.html	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/cart/productList.html	2007-09-11 13:29:16 UTC (rev 555)
@@ -34,7 +34,7 @@
 	</tbody>
 	<tfoot>
 		<tr>
-		<td colspan="5" align="right"><label>合計</label></td>
+		<td colspan="5" align="right"><label>小計</label></td>
 		<td colspan="2"><span id="totalPrice">10000</span></td>
 		</tr>
 	</tfoot>

Modified: pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/checkoutConfirm.html
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/checkoutConfirm.html	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/checkoutConfirm.html	2007-09-11 13:29:16 UTC (rev 555)
@@ -9,7 +9,7 @@
     <form id="Form">
       <input id="orderProcessId" type="hidden"/>
       <div>
-        <span id="messages"></span>
+        <span id="allMessages"></span>
       </div>
       <table border="1">
         <tr>
@@ -21,9 +21,6 @@
               <thead>
                 <tr style="dummy" height="20px">
                   <th>
-                    <label>NO</label>
-                  </th>
-                  <th>
                     <label>商品名</label>
                   </th>
                   <th>
@@ -40,44 +37,41 @@
                   </th>
                 </tr>
               </thead>
-              <tbody id="product">
+              <tbody id="customersBasketItems">
                 <tr style="dummy">
                   <td>
-                    <span id="no">1</span>
-                  </td>
-                  <td>
                     <span id="productsName">XXX 01MAX</span>
                   </td>
                   <td>
                     <span id="productsModel">MX-XXX</span>
                   </td>
                   <td>
-                    <span id="manufacturersId">アディダス</span>
+                    <span id="manufacturersName">アディダス</span>
                   </td>
                   <td>
-                    <span id="">1</span>
+                    <span id="quantity">1</span>
                   </td>
                   <td>
-                    <span id="productsPrice">30,000</span>
+                    <span id="finalPrice">30,000</span>
                   </td>
                 </tr>
               </tbody>
               <tfoot>
                 <tr>
-                  <td colspan="5" align="right">小計</td>
-                  <td colspan="2">30,000</td>
+                  <td colspan="4" align="right">小計</td>
+                  <td colspan="2"><span id="subTotalPrice">30,000</span></td>
                 </tr>
                 <tr>
-                  <td colspan="5" align="right">送料</td>
-                  <td colspan="2">1000</td>
+                  <td colspan="4" align="right">送料</td>
+                  <td colspan="2"><span id="deliveryPrice">1000</span></td>
                 </tr>
                 <tr>
-                  <td colspan="5" align="right">消費税</td>
-                  <td colspan="2">50</td>
+                  <td colspan="4" align="right">消費税</td>
+                  <td colspan="2"><span id="tax">50</span></td>
                 </tr>
                 <tr>
-                  <td colspan="5" align="right">合計</td>
-                  <td colspan="2">31,050</td>
+                  <td colspan="4" align="right">合計</td>
+                  <td colspan="2"><span id="totalPrice">31,050</span></td>
                 </tr>
               </tfoot>
             </table>
@@ -105,6 +99,14 @@
                   <span id="entryFirstname">VALUE</span>
                 </td>
               </tr>
+              <tr>
+                <th>
+                  <label>性別:</label>
+                </th>
+                <td>
+                  <span id="entryGenderString">男性</span>
+                </td>
+              </tr>
               <tr style="dummy" height="20px">
                 <th>
                   <label>郵便番号</label>
@@ -119,7 +121,6 @@
                 </th>
                 <td>
                   <span id="entryState">VALUE</span>
-<!-- TODO pulldown -->
                 </td>
               </tr>
               <tr style="dummy" height="20px">

Modified: pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/paymentSelect.html
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/paymentSelect.html	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/paymentSelect.html	2007-09-11 13:29:16 UTC (rev 555)
@@ -9,7 +9,7 @@
     <form id="Form">
       <input id="orderProcessId" type="hidden"/>
       <div>
-        <span id="messages" fatalClass="portlet-msg-error" errorClass="portlet-msg-error" warnClass="portlet-msg-alert" infoClass="portlet-msg-info"></span>
+        <span id="allMessages" fatalClass="portlet-msg-error" errorClass="portlet-msg-error" warnClass="portlet-msg-alert" infoClass="portlet-msg-info"></span>
       </div>
       <br />
       <h3 class="portlet-section-header">

Modified: pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/userAddressSelect.html
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/userAddressSelect.html	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/userAddressSelect.html	2007-09-11 13:29:16 UTC (rev 555)
@@ -9,7 +9,7 @@
     <form id="Form">
       <input id="orderProcessId" type="hidden"/>
       <div>
-        <span id="messages" fatalClass="portlet-msg-error" errorClass="portlet-msg-error" warnClass="portlet-msg-alert" infoClass="portlet-msg-info"></span>
+        <span id="allMessages" fatalClass="portlet-msg-error" errorClass="portlet-msg-error" warnClass="portlet-msg-alert" infoClass="portlet-msg-info"></span>
       </div>
       <br />
       <h3 class="portlet-section-header">

Modified: pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/userInfoEdit.html
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/userInfoEdit.html	2007-09-11 13:26:30 UTC (rev 554)
+++ pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/checkout/userInfoEdit.html	2007-09-11 13:29:16 UTC (rev 555)
@@ -9,7 +9,7 @@
     <form id="Form">
       <input id="customersPortalId-hidden" type="hidden"/>
       <div>
-        <span id="messages" fatalClass="portlet-msg-error" errorClass="portlet-msg-error" warnClass="portlet-msg-alert" infoClass="portlet-msg-info"></span>
+        <span id="allMessages" fatalClass="portlet-msg-error" errorClass="portlet-msg-error" warnClass="portlet-msg-alert" infoClass="portlet-msg-info"></span>
       </div>
       <br />
       <div id="isNotLogin">


pal-cvs メーリングリストの案内