]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Tue, 15 Sep 2015 09:18:06 +0000 (11:18 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 15 Sep 2015 09:18:06 +0000 (11:18 +0200)
- added more translations
- swapped out some parts of large registration form for reuse
- used them again for checkout without registration
- added template file for templates
Signed-off-by:Roland Häder <roland@mxchange.org>

14 files changed:
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/faces-config.xml
web/WEB-INF/templates.dist/guest_page.xhtml
web/WEB-INF/templates.dist/template.tpl [new file with mode: 0644]
web/WEB-INF/templates/basket/full_basket.tpl [new file with mode: 0644]
web/WEB-INF/templates/basket/total_sum.tpl [new file with mode: 0644]
web/WEB-INF/templates/guest/guest_personal_data.tpl [new file with mode: 0644]
web/WEB-INF/templates/guest/guest_privacy_terms.tpl [new file with mode: 0644]
web/WEB-INF/templates/guest/guest_registration_form.tpl [new file with mode: 0644]
web/basket.xhtml
web/customer/checkout.xhtml [new file with mode: 0644]
web/customer/checkout2.xhtml [new file with mode: 0644]
web/customer/register.xhtml

index d5721ad2fb8b1ec6b54fb38c44982f93f6430024..d162f45d00dbe7f9fbcfc6afc604ab5d91a1ec92 100644 (file)
@@ -104,3 +104,13 @@ SUB_TITLE_INDEX_IMPRINT=Impressum
 PAGE_TITLE_INDEX_ITEM_ADDED=Produkt zum Warenkorb hinzugef\u00fcgt
 SUB_TITLE_INDEX_ITEM_ADDED=Produkt zum Warenkorb hinzugef\u00fcgt
 GUEST_ITEM_ADDED_TO_BASKET=Der Artikel {0} wurde zum Warenkorb hinzugef\u00fcgt.
+LINK_CONTINUE_TO_CHECKOUT=Weiter zur Bezahlung
+PAGE_TITLE_CUSTOMER_CHECKOUT=Weiter zur Bezahlung
+PAGE_TITLE_INDEX_CHECKOUT2=Ohne Anmeldung bezahlen
+SUB_TITLE_INDEX_CHECKOUT2=Ohne Anmeldung bezahlen
+GUEST_CHECKOUT_WITHOUT_REGISTRATION_TITLE=Sie k\u00f6nnen hier ohne Anmeldung bezahlen:
+SUB_TITLE_CUSTOMER_CHECKOUT=Bezahlungsm\u00f6glichkeit ausw\u00e4hlen
+LINK_CHECKOUT_OPTION_LOGIN=Weiter zum Kundenlogin
+LINK_CHECKOUT_OPTION_REGISTRATION=Weiter zum neuen Kundenkonto anmelden
+LINK_CHECKOUT_OPTION_GUEST=Ohne Anmeldung bezahlen
+BUTTON_COMPLETE_ORDER=Bestellung verbindlich abschicken
index 530f47c32e7a4846e67ab9d57b7b06d48f08b0bc..ad4203a16f7077f6ba73bfb99b7e10b2fedaed77 100644 (file)
@@ -102,3 +102,13 @@ SUB_TITLE_INDEX_IMPRINT=Imprint:
 PAGE_TITLE_INDEX_ITEM_ADDED=Item has been added to basket
 SUB_TITLE_INDEX_ITEM_ADDED=Item has been added to basket:
 GUEST_ITEM_ADDED_TO_BASKET=The item {0} has been added to the basket.
+LINK_CONTINUE_TO_CHECKOUT=Continue to checkout
+PAGE_TITLE_CUSTOMER_CHECKOUT=Continue to checkout
+PAGE_TITLE_INDEX_CHECKOUT2=Checkout without login
+SUB_TITLE_INDEX_CHECKOUT2=Checkout without login
+GUEST_CHECKOUT_WITHOUT_REGISTRATION_TITLE=You can checkout without registration
+SUB_TITLE_CUSTOMER_CHECKOUT=Choose checkout option
+LINK_CHECKOUT_OPTION_LOGIN=Continue to customer login
+LINK_CHECKOUT_OPTION_REGISTRATION=Continue with new customer registration
+LINK_CHECKOUT_OPTION_GUEST=Checkout without registration
+BUTTON_COMPLETE_ORDER=Bestellung verbindlich abschicken
index a699e4aa3923c10ea4f7ea819690d76509fcb57d..7296fdad5d794c84559dddf93d8b660692d5b6ea 100644 (file)
                        <to-view-id>/errorHandler.xhtml</to-view-id>
                </navigation-case>
        </navigation-rule>
+       <navigation-rule>
+               <from-view-id>/basket.xhtml</from-view-id>
+               <navigation-case>
+                       <from-outcome>checkout</from-outcome>
+                       <to-view-id>/customer/checkout.xhtml</to-view-id>
+               </navigation-case>
+       </navigation-rule>
+       <navigation-rule>
+               <from-view-id>/customer/checkout.xhtml</from-view-id>
+               <navigation-case>
+                       <from-outcome>checkout2</from-outcome>
+                       <to-view-id>/customer/checkout2.xhtml</to-view-id>
+               </navigation-case>
+       </navigation-rule>
        <navigation-rule>
                <from-view-id>/index.xhtml</from-view-id>
                <navigation-case>
index 9dcb5701f4aa32275e14b54f2da9bb4fc70114d4..a90306bc8885fe3692cd6602b298928728e6d1c3 100644 (file)
@@ -7,14 +7,14 @@
          >
 
        <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
-               <ui:define name="guest_title">Your page's title here</ui:define>
+               <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_FOO}</ui:define>
 
                <ui:define name="menu">
                        <ui:include id="menu" class="guest_menu" src="/WEB-INF/templates/guest/guest_menu.tpl" />
                </ui:define>
 
                <ui:define name="content_header">
