@extends('layouts.app') @section('title', 'B2B Portal Settings') @section('content') @include('b2bportal::partials.admin_style')

B2B Portal Settings

Configure store availability, wholesale pricing, default fulfilment location, and sharing links.

@include('b2bportal::admin.nav')

Portal Configuration

{!! Form::open(['url' => action([\Modules\B2BPortal\Http\Controllers\B2BPortalController::class, 'updateSettings']), 'method' => 'post']) !!}
B2B WhatsApp login OTP: Install and configure the WhatsApp Connect / Big Brains Flow module first. In WhatsApp Connect, add an active Meta Official template named B2B Login OTP. Its body parameter mapping should include {otp} where the OTP should be inserted.
{!! Form::label('default_location_id', 'Default Business Location') !!} {!! Form::select('default_location_id', $locations->pluck('name', 'id')->prepend('None', ''), $settings->default_location_id, ['class' => 'form-control select2', 'style' => 'width:100%']) !!}
{!! Form::label('default_price_group_id', 'Default Price Group') !!} {!! Form::select('default_price_group_id', $priceGroups->pluck('name', 'id')->prepend('None', ''), $settings->default_price_group_id, ['class' => 'form-control select2', 'style' => 'width:100%']) !!}
{!! Form::label('portal_moq', 'Global MOQ') !!} {!! Form::number('portal_moq', $settings->portal_moq, ['class' => 'form-control', 'min' => 1]) !!}

Checkout Payment Methods

Choose the methods customers can select. Bank transfer and UPI orders remain due until your staff verifies and records payment in QuickSell.

@php($enabledPayments = $settings->enabled_payment_methods ?: ['cod'])
@foreach(['cod' => 'Cash on Delivery', 'bank_transfer' => 'Bank Transfer', 'upi' => 'UPI', 'pay_later' => 'Pay on Account / Credit'] as $key => $label) @endforeach

At least one payment method is required.

{!! Form::label('bank_transfer_details', 'Bank Transfer Details') !!} {!! Form::textarea('bank_transfer_details', $settings->bank_transfer_details, ['class' => 'form-control', 'rows' => 4, 'placeholder' => "Bank name, account holder, account number, IFSC"] ) !!}
{!! Form::label('upi_id', 'UPI ID') !!} {!! Form::text('upi_id', $settings->upi_id, ['class' => 'form-control', 'placeholder' => 'yourbusiness@bank']) !!}
{!! Form::label('upi_payee_name', 'UPI Payee Name') !!} {!! Form::text('upi_payee_name', $settings->upi_payee_name, ['class' => 'form-control', 'placeholder' => 'Name shown in the customer’s UPI app']) !!}

Used as the NPCI pn field in the QR payload.

{!! Form::label('payment_instructions', 'General Payment Instructions') !!} {!! Form::textarea('payment_instructions', $settings->payment_instructions, ['class' => 'form-control', 'rows' => 2, 'placeholder' => 'Shown to customers during checkout']) !!}

Storefront Brand Logo

Your logo appears in the B2B store header. Use a square or horizontal transparent PNG, SVG, or WebP image for the best result.

{!! Form::label('storefront_logo_url', 'Logo Image URL') !!} {!! Form::url('storefront_logo_url', $settings->storefront_logo_url, ['class' => 'form-control', 'placeholder' => 'https://example.com/brand-logo.png']) !!}
@if(!empty($settings->storefront_logo_url))

Storefront logo
@endif

Storefront Hero Banner

This banner is shown at the top of your customer-facing B2B wholesale store. Leave image blank to use the premium built-in design.

{!! Form::label('storefront_banner_image_url', 'Banner Image URL') !!} {!! Form::url('storefront_banner_image_url', $settings->storefront_banner_image_url, ['class' => 'form-control', 'placeholder' => 'https://example.com/wholesale-banner.jpg']) !!}

Recommended: 1600 × 700 px or wider.

