Help me FATHER
This commit is contained in:
parent
b9fcff496c
commit
ee44560575
7 changed files with 7 additions and 15 deletions
|
@ -16,3 +16,4 @@ The Kingkiller Chronicle
|
|||
The Kingkiller Chronicle
|
||||
The Kingkiller Chronicle
|
||||
The Kingkiller Chronicle
|
||||
The Wheel of Time
|
||||
|
|
|
@ -86,17 +86,7 @@ public class CartController {
|
|||
}
|
||||
|
||||
@FXML
|
||||
private void handleCheckOutButton(ActionEvent event) {
|
||||
if (cartItems.isEmpty()) {
|
||||
System.out.println("Cart is empty. Cannot proceed to checkout.");
|
||||
return;
|
||||
}
|
||||
|
||||
System.out.println("Proceeding to checkout...");
|
||||
try {
|
||||
App.setRoot("checkOut");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
private void handleCheckOutButton(ActionEvent event) throws IOException {
|
||||
App.setRoot("checkOut");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ public class CheckOutController {
|
|||
}
|
||||
|
||||
@FXML
|
||||
private void handleSubmit(ActionEvent event) {
|
||||
private void handleSubmit(ActionEvent event) throws IOException {
|
||||
System.out.println("Submit button clicked.");
|
||||
|
||||
String fullName = fullNameField.getText();
|
||||
|
@ -115,6 +115,7 @@ public class CheckOutController {
|
|||
System.out.println("Form submitted successfully.");
|
||||
System.out.printf("Billing Info: %s, %s, %s, %s, %s\n", fullName, address, city, zip, country);
|
||||
System.out.printf("Credit Card Info: %s, %s, %s, CVV: %s\n", cardNumber, cardHolderName, expiryDate, cvv);
|
||||
App.setRoot("shop");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<Insets />
|
||||
</BorderPane.margin>
|
||||
<children>
|
||||
<Button fx:id="btnCheckOut" mnemonicParsing="false" styleClass="btnCheckOut" text="Check out" GridPane.rowIndex="2" />
|
||||
<Button fx:id="btnCheckOut" mnemonicParsing="false" onMouseClicked="#handleCheckOutButton" styleClass="btnCheckOut" text="Check out" GridPane.rowIndex="2" />
|
||||
<Label fx:id="cartTitle" styleClass="cartTitle" text="Your cart" />
|
||||
<TableView fx:id="cartContent" prefHeight="0.0" prefWidth="364.0" GridPane.rowIndex="1">
|
||||
<columns>
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -41,7 +41,7 @@
|
|||
<Insets />
|
||||
</BorderPane.margin>
|
||||
<children>
|
||||
<Button fx:id="btnCheckOut" mnemonicParsing="false" styleClass="btnCheckOut" text="Check out" GridPane.rowIndex="2" />
|
||||
<Button fx:id="btnCheckOut" mnemonicParsing="false" onMouseClicked="#handleCheckOutButton" styleClass="btnCheckOut" text="Check out" GridPane.rowIndex="2" />
|
||||
<Label fx:id="cartTitle" styleClass="cartTitle" text="Your cart" />
|
||||
<TableView fx:id="cartContent" prefHeight="0.0" prefWidth="364.0" GridPane.rowIndex="1">
|
||||
<columns>
|
||||
|
|
Loading…
Reference in a new issue