### Install Bagisto Visual Debut Theme Source: https://visual.bagistoplus.com/introduction/getting-started Installs the default starter theme package for Bagisto Visual. ```bash composer require bagistoplus/visual-debut ``` -------------------------------- ### Install Bagisto Visual Package Source: https://visual.bagistoplus.com/introduction/getting-started Installs the core Bagisto Visual package using Composer. ```bash composer require bagistoplus/visual ``` -------------------------------- ### Publish Bagisto Visual Debut Theme Assets Source: https://visual.bagistoplus.com/introduction/getting-started Publishes the assets for the Bagisto Visual Debut theme. ```bash php artisan vendor:publish --tag=visual-debut-assets ``` -------------------------------- ### Configure Composer for Bagisto Visual Source: https://visual.bagistoplus.com/introduction/getting-started Ensures the alpha version of Bagisto Visual can be installed properly by setting minimum stability and preferring stable versions in composer.json. ```json "minimum-stability": "dev", "prefer-stable": true ``` -------------------------------- ### Publish Bagisto Visual Assets Source: https://visual.bagistoplus.com/introduction/getting-started Publishes the necessary assets for Bagisto Visual to prepare the store for theme customization. ```bash php artisan vendor:publish --tag=visual-assets ``` -------------------------------- ### Generate Custom Bagisto Visual Section Source: https://visual.bagistoplus.com/introduction/getting-started Creates a new custom section with a PHP class and a Blade file, allowing developers to define custom settings and layout. ```bash php artisan visual:make-section MyBanner ``` -------------------------------- ### Required Files for Bagisto Layout Setup Source: https://visual.bagistoplus.com/building-theme/adding-layouts Lists the essential files that must be created and present for the Bagisto Visual layout setup to function correctly, including the default layout and its associated header and footer components. ```text resources/views/layouts/default.blade.php resources/views/components/header.blade.php resources/views/components/footer.blade.php ``` -------------------------------- ### Customer Login Form Example Source: https://visual.bagistoplus.com/core-concepts/templates/available A Blade section example for the Login Template, demonstrating a form for customer email and password input with a login submission button. ```blade

Customer Login

@csrf
``` -------------------------------- ### Install Bagisto Visual Theme via Composer Source: https://visual.bagistoplus.com/building-theme/create-theme After generating a theme, this Composer command installs it into the Bagisto project. The theme is automatically configured using Composer's local repository system, making it immediately available for use without needing to publish the package to a remote server. ```bash composer require themes/awesome-theme ``` -------------------------------- ### Search Template Results Display Example Source: https://visual.bagistoplus.com/core-concepts/templates/available A Blade section example for the Search Template, demonstrating how to retrieve the search query from the request and display results using a Livewire component. ```blade @php $query = request()->get('term'); @endphp

Results for "{{ $query }}"

@livewire('search-results', ['term' => $query]) ``` -------------------------------- ### Product Template Details Display Example Source: https://visual.bagistoplus.com/core-concepts/templates/available An example Blade snippet for a section within the Product Template, demonstrating how to display product name, short description, and price using the `$product` variable. ```blade @if (isset($product))

{{ $product->name }}

{{ $product->short_description }}

Price: {{ core()->currency($product->price) }}

@endif ``` -------------------------------- ### Example Bagisto Visual Template Files by Type Source: https://visual.bagistoplus.com/core-concepts/templates/overview This example lists various template files found within the `/templates/` directory, illustrating how different page types (homepage, product, category, cart, etc.) are associated with specific template formats (Blade, JSON, YAML). ```plaintext /templates/ ├── index.blade.php # Homepage template ├── product.json # Product page ├── category.json # Category page ├── cart.yaml # Cart page ├── checkout.yaml # Checkout page ├── page.yaml # CMS pages ├── search.json # Search results page ``` -------------------------------- ### Basic Header Blade Component Example Source: https://visual.bagistoplus.com/building-theme/adding-layouts Illustrates a simple Blade template for the `header.blade.php` component, containing basic navigation links. ```blade
``` -------------------------------- ### Basic Footer Blade Component Example Source: https://visual.bagistoplus.com/building-theme/adding-layouts Illustrates a simple Blade template for the `footer.blade.php` component, displaying a copyright notice. ```blade ``` -------------------------------- ### Index Template Basic Section Example Source: https://visual.bagistoplus.com/core-concepts/templates/available A simple Blade section example for the Index Template, demonstrating a basic welcome message when no specific variables are automatically exposed to sections. ```blade

