feat: implement header/footer visibility controls for checkout and thankyou pages

- Created LayoutWrapper component to conditionally render header/footer based on route
- Created MinimalHeader component (logo only)
- Created MinimalFooter component (trust badges + policy links)
- Created usePageVisibility hook to get visibility settings per page
- Wrapped ClassicLayout with LayoutWrapper for conditional rendering
- Header/footer visibility now controlled directly in React SPA
- Settings: show/minimal/hide for both header and footer
- Background color support for checkout and thankyou pages
This commit is contained in:
Dwindi Ramadhana
2025-12-25 22:20:48 +07:00
parent c37ecb8e96
commit 9ac09582d2
104 changed files with 14801 additions and 1213 deletions

View File

@@ -317,14 +317,14 @@ class ProductsController {
}
// Virtual and downloadable
if (!empty($data['virtual'])) {
$product->set_virtual(true);
if (isset($data['virtual'])) {
$product->set_virtual((bool) $data['virtual']);
}
if (!empty($data['downloadable'])) {
$product->set_downloadable(true);
if (isset($data['downloadable'])) {
$product->set_downloadable((bool) $data['downloadable']);
}
if (!empty($data['featured'])) {
$product->set_featured(true);
if (isset($data['featured'])) {
$product->set_featured((bool) $data['featured']);
}
// Categories
@@ -418,6 +418,17 @@ class ProductsController {
if (isset($data['width'])) $product->set_width(self::sanitize_number($data['width']));
if (isset($data['height'])) $product->set_height(self::sanitize_number($data['height']));
// Virtual and downloadable
if (isset($data['virtual'])) {
$product->set_virtual((bool) $data['virtual']);
}
if (isset($data['downloadable'])) {
$product->set_downloadable((bool) $data['downloadable']);
}
if (isset($data['featured'])) {
$product->set_featured((bool) $data['featured']);
}
// Categories
if (isset($data['categories'])) {
$product->set_category_ids($data['categories']);