-                       Your header above content here
+                       #{msg.SUB_TITLE_INDEX_FOO}
                </ui:define>
 
                <ui:define name="content">
diff --git a/web/WEB-INF/templates.dist/template.tpl b/web/WEB-INF/templates.dist/template.tpl
new file mode 100644 (file)
index 0000000..ed0a433
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://java.sun.com/jsf/facelets">
+
+       <!-- Put your stuff here //-->
+</ui:composition>
diff --git a/web/WEB-INF/templates/basket/full_basket.tpl b/web/WEB-INF/templates/basket/full_basket.tpl
new file mode 100644 (file)
index 0000000..8ddeea9
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://java.sun.com/jsf/facelets">
+
+       <h:dataTable var="item" value="#{basketController.allItems()}" headerClass="table_header_column" class="table" rendered="#{basketController.hasItems()}">
+               <h:column>
+                       <f:facet name="header">#{msg.GUEST_ITEM_TITLE}</f:facet>
+
+                       <ui:fragment rendered="#{item.isProductType()}">
+                               #{item.product.title}
+                       </ui:fragment>
+               </h:column>
+
+               <h:column>
+                       <f:facet name="header">#{msg.SINGLE_ITEM_PRICE}</f:facet>
+
+                       <div class="item_price">
+                               <ui:fragment rendered="#{item.isProductType()}">
+                                       <h:outputText class="price" value="#{item.product.price}">
+                                               <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
+                                       </h:outputText>
+                               </ui:fragment>
+                       </div>
+               </h:column>
+
+               <h:column>
+                       <f:facet name="header">#{msg.CHANGE_ITEM_AMOUNT}</f:facet>
+
+                       <h:form acceptcharset="utf-8" id="add_item">
+                               <h:outputText id="amount" value="#{item.amount}">
+                               </h:outputText>
+                       </h:form>
+               </h:column>
+
+               <h:column>
+                       <f:facet name="header">#{msg.TOTAL_ITEM_PRICE}</f:facet>
+
+                       <div class="item_total_price">
+                               <h:outputText class="price" id="item_price" value="#{basketController.calculateItemPrice(item)}" rendered="#{item.isProductType()}">
+                                       <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
+                               </h:outputText>
+                       </div>
+               </h:column>
+       </h:dataTable>
+</ui:composition>
diff --git a/web/WEB-INF/templates/basket/total_sum.tpl b/web/WEB-INF/templates/basket/total_sum.tpl
new file mode 100644 (file)
index 0000000..c350d77
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition
+         xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://java.sun.com/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core"
+         >
+
+       <ui:fragment rendered="#{basketController.hasItems()}">
+               <div class="totals_container">
+                       #{msg.TOTAL_ORDER_PRICE}
+                       <h:outputText class="price" id="total_sum" value="#{basketController.calculateTotalPrice()}">
+                               <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
+                       </h:outputText>
+               </div>
+       </ui:fragment>
+
+       <h:outputText class="empty_basket" value="#{msg.NO_ITEMS_ADDED_TO_BASKET}" rendered="#{basketController.isEmpty()}" />
+</ui:composition>
diff --git a/web/WEB-INF/templates/guest/guest_personal_data.tpl b/web/WEB-INF/templates/guest/guest_personal_data.tpl
new file mode 100644 (file)
index 0000000..f4da04c
--- /dev/null
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://java.sun.com/jsf/facelets">
+
+       <div class="para notice">
+               Bitte geben Sie mindestens Name, Anschrift und Telefonnummer ein:
+       </div>
+
+       <div class="para">
+               <fieldset id="personal_data">
+                       <legend title="Bitte geben Sie Ihre Daten ein.">Bitte Ihre Daten eingeben:</legend>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="gender" value="Anrede:" />
+                               </div>
+
+                               <div class="table_right">
+                                       <ui:include src="/WEB-INF/templates/generic/gender_selection_box.tpl" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="companyname" value="Firmenname:" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="companyname" size="15" maxlength="255" value="#{customer.companyName}" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="firstName" value="Vorname:" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="firstName" size="10" maxlength="255" value="#{customer.firstName}" required="true">
+                                               <f:validator validatorId="NameValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="familyName" value="Nachname:" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="familyName" size="10" maxlength="255" value="#{customer.familyName}" required="true">
+                                               <f:validator validatorId="NameValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="street" value="Straße:" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="street" size="20" maxlength="255" value="#{customer.street}" required="true">
+                                               <f:validator validatorId="NameValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="houseNumber" value="Hausnummer:" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="houseNumber" size="3" maxlength="5" value="#{customer.houseNumber}" required="true">
+                                               <f:validateLongRange minimum="1" maximum="500" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="zipCode" value="Postleitzahl:" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="zipCode" size="5" maxlength="6" value="#{customer.zipCode}" required="true" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="city" value="Ort:" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="city" size="10" maxlength="255" value="#{customer.city}" required="true">
+                                               <f:validator validatorId="NameValidator" />
+                                       </h:inputText>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="phoneNumber" value="Telefon:" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="phoneNumber" size="20" maxlength="255" value="#{customer.phoneNumber}" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="faxNumber" value="Faxnummer:" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="faxNumber" size="20" maxlength="255" value="#{customer.faxNumber}" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="cellphoneNumber" value="Handy:" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputText class="input" id="cellphoneNumber" size="20" maxlength="255" value="#{customer.cellphoneNumber}" />
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+               </fieldset>
+       </div>
+</ui:composition>
diff --git a/web/WEB-INF/templates/guest/guest_privacy_terms.tpl b/web/WEB-INF/templates/guest/guest_privacy_terms.tpl
new file mode 100644 (file)
index 0000000..981c8f3
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://java.sun.com/jsf/facelets">
+
+       <div class="para">
+               <fieldset id="terms_privacy">
+                       <legend title="Bitte die AGBs und Datenschutzbestimmungen lesen und akzeptieren.">Rechtliches:</legend>
+
+                       <div class="table_row">
+                               <div class="table_left25">
+                                       <h:selectBooleanCheckbox class="input" id="privacy" required="true" requiredMessage="Bitte den Datenschutzbestimmungen zustimmen.">
+                                               <f:validator validatorId="PrivacyTermsCheckboxValidator" />
+                                       </h:selectBooleanCheckbox>
+                               </div>
+
+                               <div class="table_right75">
+                                       Ja, ich habe die <h:link outcome="privacy" target="_blank" value="Datenschutzbestimmungen" /> gelesen und
+                                       auch verstanden.
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+
+                       <div class="table_row">
+                               <div class="table_left25">
+                                       <h:selectBooleanCheckbox class="input" id="terms" required="true" requiredMessage="Bitte den AGBs zustimmen.">
+                                               <f:validator validatorId="PrivacyTermsCheckboxValidator" />
+                                       </h:selectBooleanCheckbox>
+                               </div>
+
+                               <div class="table_right75">
+                                       Ja, ich habe die <h:link outcome="terms" target="_blank" value="Allgemeinen Geschäftsbedingungen" /> gelesen und
+                                       auch verstanden.
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+               </fieldset>
+       </div>
+</ui:composition>
diff --git a/web/WEB-INF/templates/guest/guest_registration_form.tpl b/web/WEB-INF/templates/guest/guest_registration_form.tpl
new file mode 100644 (file)
index 0000000..d8845ac
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://java.sun.com/jsf/facelets">
+
+
+       <h:form acceptcharset="utf-8" id="register_form">
+               <div class="table">
+                       <div class="table_header">
+                               Anmelden als Neukunde
+                       </div>
+
+                       <ui:include src="/WEB-INF/templates/guest/guest_personal_data.tpl" />
+
+                       <div class="para">
+                               <fieldset id="login_data">
+                                       <legend title="Zum Bestätigen wird Ihre Email-Adresse benötigt, für den Login Kundennummer und Passwort.">Email-Adresse und Passwort:</legend>
+
+                                       <div class="table_row">
+                                               <div class="table_left">
+                                                       <h:outputLabel for="emailAddress1" value="eMail-Adresse eingeben:" />
+                                               </div>
+
+                                               <div class="table_right">
+                                                       <h:inputText class="input" id="emailAddress1" size="20" maxlength="255" value="#{customer.emailAddress}" required="true" />
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <div class="table_row">
+                                               <div class="table_left">
+                                                       <h:outputLabel for="emailAddress2" value="eMail-Adresse wiederholen:" />
+                                               </div>
+
+                                               <div class="table_right">
+                                                       <h:inputText class="input" id="emailAddress2" size="20" maxlength="255" value="#{customer.emailAddress}" required="true" />
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <div class="para"></div>
+
+                                       <div class="table_row">
+                                               <div class="table_left">
+                                                       <h:outputLabel for="password1" value="Passwort eingeben:" />
+                                               </div>
+
+                                               <div class="table_right">
+                                                       <h:inputSecret class="input" id="password1" size="10" maxlength="255" required="true" />
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <div class="table_row">
+                                               <div class="table_left">
+                                                       <h:outputLabel for="password2" value="Passwort wiederholen:" />
+                                               </div>
+
+                                               <div class="table_right">
+                                                       <h:inputSecret class="input" id="password2" size="10" maxlength="255" required="true" />
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <div class="para notice">
+                                               Die Kundennummer wird Ihnen später vergeben.
+                                       </div>
+                               </fieldset>
+                       </div>
+
+                       <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" />
+
+                       <div class="table_footer">
+                               <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                               <h:commandButton class="submit" type="submit" id="register" value="Anmelden" action="#{controller.doRegister()}" />
+                       </div>
+               </div>
+       </h:form>
+</ui:composition>
index a878d5634fa871d2151630c0ff95a2c3c27567ff..e3c253c2f7c11b15c9266f6cc23503377e3286e8 100644 (file)
                                </h:column>
                        </h:dataTable>
 
