diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/cart.txt b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/cart.txt
index e04bc95..fea1ebb 100644
--- a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/cart.txt
+++ b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/cart.txt
@@ -16,3 +16,4 @@ The Kingkiller Chronicle
The Kingkiller Chronicle
The Kingkiller Chronicle
The Kingkiller Chronicle
+The Wheel of Time
diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CartController.java b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CartController.java
index bbc6f73..34965c2 100644
--- a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CartController.java
+++ b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CartController.java
@@ -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");
}
}
diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CheckOutController.java b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CheckOutController.java
index 5edfd47..d68962c 100644
--- a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CheckOutController.java
+++ b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/CheckOutController.java
@@ -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");
}
}
}
diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/resources/com/example/cart.fxml b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/resources/com/example/cart.fxml
index 80504f2..7f4980e 100644
--- a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/resources/com/example/cart.fxml
+++ b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/resources/com/example/cart.fxml
@@ -41,7 +41,7 @@
-
+
diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CartController.class b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CartController.class
index 783abbe..6d8ce9c 100644
Binary files a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CartController.class and b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CartController.class differ
diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CheckOutController.class b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CheckOutController.class
index b56c4f6..e2e808f 100644
Binary files a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CheckOutController.class and b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/CheckOutController.class differ
diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/cart.fxml b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/cart.fxml
index 80504f2..7f4980e 100644
--- a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/cart.fxml
+++ b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/cart.fxml
@@ -41,7 +41,7 @@
-
+