{!! Form::label('storefront_banner_title', 'Banner Headline') !!} {!! Form::text('storefront_banner_title', $settings->storefront_banner_title, ['class' => 'form-control', 'placeholder' => 'Wholesale buying, made simple']) !!}
{!! Form::label('storefront_banner_cta', 'Banner Button Text') !!} {!! Form::text('storefront_banner_cta', $settings->storefront_banner_cta, ['class' => 'form-control', 'placeholder' => 'Explore collection']) !!}
{!! Form::label('storefront_banner_text', 'Banner Supporting Text') !!} {!! Form::text('storefront_banner_text', $settings->storefront_banner_text, ['class' => 'form-control', 'placeholder' => 'Browse products, select variants, and place your wholesale order in minutes.']) !!}

Weight-Based Shipping

Formula: base charge covers the base weight, then each started additional weight step adds its charge. Product weights come from Product → Weight.

{!! Form::label('product_weight_unit', 'Product Weight Unit') !!} {!! Form::select('product_weight_unit', ['kg' => 'Kilograms (kg)', 'g' => 'Grams (g)'], $settings->product_weight_unit ?: 'kg', ['class' => 'form-control']) !!}
{!! Form::label('default_product_weight', 'Fallback Weight') !!} {!! Form::number('default_product_weight', $settings->default_product_weight ?? 0.5, ['class' => 'form-control', 'min' => 0, 'step' => '0.001']) !!}

Used if product weight is blank.

{!! Form::label('shipping_base_weight', 'Base Weight (kg)') !!} {!! Form::number('shipping_base_weight', $settings->shipping_base_weight ?? 1, ['class' => 'form-control', 'min' => 0, 'step' => '0.001']) !!}
{!! Form::label('shipping_base_charge', 'Base Charge') !!} {!! Form::number('shipping_base_charge', $settings->shipping_base_charge ?? 0, ['class' => 'form-control', 'min' => 0, 'step' => '0.01']) !!}
{!! Form::label('shipping_additional_weight_step', 'Extra Step (kg)') !!} {!! Form::number('shipping_additional_weight_step', $settings->shipping_additional_weight_step ?? 1, ['class' => 'form-control', 'min' => '0.001', 'step' => '0.001']) !!}
{!! Form::label('shipping_additional_weight_charge', 'Charge / Step') !!} {!! Form::number('shipping_additional_weight_charge', $settings->shipping_additional_weight_charge ?? 0, ['class' => 'form-control', 'min' => 0, 'step' => '0.01']) !!}
{!! Form::label('free_shipping_threshold', 'Free Shipping Order Value') !!} {!! Form::number('free_shipping_threshold', $settings->free_shipping_threshold, ['class' => 'form-control', 'min' => 0, 'step' => '0.01', 'placeholder' => 'Leave blank to disable']) !!}
{!! Form::label('api_token', 'API Token') !!}
{!! Form::label('store_url', 'Customer Store URL') !!}
Open Store

Custom Domain for B2B Storefront

Let customers open your B2B store directly on your own domain, for example wholesale.yourstore.com.

{!! Form::label('custom_domain', 'B2B Store Custom Domain') !!} {!! Form::text('custom_domain', $settings->custom_domain, ['class' => 'form-control', 'placeholder' => 'wholesale.yourstore.com']) !!}

Enter only domain/subdomain. Do not include https:// or paths.

{!! Form::label('domain_status', 'Domain Status') !!}

{{ ucfirst($settings->domain_status ?: 'pending') }}

DNS setup: Create a CNAME record pointing your B2B domain to your main POS domain, or add an A record pointing to this server IP. After DNS is pointed, Superadmin must mark this domain as Verified.
@if(!empty($settings->custom_domain) && $settings->domain_status == 'verified')
{!! Form::label('custom_store_url', 'Verified Custom Store URL') !!}
@endif
{!! Form::close() !!}
@endsection @section('javascript') @endsection