Welcome to our Store!

``` -------------------------------- ### Full Home Page JSON/YAML Template Example Source: https://visual.bagistoplus.com/core-concepts/templates/json-template Provides a comprehensive example of a JSON or YAML template for a home page, demonstrating how multiple sections (hero, category list, featured products, newsletter) are defined with their respective settings and blocks, and ordered for display. ```JSON { "sections": { "hero": { "type": "visual-hero", "settings": { "image": "https://images.unsplash.com/photo-1441984904996-e0b6ba687e04", "size": "medium" }, "blocks": { "heading": { "type": "heading", "settings": { "heading": "Talk about your brand" } }, "text": { "type": "subheading", "settings": { "subheading": "Share details about your store" } }, "button": { "type": "button", "settings": { "text": "Browse store", "link": "/", "style": "secondary" } } } }, "category-list": { "type": "visual-category-list", "settings": { "heading": "Shop by category" }, "blocks": { "category-1": { "type": "category", "settings": { "category": 2 } }, "category-2": { "type": "category", "settings": { "category": 3 } } } }, "featured-products": { "type": "visual-featured-products", "settings": { "heading": "Featured products", "product_type": "featured", "nb_products": 4 } }, "newsletter": { "type": "visual-newsletter" } }, "order": ["hero", "category-list", "featured-products", "newsletter"] } ``` ```YAML sections: hero: type: visual-hero settings: image: https://images.unsplash.com/photo-1441984904996-e0b6ba687e04 size: medium blocks: heading: type: heading settings: heading: Talk about your brand text: type: subheading settings: subheading: Share details about your store button: type: button settings: text: Browse store link: / style: secondary category-list: type: visual-category-list settings: heading: Shop by category blocks: category-1: type: category settings: category: 2 category-2: type: category settings: category: 3 featured-products: type: visual-featured-products settings: heading: Featured products product_type: featured nb_products: 4 newsletter: type: visual-newsletter order: - hero - category-list - featured-products - newsletter ``` -------------------------------- ### Install Theme Prerequisite Source: https://visual.bagistoplus.com/building-theme/adding-sections/creating-section Before generating sections within a specific theme, ensure the theme package is already installed in your project using Composer. This command adds the theme to your project's dependencies. ```bash composer require themes/awesome-theme ``` -------------------------------- ### Page Template Content Display Example Source: https://visual.bagistoplus.com/core-concepts/templates/available An example Blade snippet for a section within the Page Template, demonstrating how to display the title and content of the `$page` variable. ```blade @if (isset($page))

{{ $page->title }}