-                       <div class="totals_container">
-                               #{msg.TOTAL_ORDER_PRICE}
-                               <h:outputText class="price" id="total_sum" value="#{basketController.calculateTotalPrice()}">
-                                       <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" />
-                               </h:outputText>
-                       </div>
+                       <ui:include src="/WEB-INF/templates/basket/total_sum.tpl" />
 
-                       <h:outputText class="empty_basket" value="#{msg.NO_ITEMS_ADDED_TO_BASKET}" rendered="#{basketController.isEmpty()}" />
+                       <div class="continue_checkout">
+                               <h:link class="checkout_link" id="checkout" value="#{msg.LINK_CONTINUE_TO_CHECKOUT}" outcome="checkout" />
+                       </div>
                </ui:define>
 
                <ui:define name="footer">
diff --git a/web/customer/checkout.xhtml b/web/customer/checkout.xhtml
new file mode 100644 (file)
index 0000000..9de80b1
--- /dev/null
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://java.sun.com/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core"
+         >
+
+       <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
+               <ui:define name="guest_title">#{msg.PAGE_TITLE_CUSTOMER_CHECKOUT}</ui:define>
+
+               <ui:define name="menu">
+                       <ui:include id="menu" class="guest_menu" src="/WEB-INF/templates/guest/guest_menu.tpl" />
+               </ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.SUB_TITLE_CUSTOMER_CHECKOUT}
+               </ui:define>
+
+               <ui:define name="content">
+                       <div class="basket_content">
+                               <ui:include src="/WEB-INF/templates/basket/full_basket.tpl" />
+
+                               <ui:include src="/WEB-INF/templates/basket/total_sum.tpl" />
+                       </div>
+
+                       <div class="checkout_outer">
+                               <div class="checkout_title">
+                                       Sie haben drei Möglichkeiten zur Auswahl:
+                               </div>
+
+                               <div class="checkout_options">
+                                       <ul>
+                                               <li>
+                                                       <div class="checkout_option_title">
+                                                               Ein bestehenden Kundenkonto verwenden
+                                                       </div>
+
+                                                       <div class="checkout_option_content">
+                                                               <h:link class="checkout_option_link" id="checkout_option_login" outcome="login" value="#{msg.LINK_CHECKOUT_OPTION_LOGIN}">
+                                                                       <f:param name="redirect" value="login_checkout" />
+                                                               </h:link>
+                                                       </div>
+                                               </li>
+
+                                               <li>
+                                                       <div class="checkout_option_title">
+                                                               Neues Kundenkonto erstellen
+                                                       </div>
+
+                                                       <div class="checkout_option_content">
+                                                               <h:link class="checkout_option_link" id="checkout_option_register" outcome="register" value="#{msg.LINK_CHECKOUT_OPTION_REGISTRATION}">
+                                                                       <f:param name="redirect" value="login_checkout" />
+                                                               </h:link>
+                                                       </div>
+                                               </li>
+
+                                               <li>
+                                                       <div class="checkout_option_title">
+                                                               Ohne Anmeldung bezahlen
+                                                       </div>
+
+                                                       <div class="checkout_option_content">
+                                                               <h:link class="checkout_option_link" id="checkout_option_guest" outcome="checkout2" value="#{msg.LINK_CHECKOUT_OPTION_GUEST}" />
+                                                       </div>
+                                               </li>
+                                       </ul>
+                               </div>
+                       </div>
+               </ui:define>
+
+               <ui:define name="footer">
+                       <ui:include id="footer" class="guest_footer" src="/WEB-INF/templates/guest/guest_footer.tpl" />
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/customer/checkout2.xhtml b/web/customer/checkout2.xhtml
new file mode 100644 (file)
index 0000000..e639134
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://java.sun.com/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core"
+         >
+
+       <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
+               <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_CHECKOUT2}</ui:define>
+
+               <ui:define name="menu">
+                       <ui:include id="menu" class="guest_menu" src="/WEB-INF/templates/guest/guest_menu.tpl" />
+
+                       <ui:include src="/WEB-INF/templates/basket/total_sum.tpl" />
+               </ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.SUB_TITLE_INDEX_CHECKOUT2}
+               </ui:define>
+
+               <ui:define name="content">
+                       <div class="basket_content">
+                               <ui:include src="/WEB-INF/templates/basket/full_basket.tpl" />
+                       </div>
+
+                       <div class="checkout_outer">
+                               <div class="checkout_title">
+                                       #{msg.GUEST_CHECKOUT_WITHOUT_REGISTRATION_TITLE}
+                               </div>
+
+                               <div class="registration_form">
+                                       <h:form acceptcharset="utf-8" id="checkout_form">
+                                               <div class="table">
+                                                       <div class="table_header">
+                                                               Bezahlung ohne Anmeldung
+                                                       </div>
+
+                                                       <ui:include src="/WEB-INF/templates/guest/guest_personal_data.tpl" />
+
+                                                       <div class="para">
+                                                               Derzeit ist nur eine Bezahlung gegen Rechnung möglich.
+                                                       </div>
+
+                                                       <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" />
+
+                                                       <div class="table_footer">
+                                                               <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                               <h:commandButton class="submit" type="submit" id="checkout" value="#{msg.BUTTON_COMPLETE_ORDER}" action="#{controller.doCheckout()}" />
+                                                       </div>
+                                               </div>
+                                       </h:form>
+                               </div>
+                       </div>
+               </ui:define>
+
+               <ui:define name="footer">
+                       <ui:include id="footer" class="guest_footer" src="/WEB-INF/templates/guest/guest_footer.tpl" />
+               </ui:define>
+       </ui:composition>
+</html>
index 7a00202754f20d38c72a12dbe15027955cfe0a02..dd1af7b5f51347044bded08aad9b6109600ac9e0 100644 (file)
                                Sie sind bereits Kunde? Dann <h:link outcome="customer_login" value="hier" /> einloggen.
                        </div>
 
