@extends('twill::layouts.free') @php $h2 = 'font-size: 16px; font-weight: 600; margin: 24px 0 8px;'; $box = 'border: 1px solid #ddd; border-radius: 6px; padding: 12px 16px; margin-top: 8px;'; $in = 'width: 100%; max-width: 36rem; display: block; margin-bottom: 8px;'; $localeInputs = function (string $name, string $label, bool $textarea = false) use ($locales) { foreach ($locales as $l) { $field = "{$name}[{$l}]"; $dot = str_replace(['[', ']'], ['.', ''], $field); echo ''; echo $textarea ? '' : ''; } }; @endphp @section('customPageContent')

Quick add product

Create a product together with its category, series and type in one go. Pick an existing item or choose Create new…. Images, files, related items and SEO are added afterwards on the product page. Blank English fields reuse the Indonesian text.

@if ($errors->any())
@foreach ($errors->all() as $error)
⚠ {{ $error }}
@endforeach
@endif
@csrf

1. Category

@php $localeInputs('new_category[title]', 'Category name'); $localeInputs('new_category[short_description]', 'Short description', true); @endphp

2. Brand

3. Series

@php $localeInputs('new_series[title]', 'Series name'); $localeInputs('new_series[short_description]', 'Short description', true); @endphp Uses the category and brand chosen above.

4. Type (optional)

@php $localeInputs('new_type[title]', 'Type name'); $localeInputs('new_type[short_description]', 'Short description', true); @endphp

5. Product

@php $localeInputs('product[title]', 'Product name'); $localeInputs('product[short_description]', 'Short description (card)', true); $localeInputs('product[full_description]', 'Full description', true); $localeInputs('product[key_features]', 'Key features', true); $localeInputs('product[suitable_for]', 'Suitable for', true); $localeInputs('product[benefits]', 'Benefits', true); $localeInputs('product[specs]', 'Specifications (HTML table)', true); @endphp

← Back to products

@endsection