{!! $page->content !!}
@endif ``` -------------------------------- ### Clone Bagisto Visual Starter Theme Source: https://visual.bagistoplus.com/building-theme/create-theme This command allows developers to start with a pre-built base theme instead of a blank one. It clones the official Bagisto Visual starter theme into the specified local packages directory, providing a complete working foundation that can be customized freely. ```bash git clone https://github.com/bagistoplus/visual-debut packages/Themes/YourThemeName ``` -------------------------------- ### Minimal Bagisto Visual Blade Layout Example Source: https://visual.bagistoplus.com/core-concepts/layouts This Blade template provides a minimal working example of a Bagisto Visual layout. It demonstrates the essential structure including HTML boilerplate, the `@stack('styles')` directive for CSS, `@visual_layout_content` for dynamic page content, and `@stack('scripts')` for JavaScript injection. ```blade @stack('styles')
@visual_layout_content
@stack('scripts') ``` -------------------------------- ### Define Theme Settings in PHP Source: https://visual.bagistoplus.com/core-concepts/settings/theme-settings An example `settings.php` file demonstrating how to define an array of setting groups, including color, font, and social media link settings using `BagistoPlus\Visual\Settings` classes. ```php 'Light Scheme Colors (default)', 'settings' => [ Settings\Color::make('light_background_color', 'Background') ->default('#ffffff') ->info('Default page color. Used for main page background and large content areas'), Settings\Color::make('light_primary_color', 'Primary') ->default('#92400e') ->info('Main brand color. Used for buttons and key elements'), // More color settings... ], ], [ 'name' => 'Typography', 'settings' => [ Settings\Font::make('heading_font', 'Heading Font') ->default('Inter'), Settings\Font::make('body_font', 'Body Font') ->default('Roboto'), ], ], [ 'name' => 'Social Media Links', 'settings' => [ Settings\Text::make('facebook_url', 'Facebook URL') ->default('https://www.facebook.com'), Settings\Text::make('instagram_url', 'Instagram URL') ->default('https://www.instagram.com'), Settings\Text::make('youtube_url', 'YouTube URL') ->default('https://www.youtube.com'), Settings\Text::make('tiktok_url', 'TikTok URL') ->default('https://www.tiktok.com'), Settings\Text::make('twitter_url', 'X/Twitter URL') ->default('https://www.x.com'), Settings\Text::make('snapchat_url', 'Snapchat') ->default('https://www.snapchat.com'), ], ], ]; ``` -------------------------------- ### Generate Bagisto Visual Theme with Default Vendor Source: https://visual.bagistoplus.com/building-theme/create-theme This command scaffolds a new theme named 'Awesome Theme' using the default 'Themes' vendor namespace. It creates the necessary directory structure and files for a new Bagisto Visual theme, simplifying the initial setup process. ```bash php artisan visual:make-theme "Awesome Theme" ``` -------------------------------- ### List Customer Orders (Blade) Source: https://visual.bagistoplus.com/core-concepts/templates/available Provides two Blade examples for displaying a list of customer orders. One uses a Bagisto datagrid component for dynamic rendering, and the other demonstrates a minimal manual fetch and loop through authenticated customer's orders. ```blade

My Orders

``` ```blade

My Orders

@foreach (auth('customer')->user()->orders as $order)

Order #{{ $order->id }} placed on {{ $order->created_at->format('M d, Y') }}

Total: {{ core()->currency($order->base_grand_total) }}

View Details
@endforeach
``` -------------------------------- ### Custom Theme Vendor Path Example Source: https://visual.bagistoplus.com/building-theme/create-theme This text snippet shows the resulting directory path when a custom vendor name is provided during theme generation. The theme files will be placed under `src/Packages/MyVendor/AwesomeTheme/`, reflecting the custom namespace. ```text src/Packages/MyVendor/AwesomeTheme/ ``` -------------------------------- ### Example Blade Template Content Source: https://visual.bagistoplus.com/building-theme/adding-templates This Blade template provides a simple HTML structure with a welcome message, intended to be rendered inside the theme's default layout. It demonstrates basic static content for a Bagisto Visual page, without needing `@extends` or `@section` directives. ```blade

Welcome to Awesome Theme

Your new store is ready to be customized.

``` -------------------------------- ### Blade Template Error Handling Example Source: https://visual.bagistoplus.com/core-concepts/templates/available An example Blade snippet demonstrating how to display a generic error message if an `$errorCode` variable is set, typically used for basic error page rendering. ```blade @if (isset($errorCode))

Error {{ $errorCode }}

Sorry, something went wrong.

@endif ``` -------------------------------- ### Display Customer Profile Information (Blade) Source: https://visual.bagistoplus.com/core-concepts/templates/available An example Blade section to display the authenticated customer's first name, last name, and email. It also includes a link to the profile editing page. ```blade

My Profile

Name: {{ auth('customer')->user()->first_name }} {{ auth('customer')->user()->last_name }}

Email: {{ auth('customer')->user()->email }}

Edit Profile
``` -------------------------------- ### Default Theme Vendor Path Example Source: https://visual.bagistoplus.com/building-theme/create-theme This text snippet illustrates the default directory path for a newly generated theme when no custom vendor is specified. The theme files are located under `src/Packages/Themes/AwesomeTheme/`, using the system's default theme namespace. ```text src/Packages/Themes/AwesomeTheme/ ``` -------------------------------- ### Example HTML Output for ColorScheme Application Source: https://visual.bagistoplus.com/core-concepts/settings/types Illustrates the resulting HTML structure when a `ColorScheme` is applied in a Blade template. The `data-color-scheme` attribute is crucial for scoping CSS styles based on the selected scheme. ```html
``` -------------------------------- ### Use Semantic HTML Examples Source: https://visual.bagistoplus.com/building-theme/best-practices/accessibility Illustrates the importance of using semantic HTML tags like

, , and
  • instead of generic
    or elements to convey structure and purpose, improving accessibility and SEO. ```HTML | Instead of... | Use... | | ------------------------- | ------------------------------ | | `
    ` | `

    ` | | `` | `` | | `
    ` | `
  • ` inside `