-                       <h:form acceptcharset="utf-8" id="register_form">
-                               <div class="table">
-                                       <div class="table_header">
-                                               Anmelden als Neukunde
-                                       </div>
-
-                                       <div class="para notice">
-                                               Bitte geben Sie mindestens Name, Anschrift und Telefonnummer ein:
-                                       </div>
-
-                                       <div class="para">
-                                               <fieldset id="personal_data">
-                                                       <legend title="Bitte geben Sie Ihre Daten ein.">Bitte Ihre Daten eingeben:</legend>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="gender" value="Anrede:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <ui:include src="/WEB-INF/templates/generic/gender_selection_box.tpl" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="companyname" value="Firmenname:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <h:inputText class="input" id="companyname" size="15" maxlength="255" value="#{customer.companyName}" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="firstName" value="Vorname:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <h:inputText class="input" id="firstName" size="10" maxlength="255" value="#{customer.firstName}" required="true">
-                                                                               <f:validator validatorId="NameValidator" />
-                                                                       </h:inputText>
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="familyName" value="Nachname:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <h:inputText class="input" id="familyName" size="10" maxlength="255" value="#{customer.familyName}" required="true">
-                                                                               <f:validator validatorId="NameValidator" />
-                                                                       </h:inputText>
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="street" value="Straße:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <h:inputText class="input" id="street" size="20" maxlength="255" value="#{customer.street}" required="true">
-                                                                               <f:validator validatorId="NameValidator" />
-                                                                       </h:inputText>
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="houseNumber" value="Hausnummer:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <h:inputText class="input" id="houseNumber" size="3" maxlength="5" value="#{customer.houseNumber}" required="true">
-                                                                               <f:validateLongRange minimum="1" maximum="500" />
-                                                                       </h:inputText>
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="zipCode" value="Postleitzahl:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <h:inputText class="input" id="zipCode" size="5" maxlength="6" value="#{customer.zipCode}" required="true" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="city" value="Ort:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <h:inputText class="input" id="city" size="10" maxlength="255" value="#{customer.city}" required="true">
-                                                                               <f:validator validatorId="NameValidator" />
-                                                                       </h:inputText>
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="phoneNumber" value="Telefon:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <h:inputText class="input" id="phoneNumber" size="20" maxlength="255" value="#{customer.phoneNumber}" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="faxNumber" value="Faxnummer:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <h:inputText class="input" id="faxNumber" size="20" maxlength="255" value="#{customer.faxNumber}" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="cellphoneNumber" value="Handy:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <h:inputText class="input" id="cellphoneNumber" size="20" maxlength="255" value="#{customer.cellphoneNumber}" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-                                               </fieldset>
-                                       </div>
-
-                                       <div class="para">
-                                               <fieldset id="login_data">
-                                                       <legend title="Zum Bestätigen wird Ihre Email-Adresse benötigt, für den Login Kundennummer und Passwort.">Email-Adresse und Passwort:</legend>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="emailAddress1" value="eMail-Adresse eingeben:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <h:inputText class="input" id="emailAddress1" size="20" maxlength="255" value="#{customer.emailAddress}" required="true" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="emailAddress2" value="eMail-Adresse wiederholen:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <h:inputText class="input" id="emailAddress2" size="20" maxlength="255" value="#{customer.emailAddress}" required="true" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="para"></div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="password1" value="Passwort eingeben:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <h:inputSecret class="input" id="password1" size="10" maxlength="255" required="true" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="password2" value="Passwort wiederholen:" />
-                                                               </div>
-
-                                                               <div class="table_right">
-                                                                       <h:inputSecret class="input" id="password2" size="10" maxlength="255" required="true" />
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="para notice">
-                                                               Die Kundennummer wird Ihnen später vergeben.
-                                                       </div>
-                                               </fieldset>
-                                       </div>
-
-                                       <div class="para">
-                                               <fieldset id="terms_privacy">
-                                                       <legend title="Bitte die AGBs und Datenschutzbestimmungen lesen und akzeptieren.">Rechtliches:</legend>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left25">
-                                                                       <h:selectBooleanCheckbox class="input" id="privacy" required="true" requiredMessage="Bitte den Datenschutzbestimmungen zustimmen.">
-                                                                               <f:validator validatorId="PrivacyTermsCheckboxValidator" />
-                                                                       </h:selectBooleanCheckbox>
-                                                               </div>
-
-                                                               <div class="table_right75">
-                                                                       Ja, ich habe die <h:link outcome="privacy" target="_blank" value="Datenschutzbestimmungen" /> gelesen und
-                                                                       auch verstanden.
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-
-                                                       <div class="table_row">
-                                                               <div class="table_left25">
-                                                                       <h:selectBooleanCheckbox class="input" id="terms" required="true" requiredMessage="Bitte den AGBs zustimmen.">
-                                                                               <f:validator validatorId="PrivacyTermsCheckboxValidator" />
-                                                                       </h:selectBooleanCheckbox>
-                                                               </div>
-
-                                                               <div class="table_right75">
-                                                                       Ja, ich habe die <h:link outcome="terms" target="_blank" value="Allgemeinen Geschäftsbedingungen" /> gelesen und
-                                                                       auch verstanden.
-                                                               </div>
-
-                                                               <div class="clear"></div>
-                                                       </div>
-                                               </fieldset>
-                                       </div>
-
-                                       <div class="table_footer">
-                                               <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                               <h:commandButton class="submit" type="submit" id="register" value="Anmelden" action="#{controller.doRegister()}" />
-                                       </div>
-                               </div>
-                       </h:form>
+                       <div class="registration_form">
+                               <ui:include src="/WEB-INF/templates/guest/guest_registration_form.tpl" />
+                       </div>
                </ui:define>
 
                <ui:define name="footer">