Commit d88e8a2a by Dhanaraj

added new design

parent 215d2695
<?php
namespace App\Http\Controllers\Backend;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Country;
use App\Models\State;
use App\Models\City;
use App\Models\Unit;
use App\Models\UnitSize;
use App\Models\Size;
use App\Models\Category;
class AdminMasterDataController extends Controller
{
private function getModelClass($type) {
return match($type) {
'country', 'countries' => Country::class,
'state', 'states' => State::class,
'city', 'cities' => City::class,
'unit', 'units' => Unit::class,
'unitsizes' => UnitSize::class,
'size', 'sizes' => Size::class,
'category', 'categories' => Category::class,
'gallery', 'galleries' => \App\Models\Gallery::class,
default => null,
};
}
public function store(Request $request, $type)
{
$modelClass = $this->getModelClass($type);
if (!$modelClass) return back()->with('error', 'Invalid type');
$data = $request->except('_token');
$modelClass::create($data);
return back()->with('success', 'Record created successfully!');
}
public function update(Request $request, $type, $id)
{
$modelClass = $this->getModelClass($type);
if (!$modelClass) return back()->with('error', 'Invalid type');
$record = $modelClass::findOrFail($id);
$data = $request->except(['_token', '_method']);
$record->update($data);
return back()->with('success', 'Record updated successfully!');
}
public function destroy($type, $id)
{
$modelClass = $this->getModelClass($type);
if (!$modelClass) return back()->with('error', 'Invalid type');
$record = $modelClass::findOrFail($id);
$record->delete();
return back()->with('success', 'Record deleted successfully!');
}
}
<?php
namespace App\Http\Controllers\Backend;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Country;
use App\Models\State;
use App\Models\City;
use App\Models\Unit;
use App\Models\UnitSize;
use App\Models\Size;
use App\Models\Category;
use App\Models\Product;
use App\Models\ProductVariant;
use App\Models\Order;
use App\Models\Announcement;
use App\Models\Gallery;
use App\Models\Pincode;
use App\Models\Coupon;
use App\Models\Wishlist;
class AdminViewController extends Controller
{
public function dashboard() {
return view('admin.overview');
}
public function countries() {
$countries = Country::all();
return view('admin.country', compact('countries'));
}
public function states() {
$states = State::all();
return view('admin.state', compact('states'));
}
public function cities() {
$cities = City::all();
return view('admin.city', compact('cities'));
}
public function units() {
$units = Unit::all();
return view('admin.unit', compact('units'));
}
public function unitsizes() {
$unitsizes = UnitSize::all();
return view('admin.unitsizes', compact('unitsizes'));
}
public function sizes() {
$sizes = Size::all();
return view('admin.sizes', compact('sizes'));
}
public function categories() {
$categories = Category::all();
return view('admin.category', compact('categories'));
}
public function products() {
$products = Product::with('category')->get();
return view('admin.products', compact('products'));
}
public function productprices() {
$productprices = ProductVariant::with('product')->get();
return view('admin.productprices', compact('productprices'));
}
public function orders() {
$orders = Order::all();
return view('admin.orders', compact('orders'));
}
public function orderstatuschange() {
$orders = Order::all();
return view('admin.orderstatuschange', compact('orders'));
}
public function announcements() {
$announcements = Announcement::all();
return view('admin.announcements', compact('announcements'));
}
public function gallery() {
$gallery = Gallery::all();
return view('admin.gallery', compact('gallery'));
}
public function pincodes() {
$pincodes = Pincode::all();
return view('admin.pincodes', compact('pincodes'));
}
public function coupons() {
$coupons = Coupon::all();
return view('admin.coupons', compact('coupons'));
}
public function wishlist() {
$wishlists = Wishlist::with('product')->get();
return view('admin.wishlist', compact('wishlists'));
}
}
<?php
namespace App\Http\Controllers\Backend;
use App\Http\Controllers\Controller;
use Illuminate\Http\JsonResponse;
class CategoryController extends Controller
{
/**
* Get categories list.
*/
public function index(): JsonResponse
{
return response()->json([
'success' => true,
'message' => 'Categories inventory operations endpoint.'
]);
}
}
<?php
namespace App\Http\Controllers\Backend;
use App\Http\Controllers\Controller;
use App\Models\Order;
use App\Models\Product;
use Illuminate\Http\JsonResponse;
use Illuminate\View\View;
class DashboardController extends Controller
{
/**
* Render the admin dashboard master view.
*/
public function index(): View
{
return view('admin');
}
/**
* Get overview dashboard metrics.
*/
public function metrics(): JsonResponse
{
$totalSales = Order::where('payment_status', 'paid')->sum('total');
$activeOrders = Order::whereIn('order_status', ['pending', 'processing', 'shipped'])->count();
$totalProducts = Product::count();
$recentOrders = Order::latest()->limit(5)->get();
return response()->json([
'success' => true,
'data' => [
'metrics' => [
'total_sales' => $totalSales,
'active_orders' => $activeOrders,
'total_products' => $totalProducts,
],
'recent_orders' => $recentOrders
]
]);
}
}
<?php
namespace App\Http\Controllers\Backend;
use App\Http\Controllers\Controller;
use Illuminate\Http\JsonResponse;
class GalleryController extends Controller
{
/**
* Get gallery assets list.
*/
public function index(): JsonResponse
{
return response()->json([
'success' => true,
'message' => 'Showcase gallery media manager endpoint.'
]);
}
}
<?php
namespace App\Http\Controllers\Backend;
use App\Http\Controllers\Controller;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class GeographyController extends Controller
{
/**
* Get geographical list.
*/
public function index(): JsonResponse
{
return response()->json([
'success' => true,
'message' => 'Geographical data access endpoint.'
]);
}
}
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers\Backend;
use App\Models\Order; use App\Http\Controllers\Controller;
use App\Models\Product; use App\Models\Product;
use App\Models\Pincode;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class AdminController extends Controller class InventoryController extends Controller
{ {
/** /**
* Get overview dashboard metrics.
*/
public function metrics(): JsonResponse
{
$totalSales = Order::where('payment_status', 'paid')->sum('total');
$activeOrders = Order::whereIn('order_status', ['pending', 'processing', 'shipped'])->count();
$totalProducts = Product::count();
$recentOrders = Order::latest()->limit(5)->get();
return response()->json([
'success' => true,
'data' => [
'metrics' => [
'total_sales' => $totalSales,
'active_orders' => $activeOrders,
'total_products' => $totalProducts,
],
'recent_orders' => $recentOrders
]
]);
}
/**
* Store a newly created product. * Store a newly created product.
*/ */
public function storeProduct(Request $request): JsonResponse public function storeProduct(Request $request): JsonResponse
...@@ -43,11 +18,8 @@ class AdminController extends Controller ...@@ -43,11 +18,8 @@ class AdminController extends Controller
'category_id' => 'required|exists:categories,id', 'category_id' => 'required|exists:categories,id',
'name' => 'required|string|max:255', 'name' => 'required|string|max:255',
'slug' => 'required|string|unique:products,slug', 'slug' => 'required|string|unique:products,slug',
'description' => 'nullable|string',
'price' => 'required|numeric|min:0', 'price' => 'required|numeric|min:0',
'strike_price' => 'nullable|numeric|min:0',
'stock_quantity' => 'required|integer|min:0', 'stock_quantity' => 'required|integer|min:0',
'is_bestseller' => 'boolean'
]); ]);
$product = Product::create($request->all()); $product = Product::create($request->all());
...@@ -65,14 +37,6 @@ class AdminController extends Controller ...@@ -65,14 +37,6 @@ class AdminController extends Controller
public function updateProduct(Request $request, $id): JsonResponse public function updateProduct(Request $request, $id): JsonResponse
{ {
$product = Product::findOrFail($id); $product = Product::findOrFail($id);
$request->validate([
'name' => 'sometimes|string|max:255',
'slug' => 'sometimes|string|unique:products,slug,' . $product->id,
'price' => 'sometimes|numeric|min:0',
'stock_quantity' => 'sometimes|integer|min:0',
]);
$product->update($request->all()); $product->update($request->all());
return response()->json([ return response()->json([
...@@ -95,36 +59,4 @@ class AdminController extends Controller ...@@ -95,36 +59,4 @@ class AdminController extends Controller
'message' => 'Product removed successfully!' 'message' => 'Product removed successfully!'
]); ]);
} }
/**
* Get list of orders.
*/
public function orders(): JsonResponse
{
$orders = Order::with('items.product')->latest()->paginate(15);
return response()->json([
'success' => true,
'data' => $orders
]);
}
/**
* Update delivery status of an order.
*/
public function updateOrderStatus(Request $request, $id): JsonResponse
{
$request->validate([
'order_status' => 'required|string|in:pending,processing,shipped,delivered,cancelled',
'payment_status' => 'sometimes|string|in:pending,paid,failed'
]);
$order = Order::findOrFail($id);
$order->update($request->only(['order_status', 'payment_status']));
return response()->json([
'success' => true,
'message' => 'Order status updated successfully!',
'data' => $order
]);
}
} }
<?php
namespace App\Http\Controllers\Backend;
use App\Http\Controllers\Controller;
use Illuminate\Http\JsonResponse;
use App\Models\Announcement;
use Illuminate\Http\Request;
class MarketingController extends Controller
{
/**
* Get list of announcements.
*/
public function announcements(): JsonResponse
{
$announcements = Announcement::latest()->get();
return response()->json([
'success' => true,
'data' => $announcements
]);
}
/**
* Get active announcements for the homepage ticker.
*/
public function activeAnnouncements(): JsonResponse
{
$announcements = Announcement::where('status', 'Active')->latest()->get();
return response()->json([
'success' => true,
'data' => $announcements
]);
}
/**
* Store a new announcement.
*/
public function storeAnnouncement(Request $request): JsonResponse
{
$request->validate([
'content' => 'required|string|max:255',
'icon' => 'nullable|string|max:50',
'status' => 'nullable|string|in:Active,Inactive'
]);
$announcement = Announcement::create($request->all());
return response()->json([
'success' => true,
'message' => 'Announcement added successfully!',
'data' => $announcement
], 201);
}
/**
* Update an announcement.
*/
public function updateAnnouncement(Request $request, $id): JsonResponse
{
$announcement = Announcement::findOrFail($id);
$request->validate([
'content' => 'sometimes|required|string|max:255',
'icon' => 'nullable|string|max:50',
'status' => 'sometimes|required|string|in:Active,Inactive'
]);
$announcement->update($request->all());
return response()->json([
'success' => true,
'message' => 'Announcement updated successfully!',
'data' => $announcement
]);
}
/**
* Delete an announcement.
*/
public function destroyAnnouncement($id): JsonResponse
{
$announcement = Announcement::findOrFail($id);
$announcement->delete();
return response()->json([
'success' => true,
'message' => 'Announcement deleted successfully!'
]);
}
/**
* Get active marketing campaign details.
*/
public function campaigns(): JsonResponse
{
return response()->json([
'success' => true,
'message' => 'Active marketing systems operations endpoint.'
]);
}
}
<?php
namespace App\Http\Controllers\Backend;
use App\Http\Controllers\Controller;
use App\Models\Order;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class OrderController extends Controller
{
/**
* Get list of orders.
*/
public function index(): JsonResponse
{
$orders = Order::with('items.product')->latest()->paginate(15);
return response()->json([
'success' => true,
'data' => $orders
]);
}
/**
* Update delivery status of an order.
*/
public function updateOrderStatus(Request $request, $id): JsonResponse
{
$request->validate([
'order_status' => 'required|string|in:pending,processing,shipped,delivered,cancelled',
]);
$order = Order::findOrFail($id);
$order->update($request->only(['order_status']));
return response()->json([
'success' => true,
'message' => 'Order status updated successfully!',
'data' => $order
]);
}
}
<?php
namespace App\Http\Controllers\Backend;
use App\Http\Controllers\Controller;
use Illuminate\Http\JsonResponse;
class ShippingController extends Controller
{
/**
* Get serviceable regions.
*/
public function index(): JsonResponse
{
return response()->json([
'success' => true,
'message' => 'Serviceable regions shipping operations endpoint.'
]);
}
}
...@@ -14,7 +14,7 @@ class CatalogController extends Controller ...@@ -14,7 +14,7 @@ class CatalogController extends Controller
*/ */
public function categories(): JsonResponse public function categories(): JsonResponse
{ {
$categories = Category::all(); $categories = Category::withCount('products')->get();
return response()->json([ return response()->json([
'success' => true, 'success' => true,
'data' => $categories 'data' => $categories
...@@ -26,10 +26,10 @@ class CatalogController extends Controller ...@@ -26,10 +26,10 @@ class CatalogController extends Controller
*/ */
public function products(Request $request): JsonResponse public function products(Request $request): JsonResponse
{ {
$query = Product::with(['primaryImage', 'category']); $query = Product::with(['primaryImage', 'category', 'variants']);
// Filter by category slug // Filter by category slug
if ($request->has('category')) { if ($request->has('category') && $request->input('category') !== 'all') {
$query->whereHas('category', function ($q) use ($request) { $query->whereHas('category', function ($q) use ($request) {
$q->where('slug', $request->input('category')); $q->where('slug', $request->input('category'));
}); });
...@@ -40,6 +40,25 @@ class CatalogController extends Controller ...@@ -40,6 +40,25 @@ class CatalogController extends Controller
$query->where('is_bestseller', true); $query->where('is_bestseller', true);
} }
// Search filter
if ($request->has('search') && !empty($request->input('search'))) {
$searchTerm = $request->input('search');
$query->where(function ($q) use ($searchTerm) {
$q->where('name', 'like', '%' . $searchTerm . '%')
->orWhere('description', 'like', '%' . $searchTerm . '%');
});
}
// Sorting
$sort = $request->input('sort', 'latest');
if ($sort === 'price_low') {
$query->orderBy('price', 'asc');
} elseif ($sort === 'price_high') {
$query->orderBy('price', 'desc');
} else {
$query->orderBy('id', 'desc');
}
$products = $query->paginate(12); $products = $query->paginate(12);
return response()->json([ return response()->json([
......
...@@ -100,6 +100,7 @@ class CheckoutController extends Controller ...@@ -100,6 +100,7 @@ class CheckoutController extends Controller
$order = Order::create([ $order = Order::create([
'order_number' => $orderNumber, 'order_number' => $orderNumber,
'customer_id' => $request->session()->get('customer_id'),
'customer_name' => $request->input('customer_name'), 'customer_name' => $request->input('customer_name'),
'email' => $request->input('email'), 'email' => $request->input('email'),
'phone' => $request->input('phone'), 'phone' => $request->input('phone'),
......
<?php
namespace App\Http\Controllers;
abstract class Controller
{
//
}
<?php
namespace App\Http\Controllers;
use App\Models\Customer;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
class CustomerAuthController extends Controller
{
/**
* Register a new customer.
*/
public function register(Request $request): JsonResponse
{
$request->validate([
'name' => 'required|string|max:255',
'email' => 'required|email|unique:customers,email|max:255',
'password' => 'required|string|min:6',
]);
$customer = Customer::create([
'name' => $request->input('name'),
'email' => $request->input('email'),
'password' => $request->input('password'), // Will be hashed automatically by the cast in the model
]);
// Put customer into session
$request->session()->put('customer_id', $customer->id);
$request->session()->put('customer_name', $customer->name);
$request->session()->put('customer_email', $customer->email);
return response()->json([
'success' => true,
'message' => 'Registration successful!',
'data' => [
'name' => $customer->name,
'email' => $customer->email,
]
], 201);
}
/**
* Log in a customer.
*/
public function login(Request $request): JsonResponse
{
$request->validate([
'email' => 'required|email',
'password' => 'required|string',
]);
$customer = Customer::where('email', $request->input('email'))->first();
if (!$customer || !Hash::check($request->input('password'), $customer->password)) {
return response()->json([
'success' => false,
'message' => 'Invalid email or password.'
], 401);
}
// Put customer into session
$request->session()->put('customer_id', $customer->id);
$request->session()->put('customer_name', $customer->name);
$request->session()->put('customer_email', $customer->email);
return response()->json([
'success' => true,
'message' => 'Login successful!',
'data' => [
'name' => $customer->name,
'email' => $customer->email,
]
]);
}
/**
* Log out a customer.
*/
public function logout(Request $request): JsonResponse
{
$request->session()->forget(['customer_id', 'customer_name', 'customer_email']);
return response()->json([
'success' => true,
'message' => 'Logged out successfully.'
]);
}
/**
* Get active login status of customer.
*/
public function status(Request $request): JsonResponse
{
if ($request->session()->has('customer_id')) {
return response()->json([
'success' => true,
'logged_in' => true,
'data' => [
'name' => $request->session()->get('customer_name'),
'email' => $request->session()->get('customer_email'),
]
]);
}
return response()->json([
'success' => true,
'logged_in' => false,
]);
}
/**
* Get orders for the logged-in customer.
*/
public function orders(Request $request): JsonResponse
{
if (!$request->session()->has('customer_id')) {
return response()->json([
'success' => false,
'message' => 'Unauthorized.',
], 401);
}
$customerId = $request->session()->get('customer_id');
$customer = Customer::with('orders.items')->find($customerId);
if (!$customer) {
return response()->json([
'success' => false,
'message' => 'Customer not found.',
], 404);
}
return response()->json([
'success' => true,
'data' => $customer->orders
]);
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Product;
use App\Models\Category;
class FrontendController extends Controller
{
public function ourCollection()
{
$categories = Category::all();
// Assuming we show products with their category
$products = Product::with('category')->where('stock_quantity', '>', 0)->get();
return view('catalog', compact('categories', 'products'));
}
public function productDetail($slug)
{
$product = Product::with(['category'])->where('slug', $slug)->firstOrFail();
// Fetch related products (same category)
$relatedProducts = Product::where('category_id', $product->category_id)
->where('id', '!=', $product->id)
->take(4)
->get();
return view('product-detail', compact('product', 'relatedProducts'));
}
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Announcement extends Model
{
protected $fillable = ['content', 'icon', 'status'];
}
...@@ -8,6 +8,8 @@ use Illuminate\Database\Eloquent\Relations\HasMany; ...@@ -8,6 +8,8 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
class Category extends Model class Category extends Model
{ {
protected $guarded = [];
use HasFactory; use HasFactory;
protected $fillable = [ protected $fillable = [
......
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class City extends Model
{
protected $guarded = [];
//
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Country extends Model
{
protected $guarded = [];
//
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class Customer extends Authenticatable
{
use HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'email',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'password' => 'hashed',
];
/**
* Get the orders for the customer.
*/
public function orders()
{
return $this->hasMany(Order::class);
}
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Gallery extends Model
{
protected $guarded = [];
}
...@@ -12,6 +12,7 @@ class Order extends Model ...@@ -12,6 +12,7 @@ class Order extends Model
protected $fillable = [ protected $fillable = [
'order_number', 'order_number',
'customer_id',
'customer_name', 'customer_name',
'email', 'email',
'phone', 'phone',
...@@ -29,6 +30,14 @@ class Order extends Model ...@@ -29,6 +30,14 @@ class Order extends Model
]; ];
/** /**
* Get the customer that owns the order.
*/
public function customer()
{
return $this->belongsTo(Customer::class);
}
/**
* Get the items for the order. * Get the items for the order.
*/ */
public function items(): HasMany public function items(): HasMany
......
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Size extends Model
{
protected $guarded = [];
//
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class State extends Model
{
protected $guarded = [];
//
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Unit extends Model
{
protected $guarded = [];
//
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class UnitSize extends Model
{
protected $guarded = [];
//
}
...@@ -6,7 +6,10 @@ use Illuminate\Foundation\Configuration\Middleware; ...@@ -6,7 +6,10 @@ use Illuminate\Foundation\Configuration\Middleware;
return Application::configure(basePath: dirname(__DIR__)) return Application::configure(basePath: dirname(__DIR__))
->withRouting( ->withRouting(
web: __DIR__.'/../routes/web.php', web: [
__DIR__.'/../routes/web.php',
__DIR__.'/../routes/backend.php',
],
api: __DIR__.'/../routes/api.php', api: __DIR__.'/../routes/api.php',
commands: __DIR__.'/../routes/console.php', commands: __DIR__.'/../routes/console.php',
health: '/up', health: '/up',
......
<?php return array (
'laravel/tinker' =>
array (
'providers' =>
array (
0 => 'Laravel\\Tinker\\TinkerServiceProvider',
),
),
'nesbot/carbon' =>
array (
'providers' =>
array (
0 => 'Carbon\\Laravel\\ServiceProvider',
),
),
'nunomaduro/termwind' =>
array (
'providers' =>
array (
0 => 'Termwind\\Laravel\\TermwindServiceProvider',
),
),
);
\ No newline at end of file
<?php return array (
'providers' =>
array (
0 => 'Illuminate\\Auth\\AuthServiceProvider',
1 => 'Illuminate\\Broadcasting\\BroadcastServiceProvider',
2 => 'Illuminate\\Bus\\BusServiceProvider',
3 => 'Illuminate\\Cache\\CacheServiceProvider',
4 => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
5 => 'Illuminate\\Concurrency\\ConcurrencyServiceProvider',
6 => 'Illuminate\\Cookie\\CookieServiceProvider',
7 => 'Illuminate\\Database\\DatabaseServiceProvider',
8 => 'Illuminate\\Encryption\\EncryptionServiceProvider',
9 => 'Illuminate\\Filesystem\\FilesystemServiceProvider',
10 => 'Illuminate\\Foundation\\Providers\\FoundationServiceProvider',
11 => 'Illuminate\\Hashing\\HashServiceProvider',
12 => 'Illuminate\\Mail\\MailServiceProvider',
13 => 'Illuminate\\Notifications\\NotificationServiceProvider',
14 => 'Illuminate\\Pagination\\PaginationServiceProvider',
15 => 'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider',
16 => 'Illuminate\\Pipeline\\PipelineServiceProvider',
17 => 'Illuminate\\Queue\\QueueServiceProvider',
18 => 'Illuminate\\Redis\\RedisServiceProvider',
19 => 'Illuminate\\Session\\SessionServiceProvider',
20 => 'Illuminate\\Translation\\TranslationServiceProvider',
21 => 'Illuminate\\Validation\\ValidationServiceProvider',
22 => 'Illuminate\\View\\ViewServiceProvider',
23 => 'Laravel\\Tinker\\TinkerServiceProvider',
24 => 'Carbon\\Laravel\\ServiceProvider',
25 => 'Termwind\\Laravel\\TermwindServiceProvider',
26 => 'App\\Providers\\AppServiceProvider',
),
'eager' =>
array (
0 => 'Illuminate\\Auth\\AuthServiceProvider',
1 => 'Illuminate\\Cookie\\CookieServiceProvider',
2 => 'Illuminate\\Database\\DatabaseServiceProvider',
3 => 'Illuminate\\Encryption\\EncryptionServiceProvider',
4 => 'Illuminate\\Filesystem\\FilesystemServiceProvider',
5 => 'Illuminate\\Foundation\\Providers\\FoundationServiceProvider',
6 => 'Illuminate\\Notifications\\NotificationServiceProvider',
7 => 'Illuminate\\Pagination\\PaginationServiceProvider',
8 => 'Illuminate\\Session\\SessionServiceProvider',
9 => 'Illuminate\\View\\ViewServiceProvider',
10 => 'Carbon\\Laravel\\ServiceProvider',
11 => 'Termwind\\Laravel\\TermwindServiceProvider',
12 => 'App\\Providers\\AppServiceProvider',
),
'deferred' =>
array (
'Illuminate\\Broadcasting\\BroadcastManager' => 'Illuminate\\Broadcasting\\BroadcastServiceProvider',
'Illuminate\\Contracts\\Broadcasting\\Factory' => 'Illuminate\\Broadcasting\\BroadcastServiceProvider',
'Illuminate\\Contracts\\Broadcasting\\Broadcaster' => 'Illuminate\\Broadcasting\\BroadcastServiceProvider',
'Illuminate\\Bus\\Dispatcher' => 'Illuminate\\Bus\\BusServiceProvider',
'Illuminate\\Contracts\\Bus\\Dispatcher' => 'Illuminate\\Bus\\BusServiceProvider',
'Illuminate\\Contracts\\Bus\\QueueingDispatcher' => 'Illuminate\\Bus\\BusServiceProvider',
'Illuminate\\Bus\\BatchRepository' => 'Illuminate\\Bus\\BusServiceProvider',
'Illuminate\\Bus\\DatabaseBatchRepository' => 'Illuminate\\Bus\\BusServiceProvider',
'cache' => 'Illuminate\\Cache\\CacheServiceProvider',
'cache.store' => 'Illuminate\\Cache\\CacheServiceProvider',
'cache.psr6' => 'Illuminate\\Cache\\CacheServiceProvider',
'memcached.connector' => 'Illuminate\\Cache\\CacheServiceProvider',
'Illuminate\\Cache\\RateLimiter' => 'Illuminate\\Cache\\CacheServiceProvider',
'Illuminate\\Foundation\\Console\\AboutCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Cache\\Console\\ClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Cache\\Console\\ForgetCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ClearCompiledCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Auth\\Console\\ClearResetsCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ConfigCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ConfigClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ConfigShowCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\DbCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\MonitorCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\PruneCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\ShowCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\TableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\WipeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\DownCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\EnvironmentCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\EnvironmentDecryptCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\EnvironmentEncryptCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\EventCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\EventClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\EventListCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Concurrency\\Console\\InvokeSerializedClosureCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\KeyGenerateCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\OptimizeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\OptimizeClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\PackageDiscoverCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Cache\\Console\\PruneStaleTagsCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\ClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\ListFailedCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\FlushFailedCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\ForgetFailedCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\ListenCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\MonitorCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\PruneBatchesCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\PruneFailedJobsCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\RestartCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\RetryCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\RetryBatchCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\WorkCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\RouteCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\RouteClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\RouteListCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\DumpCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\Seeds\\SeedCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Console\\Scheduling\\ScheduleFinishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Console\\Scheduling\\ScheduleListCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Console\\Scheduling\\ScheduleRunCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Console\\Scheduling\\ScheduleClearCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Console\\Scheduling\\ScheduleTestCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Console\\Scheduling\\ScheduleWorkCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Console\\Scheduling\\ScheduleInterruptCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\ShowModelCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\StorageLinkCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\StorageUnlinkCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\UpCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ViewCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ViewClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ApiInstallCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\BroadcastingInstallCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Cache\\Console\\CacheTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\CastMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ChannelListCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ChannelMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ClassMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ComponentMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ConfigPublishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ConsoleMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Routing\\Console\\ControllerMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\DocsCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\EnumMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\EventGenerateCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\EventMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ExceptionMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\Factories\\FactoryMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\InterfaceMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\JobMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\JobMiddlewareMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\LangPublishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ListenerMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\MailMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Routing\\Console\\MiddlewareMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ModelMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\NotificationMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Notifications\\Console\\NotificationTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ObserverMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\PolicyMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ProviderMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\FailedTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\TableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Queue\\Console\\BatchesTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\RequestMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ResourceMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\RuleMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ScopeMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\Seeds\\SeederMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Session\\Console\\SessionTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ServeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\StubPublishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\TestMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\TraitMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\VendorPublishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Foundation\\Console\\ViewMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'migrator' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'migration.repository' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'migration.creator' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\Migrations\\MigrateCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\Migrations\\FreshCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\Migrations\\InstallCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\Migrations\\RefreshCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\Migrations\\ResetCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\Migrations\\RollbackCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\Migrations\\StatusCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Database\\Console\\Migrations\\MigrateMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'composer' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Concurrency\\ConcurrencyManager' => 'Illuminate\\Concurrency\\ConcurrencyServiceProvider',
'hash' => 'Illuminate\\Hashing\\HashServiceProvider',
'hash.driver' => 'Illuminate\\Hashing\\HashServiceProvider',
'mail.manager' => 'Illuminate\\Mail\\MailServiceProvider',
'mailer' => 'Illuminate\\Mail\\MailServiceProvider',
'Illuminate\\Mail\\Markdown' => 'Illuminate\\Mail\\MailServiceProvider',
'auth.password' => 'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider',
'auth.password.broker' => 'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider',
'Illuminate\\Contracts\\Pipeline\\Hub' => 'Illuminate\\Pipeline\\PipelineServiceProvider',
'pipeline' => 'Illuminate\\Pipeline\\PipelineServiceProvider',
'queue' => 'Illuminate\\Queue\\QueueServiceProvider',
'queue.connection' => 'Illuminate\\Queue\\QueueServiceProvider',
'queue.failer' => 'Illuminate\\Queue\\QueueServiceProvider',
'queue.listener' => 'Illuminate\\Queue\\QueueServiceProvider',
'queue.worker' => 'Illuminate\\Queue\\QueueServiceProvider',
'redis' => 'Illuminate\\Redis\\RedisServiceProvider',
'redis.connection' => 'Illuminate\\Redis\\RedisServiceProvider',
'translator' => 'Illuminate\\Translation\\TranslationServiceProvider',
'translation.loader' => 'Illuminate\\Translation\\TranslationServiceProvider',
'validator' => 'Illuminate\\Validation\\ValidationServiceProvider',
'validation.presence' => 'Illuminate\\Validation\\ValidationServiceProvider',
'Illuminate\\Contracts\\Validation\\UncompromisedVerifier' => 'Illuminate\\Validation\\ValidationServiceProvider',
'command.tinker' => 'Laravel\\Tinker\\TinkerServiceProvider',
),
'when' =>
array (
'Illuminate\\Broadcasting\\BroadcastServiceProvider' =>
array (
),
'Illuminate\\Bus\\BusServiceProvider' =>
array (
),
'Illuminate\\Cache\\CacheServiceProvider' =>
array (
),
'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider' =>
array (
),
'Illuminate\\Concurrency\\ConcurrencyServiceProvider' =>
array (
),
'Illuminate\\Hashing\\HashServiceProvider' =>
array (
),
'Illuminate\\Mail\\MailServiceProvider' =>
array (
),
'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider' =>
array (
),
'Illuminate\\Pipeline\\PipelineServiceProvider' =>
array (
),
'Illuminate\\Queue\\QueueServiceProvider' =>
array (
),
'Illuminate\\Redis\\RedisServiceProvider' =>
array (
),
'Illuminate\\Translation\\TranslationServiceProvider' =>
array (
),
'Illuminate\\Validation\\ValidationServiceProvider' =>
array (
),
'Laravel\\Tinker\\TinkerServiceProvider' =>
array (
),
),
);
\ No newline at end of file
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration');
});
Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('announcements', function (Blueprint $table) {
$table->id();
$table->string('content');
$table->string('icon')->default('fa-bullhorn');
$table->string('status')->default('Active'); // Active, Inactive
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('announcements');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('customers', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('customers');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('orders', function (Blueprint $table) {
$table->unsignedBigInteger('customer_id')->nullable()->after('id');
$table->foreign('customer_id')->references('id')->on('customers')->onDelete('set null');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('orders', function (Blueprint $table) {
$table->dropForeign(['customer_id']);
$table->dropColumn('customer_id');
});
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('countries', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('code')->unique();
$table->string('status')->default('Active');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('countries');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('states', function (Blueprint $table) {
$table->id();
$table->string('country');
$table->string('name');
$table->string('status')->default('Active');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('states');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cities', function (Blueprint $table) {
$table->id();
$table->string('state');
$table->string('name');
$table->string('status')->default('Active');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cities');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('units', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('code')->unique();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('units');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('unit_sizes', function (Blueprint $table) {
$table->id();
$table->string('identifier');
$table->string('unit');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('unit_sizes');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('sizes', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('code')->unique();
$table->string('status')->default('Active');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('sizes');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('galleries', function (Blueprint $table) {
$table->id();
$table->string('filename');
$table->string('url');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('galleries');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('galleries', function (Blueprint $table) {
$table->string('status')->default('Active');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('galleries', function (Blueprint $table) {
$table->dropColumn('status');
});
}
};
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class AnnouncementSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
\App\Models\Announcement::create([
'content' => 'Delivered within 3 days in Chennai',
'icon' => 'fa-truck',
'status' => 'Active'
]);
\App\Models\Announcement::create([
'content' => 'New arrivals every week check them out!',
'icon' => 'fa-star',
'status' => 'Active'
]);
\App\Models\Announcement::create([
'content' => 'Use code OCEAN10 for 10% off your first order',
'icon' => 'fa-tag',
'status' => 'Active'
]);
\App\Models\Announcement::create([
'content' => '4-7 days all-India shipping available',
'icon' => 'fa-box',
'status' => 'Active'
]);
}
}
<?php
namespace Database\Seeders;
use App\Models\Category;
use App\Models\Product;
use App\Models\ProductImage;
use Illuminate\Database\Seeder;
use Illuminate\Support\Str;
class ProductSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// 1. Ensure Categories exist
$cats = [
'Seashell Hand Crafts' => 'seashell-hand-crafts',
'Fancy Decorative Items' => 'fancy-decorative-items',
'Gift Articles' => 'gift-articles',
'Ocean Theme Decor' => 'ocean-theme-decor',
'Handmade Shell Jewelry' => 'handmade-shell-jewelry',
'Beach Souvenirs' => 'beach-souvenirs'
];
$categoryMap = [];
foreach ($cats as $name => $slug) {
$categoryMap[$slug] = Category::firstOrCreate(
['slug' => $slug],
['name' => $name, 'image_url' => 'https://images.unsplash.com/photo-1595855759920-86582396756a?w=600']
);
}
// Define 60 high-quality products distributed across categories
$productsData = [
// Fancy Decorative Items
[
'category_slug' => 'fancy-decorative-items',
'name' => 'Decorative Shell Wall Frame',
'description' => 'Exquisite wall decoration frame meticulously crafted with hand-picked premium scallop and conch shells from the coasts of Tamil Nadu.',
'price' => 850.00,
'strike_price' => 999.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'fancy-decorative-items',
'name' => 'Iridescent Conch Table Lamp',
'description' => 'Stunning table nightlamp crafted using a large polished Queen Conch shell that diffuses warm, cozy ocean vibes.',
'price' => 1200.00,
'strike_price' => 1450.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1513519245088-0e12902e5a38?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'fancy-decorative-items',
'name' => 'Scallop & Conch Dreamcatcher',
'description' => 'A beautifully designed ocean-style dreamcatcher woven with natural scallop shells, miniature conches, and white feathers.',
'price' => 550.00,
'strike_price' => 650.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'fancy-decorative-items',
'name' => 'Abalone Shell Soap Dish',
'description' => 'Beautiful naturally polished abalone shell with vibrant iridescent teal and green hues. Perfect as a bathroom soap dish.',
'price' => 350.00,
'strike_price' => 450.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1595855759920-86582396756a?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'fancy-decorative-items',
'name' => 'Mussel Shell Tea Light Cup',
'description' => 'A stunning candle holding accessory embedded with shimmering black and violet blue mussel shells.',
'price' => 280.00,
'strike_price' => 350.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1603006905003-be475563bc59?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'fancy-decorative-items',
'name' => 'Oyster Shell Ring Dish',
'description' => 'Elegant jewelry holding bowl lined with golden paint and lined with polished pearl oyster flakes.',
'price' => 450.00,
'strike_price' => 590.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1535632066927-ab7c9ab60908?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'fancy-decorative-items',
'name' => 'Chambered Nautilus Shell Print',
'description' => 'An organic wall framed display showcasing the cross section of a real chambered nautilus showing off its logarithmic spiral.',
'price' => 1950.00,
'strike_price' => 2450.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1608976451610-85f0eb12a4b8?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'fancy-decorative-items',
'name' => 'Capiz Shell Floating Mobile',
'description' => 'Gentle hanging ceiling fixture featuring circles of capiz shells that produce sweet musical sounds with the wind.',
'price' => 750.00,
'strike_price' => 899.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1471922694854-ff1b63b20054?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'fancy-decorative-items',
'name' => 'Spiny Spondylus Display Piece',
'description' => 'Rare, bright orange spiny oyster spondylus specimen mounted on a wooden stand for mantle decor.',
'price' => 1800.00,
'strike_price' => 2200.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1542838132-92c53300491e?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'fancy-decorative-items',
'name' => 'Giant Clam Accent Vessel',
'description' => 'A large premium cast resin reproduction of a classic giant clam shell, ideal for holding towels, fruits, or potpourri.',
'price' => 2400.00,
'strike_price' => 2900.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=800&auto=format&fit=crop&q=80'
],
// Ocean Theme Decor
[
'category_slug' => 'ocean-theme-decor',
'name' => 'Seashell Wind Chime',
'description' => 'Gentle sounding wind chime made of natural multi-coloured capiz and conch shells. Perfect for breezy balconies and doorways.',
'price' => 450.00,
'strike_price' => 535.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'ocean-theme-decor',
'name' => 'Golden Cowrie Door Garland',
'description' => 'A magnificent welcome door garland beautifully constructed with golden tiger cowrie shells and green beads.',
'price' => 780.00,
'strike_price' => 950.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1595855759920-86582396756a?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'ocean-theme-decor',
'name' => 'Starfish Wall Hanging Tassels',
'description' => 'Boho style jute tassel garland decorated with dried natural starfishes and white pointer shells.',
'price' => 399.00,
'strike_price' => 499.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1471922694854-ff1b63b20054?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'ocean-theme-decor',
'name' => 'Capiz Shell Chime Panel',
'description' => 'A wide panel chime with 5 rows of translucent capiz shells that capture light and wind.',
'price' => 850.00,
'strike_price' => 999.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'ocean-theme-decor',
'name' => 'Auger Shell Door Curtain',
'description' => 'Full length door hanging strings beaded with hundreds of natural cream colored auger shells.',
'price' => 1490.00,
'strike_price' => 1790.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1542838132-92c53300491e?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'ocean-theme-decor',
'name' => 'Calico Scallop Bunting',
'description' => 'A sweet banner string constructed with pink, purple and orange calico scallop shells. Ideal for kids bedrooms.',
'price' => 320.00,
'strike_price' => 420.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1595855759920-86582396756a?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'ocean-theme-decor',
'name' => 'Driftwood & Shell Chime',
'description' => 'Artistic fusion of weathered coastal driftwood with dangling rings of tiny conch shells.',
'price' => 590.00,
'strike_price' => 690.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1603006905003-be475563bc59?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'ocean-theme-decor',
'name' => 'Tiger Cowrie Feng Shui Cluster',
'description' => 'Special set of 5 tiger cowrie shells meant to bring coastal breeze, prosperity and good fortune to your tables.',
'price' => 499.00,
'strike_price' => 599.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1535632066927-ab7c9ab60908?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'ocean-theme-decor',
'name' => 'Cone Shell Curtain Tiebacks',
'description' => 'Jute rope tiebacks finished with heavy conch and cone shell toggles for a gorgeous beach cottage feel.',
'price' => 450.00,
'strike_price' => 550.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'ocean-theme-decor',
'name' => 'Spiral Shell Wind Flutes',
'description' => 'Hanging wind pipes built using cylindrical shell bodies that sing low tone music with breezes.',
'price' => 690.00,
'strike_price' => 850.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=800&auto=format&fit=crop&q=80'
],
// Gift Articles
[
'category_slug' => 'gift-articles',
'name' => 'Ocean Gift Hamper Box',
'description' => 'A curated gift collection chest containing miniature shell decorative models, a tiny conch vessel, and shell candles.',
'price' => 1850.00,
'strike_price' => 2335.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'gift-articles',
'name' => 'Mother of Pearl Keepsake Chest',
'description' => 'A lovely keepsake chest encrusted with genuine polished mother of pearl shells. Ideal gift for weddings and anniversaries.',
'price' => 1400.00,
'strike_price' => 1650.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1535632066927-ab7c9ab60908?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'gift-articles',
'name' => 'Sacred White Dakshinavarti Shankh',
'description' => 'Highly auspicious, smooth right-handed blowing conch shell ideal for prayers and home cleansing rituals.',
'price' => 2499.00,
'strike_price' => 2999.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1608976451610-85f0eb12a4b8?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'gift-articles',
'name' => 'Premium Shell Blessings Tray',
'description' => 'A beautiful pooja blessings plate embellished with white cowries and pink scallops for sacred offerings.',
'price' => 890.00,
'strike_price' => 1100.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1542838132-92c53300491e?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'gift-articles',
'name' => 'Miniature Conch Trumpet Box',
'description' => 'A beautiful small presentation box containing a micro-blowing shankh for ritual prayers.',
'price' => 699.00,
'strike_price' => 799.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1595855759920-86582396756a?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'gift-articles',
'name' => 'Tritons Trumpet Shell Keepsake',
'description' => 'A giant natural Tritons Trumpet shell beautifully polished to reveal dark leopard spots. A premium collector gift.',
'price' => 4500.00,
'strike_price' => 5200.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1608976451610-85f0eb12a4b8?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'gift-articles',
'name' => 'Polished Nautilus Gift Set',
'description' => 'Beautiful natural chambered nautilus shell mounted on metallic stand inside luxury velvet gift packaging.',
'price' => 3200.00,
'strike_price' => 3800.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1471922694854-ff1b63b20054?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'gift-articles',
'name' => 'Pearl Oyster Shell Tray',
'description' => 'A magnificent gift tray with full iridescent pearl oyster shell coverage and silver painted boundaries.',
'price' => 1250.00,
'strike_price' => 1450.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1535632066927-ab7c9ab60908?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'gift-articles',
'name' => 'Deluxe Shoreline Gift Basket',
'description' => 'An elegant coastal gift basket filled with organic sea sponges, shell candles, and dried sea ferns.',
'price' => 1990.00,
'strike_price' => 2400.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'gift-articles',
'name' => 'Sea Glass & Shell Gift Vial',
'description' => 'A corked glass vial holding authentic frosted sea glass flakes and tiny polished tellin shells.',
'price' => 250.00,
'strike_price' => 350.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=800&auto=format&fit=crop&q=80'
],
// Seashell Hand Crafts
[
'category_slug' => 'seashell-hand-crafts',
'name' => 'Personalized Shell Name Plate',
'description' => 'Elegant nameplate custom embellished with white cowrie and pink scallop shells. A beautiful addition to your house entrance.',
'price' => 850.00,
'strike_price' => 935.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1595855759920-86582396756a?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'seashell-hand-crafts',
'name' => 'Hand-woven Cowrie Shell Basket',
'description' => 'A large storage basket made from organic palm fibers and heavily beaded with white cowrie shells around its rim.',
'price' => 1100.00,
'strike_price' => 1350.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1542838132-92c53300491e?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'seashell-hand-crafts',
'name' => 'Scallop Shell Trinket Box',
'description' => 'A sweet small wooden box covered with rows of pastel scallop shells, ideal for storing baby rings.',
'price' => 380.00,
'strike_price' => 450.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1595855759920-86582396756a?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'seashell-hand-crafts',
'name' => 'Embellished Conch Picture Frame',
'description' => 'Photo frame hand-made with rows of tiny spiral shells, pearly cowries, and mini white scallops.',
'price' => 490.00,
'strike_price' => 590.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'seashell-hand-crafts',
'name' => 'Seashell Mosaic Coaster Set',
'description' => 'Set of 4 square resin coasters embedded with detailed mosaics of colorful crushed seashells.',
'price' => 450.00,
'strike_price' => 550.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1603006905003-be475563bc59?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'seashell-hand-crafts',
'name' => 'Cockle Shell Jewelry Tray',
'description' => 'A clay dish pressed with beautiful ridges of natural cockle shells and painted inside in ocean blue colors.',
'price' => 290.00,
'strike_price' => 390.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1535632066927-ab7c9ab60908?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'seashell-hand-crafts',
'name' => 'Hand-carved Cowrie Shell Box',
'description' => 'Beautiful wooden jewelry case with cowrie designs carved into the lid and finished with a brass clasp.',
'price' => 690.00,
'strike_price' => 790.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1595855759920-86582396756a?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'seashell-hand-crafts',
'name' => 'Sea Shell Letter Stand',
'description' => 'A rustic desktop organizer lined with small scallops and white augers for holding mail and letters.',
'price' => 380.00,
'strike_price' => 450.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1542838132-92c53300491e?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'seashell-hand-crafts',
'name' => 'Ocean Treasure Display Plate',
'description' => 'A decorative ceramic display plate featuring clay conches and hand-glazed coastal textures.',
'price' => 850.00,
'strike_price' => 999.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'seashell-hand-crafts',
'name' => 'Urchin Shell Miniature Pots',
'description' => 'Charming tiny sea urchin shells used as hanging holders for air plants. Includes hanging threads.',
'price' => 320.00,
'strike_price' => 420.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1603006905003-be475563bc59?w=800&auto=format&fit=crop&q=80'
],
// Handmade Shell Jewelry
[
'category_slug' => 'handmade-shell-jewelry',
'name' => 'Hand-woven Cowrie Shell Necklace',
'description' => 'Boho style necklace woven with genuine white cowrie shells. Excellent summer beach accessory.',
'price' => 299.00,
'strike_price' => 399.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'handmade-shell-jewelry',
'name' => 'Mother of Pearl Drop Earrings',
'description' => 'Elegant drop earrings carved from high grade pearlescent mother of pearl shell. Catch light with every turn.',
'price' => 450.00,
'strike_price' => 590.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'handmade-shell-jewelry',
'name' => 'Abalone Shell Inlay Bangle',
'description' => 'A gorgeous silver metal bangle embedded with iridescent pieces of green abalone shell.',
'price' => 590.00,
'strike_price' => 750.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'handmade-shell-jewelry',
'name' => 'Pink Scallop Pendant Choker',
'description' => 'A charming black thread choker holding a single miniature natural pink scallop shell pendant.',
'price' => 199.00,
'strike_price' => 299.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'handmade-shell-jewelry',
'name' => 'Delicate Shell Ankle Bracelet',
'description' => 'Adjustable silver chain anklet decorated with tiny auger shells and light blue beads.',
'price' => 250.00,
'strike_price' => 350.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'handmade-shell-jewelry',
'name' => 'Cowrie Shell Hoop Earrings',
'description' => 'Golden circular hoop earrings wrapped in tiny white cowrie shells. A perfect summer vibe.',
'price' => 380.00,
'strike_price' => 480.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'handmade-shell-jewelry',
'name' => 'Polished Pearl Oyster Ring',
'description' => 'Sterling silver ring detailed with a round setting of polished white mother of pearl.',
'price' => 490.00,
'strike_price' => 590.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'handmade-shell-jewelry',
'name' => 'Beachcomber Charm Bracelet',
'description' => 'A chunky chain bracelet holding natural starfish, conch, and scallop shell charms.',
'price' => 450.00,
'strike_price' => 590.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'handmade-shell-jewelry',
'name' => 'Cone Shell Statement Ring',
'description' => 'A large brass ring set with a beautiful cross-sectional slice of a cone shell.',
'price' => 320.00,
'strike_price' => 420.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'handmade-shell-jewelry',
'name' => 'Spiral Shell Hair Pins',
'description' => 'Set of 3 metallic hair pins finished with glittering pearls and white spiral conches.',
'price' => 280.00,
'strike_price' => 350.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?w=800&auto=format&fit=crop&q=80'
],
// Beach Souvenirs
[
'category_slug' => 'beach-souvenirs',
'name' => 'Natural Sea Urchin Candle Holders',
'description' => 'Charming sea urchin casing turned into organic tea-light candle containers. Sold as a pair.',
'price' => 380.00,
'strike_price' => 450.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1603006905003-be475563bc59?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'beach-souvenirs',
'name' => 'Tiger Cowrie Shell Souvenir',
'description' => 'Fully polished beautiful tiger cowrie shell with deep dark spots and glossy smooth finish.',
'price' => 150.00,
'strike_price' => 220.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1520038410233-7141be7e6f97?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'beach-souvenirs',
'name' => 'Spotted Cone Shell Paperweight',
'description' => 'A heavy, solid natural cone shell with black spots, perfect as a paperweight on study tables.',
'price' => 250.00,
'strike_price' => 320.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1520038410233-7141be7e6f97?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'beach-souvenirs',
'name' => 'Scallop Shell Trinket Dish',
'description' => 'A large flat white scallop shell naturally polished, ideal as a side tray for keys or small change.',
'price' => 199.00,
'strike_price' => 250.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1520038410233-7141be7e6f97?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'beach-souvenirs',
'name' => 'Starfish Souvenir Card Holder',
'description' => 'A natural dried sugar starfish equipped with a metal coil stand to hold notes, cards or photographs.',
'price' => 280.00,
'strike_price' => 350.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1520038410233-7141be7e6f97?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'beach-souvenirs',
'name' => 'Coquina Shell Bottle Pendant',
'description' => 'A small miniature glass souvenir bottle containing beautiful tiny multi-colored coquina shells.',
'price' => 150.00,
'strike_price' => 199.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1520038410233-7141be7e6f97?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'beach-souvenirs',
'name' => 'Murex Shell Display Stand',
'description' => 'Spiky, intricate branched pink murex shell placed on a wooden display stand for collectors.',
'price' => 450.00,
'strike_price' => 590.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1520038410233-7141be7e6f97?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'beach-souvenirs',
'name' => 'Sundial Shell Collectible',
'description' => 'Rare, perfectly circular spiral sundial shell showing off natural brownish stripes.',
'price' => 290.00,
'strike_price' => 390.00,
'is_bestseller' => false,
'image' => 'https://images.unsplash.com/photo-1520038410233-7141be7e6f97?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'beach-souvenirs',
'name' => 'Helmet Shell Shoreline Keepsake',
'description' => 'Heavy conch shell of the helmet family polished to a glossy orange finish. A timeless souvenir.',
'price' => 990.00,
'strike_price' => 1250.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1520038410233-7141be7e6f97?w=800&auto=format&fit=crop&q=80'
],
[
'category_slug' => 'beach-souvenirs',
'name' => 'Miniature Shell Message Bottle',
'description' => 'A cute message-in-a-bottle souvenir holding a tiny scroll, white sand and micro shell flakes.',
'price' => 180.00,
'strike_price' => 250.00,
'is_bestseller' => true,
'image' => 'https://images.unsplash.com/photo-1520038410233-7141be7e6f97?w=800&auto=format&fit=crop&q=80'
],
];
// 3. Create products and primary images
foreach ($productsData as $data) {
$cat = $categoryMap[$data['category_slug']];
$product = Product::updateOrCreate(
['slug' => Str::slug($data['name'])],
[
'category_id' => $cat->id,
'name' => $data['name'],
'description' => $data['description'],
'price' => $data['price'],
'strike_price' => $data['strike_price'],
'stock_quantity' => 25,
'is_bestseller' => $data['is_bestseller']
]
);
ProductImage::updateOrCreate(
[
'product_id' => $product->id,
'is_primary' => true
],
[
'image_url' => $data['image']
]
);
// 4. Create Product Size and Price Variants dynamically
// Small variant (default base price)
\App\Models\ProductVariant::updateOrCreate(
['product_id' => $product->id, 'size' => 'Small'],
['price' => $data['price'], 'stock_quantity' => 25]
);
// Medium variant (+25% price)
\App\Models\ProductVariant::updateOrCreate(
['product_id' => $product->id, 'size' => 'Medium'],
['price' => $data['price'] * 1.25, 'stock_quantity' => 20]
);
// Large variant (+50% price)
\App\Models\ProductVariant::updateOrCreate(
['product_id' => $product->id, 'size' => 'Large'],
['price' => $data['price'] * 1.50, 'stock_quantity' => 12]
);
}
}
}
...@@ -257,72 +257,292 @@ $(document).ready(function() { ...@@ -257,72 +257,292 @@ $(document).ready(function() {
// Checkout Form Submission // Checkout Form Submission
$('#checkout-form').submit(function(e) { $('#checkout-form').submit(function(e) {
e.preventDefault(); e.preventDefault();
alert('Thank you for your order! Your VSI Mart seashell order has been placed successfully. Order ID: VSI-' + Math.floor(100000 + Math.random() * 900000));
// Prepare items array
let items = cart.map(item => {
return {
product_id: item.id,
variant_id: null, // simple override if custom variants needed
quantity: item.quantity
};
});
if (items.length === 0) {
alert('Your cart is empty!');
return;
}
let paymentVal = $('.payment-option.active').data('value') || 'cod';
let paymentMethod = paymentVal === 'cod' ? 'COD' : 'Online';
let orderData = {
customer_name: $('input[name="customer_name"]').val(),
email: $('input[name="email"]').val(),
phone: $('input[name="phone"]').val(),
shipping_address: $('input[name="shipping_address"]').val(),
city: $('input[name="city"]').val(),
state: $('input[name="state"]').val(),
pincode: $('input[name="pincode"]').val(),
payment_method: paymentMethod,
coupon_code: appliedCoupon ? 'OCEAN10' : null,
items: items
};
// Submit via AJAX
$.ajax({
url: "/api/place-order",
method: "POST",
contentType: "application/json",
data: JSON.stringify(orderData),
success: function(res) {
if (res.success) {
alert('Thank you for your order! Your VSI Mart seashell order has been placed successfully in our database. Order ID: ' + res.data.order_number);
localStorage.removeItem('vsimart_cart'); localStorage.removeItem('vsimart_cart');
cart = []; cart = [];
window.location.href = 'index.html'; window.location.href = '/';
} else {
alert('Error: ' + res.message);
}
},
error: function(xhr) {
let err = xhr.responseJSON ? xhr.responseJSON.message : 'Something went wrong. Please check stock limits or input details.';
alert('Order Failed: ' + err);
}
});
}); });
// Shop Catalog Page Filtering and Search Logic // Customer Authentication concepts (Modal Injection, AJAX Login/Register, Status Check)
if ($('#shop-category-list').length) { const authStyles = `
// Dynamically assign categories and text search tags to the 15 hardcoded product items on page load <style>
$('#shop-product-grid > div').each(function(index) { .auth-modal {
let item = $(this); position: fixed; top: 0; left: 0; width: 100%; height: 100%;
let title = item.find('.product-title').text().trim().toLowerCase(); background: rgba(0,0,0,0.55); backdrop-filter: blur(8px);
display: none; align-items: center; justify-content: center;
// Distribute items across the 6 categories: z-index: 10050; font-family: 'Plus Jakarta Sans', sans-serif;
let cats = [ }
"Seashell Hand Crafts", .auth-card {
"Fancy Decorative Items", background: rgba(255, 255, 255, 0.95); border-radius: 20px;
"Gift Articles", width: 100%; max-width: 400px; padding: 28px;
"Ocean Theme Decor", box-shadow: 0 15px 35px rgba(0,0,0,0.2); position: relative;
"Handmade Shell Jewelry", animation: authPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
"Beach Souvenirs" }
]; @keyframes authPop {
let category = cats[index % 6]; from { transform: scale(0.92); opacity: 0; }
to { transform: scale(1); opacity: 1; }
// Assign data attributes to the column item wrapper }
item.attr('data-category', category); .auth-close-btn {
item.attr('data-title', title); position: absolute; top: 16px; right: 16px;
background: none; border: none; font-size: 1.4rem;
color: #64748b; cursor: pointer; line-height: 1;
}
.auth-tabs { display: flex; border-bottom: 2px solid #e2e8f0; margin-bottom: 20px; }
.auth-tab {
flex: 1; text-align: center; padding: 8px 0;
font-weight: 700; color: #64748b; cursor: pointer;
border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.auth-tab.active { color: #2b59c3; border-bottom-color: #2b59c3; }
.auth-input-group { margin-bottom: 14px; }
.auth-label { font-size: 0.78rem; font-weight: 700; color: #475569; margin-bottom: 4px; display: block; }
.auth-input {
width: 100%; height: 42px; border-radius: 8px;
border: 1.5px solid #cbd5e1; padding: 0 12px; font-size: 0.88rem;
background: #f8fafc; outline: none; transition: all 0.2s;
}
.auth-input:focus { border-color: #2b59c3; background: #fff; box-shadow: 0 0 0 3px rgba(43,89,195,0.12); }
.auth-action-btn {
width: 100%; height: 42px; background: #2b59c3; color: #fff;
border: none; border-radius: 8px; font-weight: 700; font-size: 0.9rem;
margin-top: 8px; cursor: pointer; transition: background 0.2s;
}
.auth-action-btn:hover { background: #1e40af; }
.auth-error-msg { color: #ef4444; font-size: 0.78rem; font-weight: 600; margin-top: 6px; display: none; }
</style>
`;
$('head').append(authStyles);
const authModalHTML = `
<div id="global-auth-modal" class="auth-modal">
<div class="auth-card">
<button class="auth-close-btn">&times;</button>
<div class="auth-tabs">
<div class="auth-tab active" data-tab="login">Sign In</div>
<div class="auth-tab" data-tab="register">Register</div>
</div>
<!-- Login form -->
<form id="auth-login-form">
<div class="auth-input-group">
<label class="auth-label">Email Address</label>
<input type="email" name="email" class="auth-input" required placeholder="your@email.com">
</div>
<div class="auth-input-group">
<label class="auth-label">Password</label>
<input type="password" name="password" class="auth-input" required placeholder="••••••••">
</div>
<button type="submit" class="auth-action-btn">Sign In</button>
<div class="auth-error-msg" id="login-error"></div>
</form>
<!-- Register form -->
<form id="auth-register-form" style="display: none;">
<div class="auth-input-group">
<label class="auth-label">Full Name</label>
<input type="text" name="name" class="auth-input" required placeholder="Your Name">
</div>
<div class="auth-input-group">
<label class="auth-label">Email Address</label>
<input type="email" name="email" class="auth-input" required placeholder="your@email.com">
</div>
<div class="auth-input-group">
<label class="auth-label">Password</label>
<input type="password" name="password" class="auth-input" required placeholder="Min 6 characters">
</div>
<button type="submit" class="auth-action-btn">Create Account</button>
<div class="auth-error-msg" id="register-error"></div>
</form>
</div>
</div>
`;
$('body').append(authModalHTML);
// Click handler to open Sign In Modal
$(document).on('click', '.header-signin-btn', function(e) {
e.preventDefault();
$('#global-auth-modal').fadeIn(200).css('display', 'flex');
$('#login-error, #register-error').hide().text('');
}); });
// Category Filter buttons click handler // Close modal
$('.filter-category-btn').click(function() { $(document).on('click', '.auth-close-btn', function() {
$('.filter-category-btn').removeClass('active'); $('#global-auth-modal').fadeOut(200);
$(this).addClass('active'); });
$('#global-auth-modal').click(function(e) {
if (e.target === this) {
$('#global-auth-modal').fadeOut(200);
}
});
let selectedCat = $(this).attr('data-category'); // Toggle Sign In / Register tabs
filterShopGrid(selectedCat, $('#shop-search-input').val().trim().toLowerCase()); $(document).on('click', '.auth-tab', function() {
$('.auth-tab').removeClass('active');
$(this).addClass('active');
let tab = $(this).data('tab');
if (tab === 'login') {
$('#auth-login-form').show();
$('#auth-register-form').hide();
} else {
$('#auth-login-form').hide();
$('#auth-register-form').show();
}
}); });
// Search Input live keyup filter // Login submit
$('#shop-search-input').on('keyup', function() { $('#auth-login-form').submit(function(e) {
let selectedCat = $('.filter-category-btn.active').attr('data-category'); e.preventDefault();
let query = $(this).val().trim().toLowerCase(); let email = $(this).find('input[name="email"]').val();
filterShopGrid(selectedCat, query); let password = $(this).find('input[name="password"]').val();
$('#login-error').hide().text('');
$.ajax({
url: "/api/customer/login",
method: "POST",
data: { email, password },
success: function(res) {
if (res.success) {
$('#global-auth-modal').fadeOut(200);
updateAuthUI(true, res.data.name);
alert('Welcome back, ' + res.data.name + '! You have successfully logged in.');
}
},
error: function(xhr) {
let msg = xhr.responseJSON ? xhr.responseJSON.message : 'Invalid credentials. Please try again.';
$('#login-error').text(msg).fadeIn(150);
}
});
}); });
function filterShopGrid(category, query) { // Register submit
let visibleCount = 0; $('#auth-register-form').submit(function(e) {
$('#shop-product-grid > div').each(function() { e.preventDefault();
let item = $(this); let name = $(this).find('input[name="name"]').val();
let itemCat = item.attr('data-category'); let email = $(this).find('input[name="email"]').val();
let itemTitle = item.attr('data-title') || ''; let password = $(this).find('input[name="password"]').val();
$('#register-error').hide().text('');
$.ajax({
url: "/api/customer/register",
method: "POST",
data: { name, email, password },
success: function(res) {
if (res.success) {
$('#global-auth-modal').fadeOut(200);
updateAuthUI(true, res.data.name);
alert('Registration successful! Welcome to VSI Mart, ' + res.data.name + '.');
}
},
error: function(xhr) {
let msg = xhr.responseJSON ? xhr.responseJSON.message : 'Registration failed. Email might already exist.';
$('#register-error').text(msg).fadeIn(150);
}
});
});
let matchesCategory = (category === 'all' || itemCat === category); // Logout click
let matchesSearch = (query === '' || itemTitle.includes(query)); $(document).on('click', '.header-signout-btn', function(e) {
e.preventDefault();
$.ajax({
url: "/api/customer/logout",
method: "POST",
success: function(res) {
if (res.success) {
updateAuthUI(false);
alert('Logged out successfully.');
window.location.href = '/';
}
}
});
});
if (matchesCategory && matchesSearch) { function checkAuthStatus() {
item.fadeIn(200); $.ajax({
visibleCount++; url: "/api/customer/status",
method: "GET",
success: function(res) {
if (res.success && res.logged_in) {
updateAuthUI(true, res.data.name);
// Prefill checkout if on checkout page
if ($('input[name="customer_name"]').length) {
$('input[name="customer_name"]').val(res.data.name);
$('input[name="email"]').val(res.data.email);
}
} else { } else {
item.fadeOut(200); updateAuthUI(false);
}
} }
}); });
}
function updateAuthUI(isLoggedIn, name = '') {
const container = $('.header-signin-btn').parent();
if (!container.length) return;
// Dynamically update the results and products counters on the shop page if (isLoggedIn) {
$('.text-muted.small:contains("Showing")').text(`Showing 1-${visibleCount} of ${visibleCount} results`); container.html(`
$('h3:contains("products")').text(`${visibleCount} products`); <span class="text-white me-3" style="font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.88rem; font-weight: 600;">Welcome, ${name}</span>
<a href="/dashboard" class="text-white text-decoration-none opacity-85 hover-opacity-100 fw-bold me-3" style="font-size: 0.88rem;">Dashboard</a>
<a href="#" class="header-signout-btn text-white text-decoration-none opacity-85 hover-opacity-100 fw-bold" style="font-size: 0.88rem;">Logout</a>
`);
} else {
container.html(`
<a href="#" class="header-signin-btn">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin-right:5px;vertical-align:middle;"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" y1="12" x2="3" y2="12"/></svg> Sign In
</a>
`);
} }
} }
// Call initially on load
checkAuthStatus();
}); });
This source diff could not be displayed because it is too large. You can view the blob instead.
@extends('layouts.admin')
@section('content')
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>Icon</th>
<th>Content Announcement</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody id="announcements-tbody">
@foreach($announcements as $item)
<tr>
<td>{{ $item->icon }}</td>
<td>{{ $item->content }}</td>
<td>{{ $item->status }}</td>
<td>
<button class="btn-action" onclick="openEditModal('announcements', {{ $item->id }})"><i class="fa-solid fa-pen"></i></button>
<button class="btn-action" onclick="deleteRecord('announcements', {{ $item->id }})"><i class="fa-solid fa-trash"></i></button>
</td>
</tr>
@endforeach
@if(count($announcements) === 0)
<tr>
<td colspan="10" class="text-center text-muted py-4">No records found.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
@section('page_title', 'Categories')
@section('page_description', 'Manage master data for Categories')
@section('page_action')
<button class="btn btn-primary rounded-pill px-4" data-bs-toggle="modal" data-bs-target="#crudModal" onclick="openCreateModal()">+ Add New</button>
@endsection
@push('scripts')
<!-- CRUD Modal -->
<div class="modal fade" id="crudModal" tabindex="-1">
<div class="modal-dialog">
<form method="POST" action="" id="crudForm">
@csrf
<input type="hidden" name="_method" id="crudMethod" value="POST">
<div class="modal-content">
<div class="modal-header border-0 pb-0">
<h5 class="modal-title fw-bold" id="crudModalLabel">Create Categories</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body pt-4">
<div class="mb-3">
<label class="form-label">Category Name</label>
<input type="text" class="form-control" name="name" id="crud_name" required>
</div>
<div class="mb-3">
<label class="form-label">Slug</label>
<input type="text" class="form-control" name="slug" id="crud_slug" required>
</div>
</div>
<div class="modal-footer border-0 pt-0">
<button type="button" class="btn btn-light rounded-pill px-4" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary rounded-pill px-4" id="crudSubmitBtn">Save Changes</button>
</div>
</div>
</form>
</div>
</div>
<script>
const entityData = @json($categories);
function openCreateModal() {
document.getElementById('crudModalLabel').innerText = 'Create Categories';
document.getElementById('crudMethod').value = 'POST';
document.getElementById('crudForm').action = '/admin/master/categories';
document.getElementById('crudSubmitBtn').innerText = 'Create';
document.getElementById('crud_name').value = '';
document.getElementById('crud_slug').value = '';
}
function openEditModal(type, id) {
// Find the record
const item = entityData.find(x => x.id === id);
if (!item) return;
document.getElementById('crudModalLabel').innerText = 'Edit Categories';
document.getElementById('crudMethod').value = 'PUT';
document.getElementById('crudForm').action = '/admin/master/categories/' + id;
document.getElementById('crudSubmitBtn').innerText = 'Update';
document.getElementById('crud_name').value = item.name || '';
document.getElementById('crud_slug').value = item.slug || '';
const modal = new bootstrap.Modal(document.getElementById('crudModal'));
modal.show();
}
</script>
@endpush
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>Name</th>
<th>Slug</th>
<th>Product Count</th>
<th>Action</th>
</tr>
</thead>
<tbody id="category-tbody">
@foreach($categories as $item)
<tr>
<td>{{ $item->name }}</td>
<td>{{ $item->slug }}</td>
<td>{{ $item->count }}</td>
<td>
<button class="btn-action" onclick="openEditModal('category', {{ $item->id }})"><i class="fa-solid fa-pen"></i></button>
<button class="btn-action" onclick="deleteRecord('category', {{ $item->id }})"><i class="fa-solid fa-trash"></i></button>
</td>
</tr>
@endforeach
@if(count($categories) === 0)
<tr>
<td colspan="10" class="text-center text-muted py-4">No records found.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
@section('page_title', 'Cities')
@section('page_description', 'Manage master data for Cities')
@section('page_action')
<button class="btn btn-primary rounded-pill px-4" data-bs-toggle="modal" data-bs-target="#crudModal" onclick="openCreateModal()">+ Add New</button>
@endsection
@push('scripts')
<!-- CRUD Modal -->
<div class="modal fade" id="crudModal" tabindex="-1">
<div class="modal-dialog">
<form method="POST" action="" id="crudForm">
@csrf
<input type="hidden" name="_method" id="crudMethod" value="POST">
<div class="modal-content">
<div class="modal-header border-0 pb-0">
<h5 class="modal-title fw-bold" id="crudModalLabel">Create Cities</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body pt-4">
<div class="mb-3">
<label class="form-label">Parent State</label>
<input type="text" class="form-control" name="state" id="crud_state" required>
</div>
<div class="mb-3">
<label class="form-label">City Name</label>
<input type="text" class="form-control" name="name" id="crud_name" required>
</div>
<div class="mb-3">
<label class="form-label">Status</label>
<select class="form-select" name="status" id="crud_status">
<option value="Active">Active</option><option value="Inactive">Inactive</option>
</select>
</div>
</div>
<div class="modal-footer border-0 pt-0">
<button type="button" class="btn btn-light rounded-pill px-4" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary rounded-pill px-4" id="crudSubmitBtn">Save Changes</button>
</div>
</div>
</form>
</div>
</div>
<script>
const entityData = @json($cities);
function openCreateModal() {
document.getElementById('crudModalLabel').innerText = 'Create Cities';
document.getElementById('crudMethod').value = 'POST';
document.getElementById('crudForm').action = '/admin/master/cities';
document.getElementById('crudSubmitBtn').innerText = 'Create';
document.getElementById('crud_state').value = '';
document.getElementById('crud_name').value = '';
document.getElementById('crud_status').value = '';
}
function openEditModal(type, id) {
// Find the record
const item = entityData.find(x => x.id === id);
if (!item) return;
document.getElementById('crudModalLabel').innerText = 'Edit Cities';
document.getElementById('crudMethod').value = 'PUT';
document.getElementById('crudForm').action = '/admin/master/cities/' + id;
document.getElementById('crudSubmitBtn').innerText = 'Update';
document.getElementById('crud_state').value = item.state || '';
document.getElementById('crud_name').value = item.name || '';
document.getElementById('crud_status').value = item.status || '';
const modal = new bootstrap.Modal(document.getElementById('crudModal'));
modal.show();
}
</script>
@endpush
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>City Name</th>
<th>Parent State</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody id="city-tbody">
@foreach($cities as $item)
<tr>
<td>{{ $item->name }}</td>
<td>{{ $item->state }}</td>
<td>{{ $item->status }}</td>
<td>
<button class="btn-action" onclick="openEditModal('city', {{ $item->id }})"><i class="fa-solid fa-pen"></i></button>
<button class="btn-action" onclick="deleteRecord('city', {{ $item->id }})"><i class="fa-solid fa-trash"></i></button>
</td>
</tr>
@endforeach
@if(count($cities) === 0)
<tr>
<td colspan="10" class="text-center text-muted py-4">No records found.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
@section('page_title', 'Countries')
@section('page_description', 'Manage master data for Countries')
@section('page_action')
<button class="btn btn-primary rounded-pill px-4" data-bs-toggle="modal" data-bs-target="#crudModal" onclick="openCreateModal()">+ Add New</button>
@endsection
@push('scripts')
<!-- CRUD Modal -->
<div class="modal fade" id="crudModal" tabindex="-1">
<div class="modal-dialog">
<form method="POST" action="" id="crudForm">
@csrf
<input type="hidden" name="_method" id="crudMethod" value="POST">
<div class="modal-content">
<div class="modal-header border-0 pb-0">
<h5 class="modal-title fw-bold" id="crudModalLabel">Create Countries</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body pt-4">
<div class="mb-3">
<label class="form-label">Country Name</label>
<input type="text" class="form-control" name="name" id="crud_name" required>
</div>
<div class="mb-3">
<label class="form-label">Country Code</label>
<input type="text" class="form-control" name="code" id="crud_code" required>
</div>
<div class="mb-3">
<label class="form-label">Status</label>
<select class="form-select" name="status" id="crud_status">
<option value="Active">Active</option><option value="Inactive">Inactive</option>
</select>
</div>
</div>
<div class="modal-footer border-0 pt-0">
<button type="button" class="btn btn-light rounded-pill px-4" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary rounded-pill px-4" id="crudSubmitBtn">Save Changes</button>
</div>
</div>
</form>
</div>
</div>
<script>
const entityData = @json($countries);
function openCreateModal() {
document.getElementById('crudModalLabel').innerText = 'Create Countries';
document.getElementById('crudMethod').value = 'POST';
document.getElementById('crudForm').action = '/admin/master/countries';
document.getElementById('crudSubmitBtn').innerText = 'Create';
document.getElementById('crud_name').value = '';
document.getElementById('crud_code').value = '';
document.getElementById('crud_status').value = '';
}
function openEditModal(type, id) {
// Find the record
const item = entityData.find(x => x.id === id);
if (!item) return;
document.getElementById('crudModalLabel').innerText = 'Edit Countries';
document.getElementById('crudMethod').value = 'PUT';
document.getElementById('crudForm').action = '/admin/master/countries/' + id;
document.getElementById('crudSubmitBtn').innerText = 'Update';
document.getElementById('crud_name').value = item.name || '';
document.getElementById('crud_code').value = item.code || '';
document.getElementById('crud_status').value = item.status || '';
const modal = new bootstrap.Modal(document.getElementById('crudModal'));
modal.show();
}
</script>
@endpush
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>Country Name</th>
<th>Code</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody id="country-tbody">
@foreach($countries as $c)
<tr>
<td class="fw-bold">{{ $c->name }}</td>
<td><code>{{ $c->code }}</code></td>
<td><span class="badge bg-success-subtle text-success">{{ $c->status ?? 'Active' }}</span></td>
<td>
<button class="btn-action" onclick="openEditModal('country', {{ $c->id }})"><i class="fa-solid fa-pen"></i></button>
<button class="btn-action" onclick="deleteRecord('countries', {{ $c->id }})"><i class="fa-solid fa-trash"></i></button>
</td>
</tr>
@endforeach
@if(count($countries) === 0)
<tr>
<td colspan="4" class="text-center text-muted py-4">No countries found in database.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>Code</th>
<th>Type</th>
<th>Value</th>
<th>Min Purchase</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody id="coupons-tbody">
@foreach($coupons as $item)
<tr>
<td>{{ $item->code }}</td>
<td>{{ $item->type }}</td>
<td>{{ $item->value }}</td>
<td>{{ $item->min }}</td>
<td>{{ $item->status }}</td>
<td>
<button class="btn-action" onclick="openEditModal('coupons', {{ $item->id }})"><i class="fa-solid fa-pen"></i></button>
<button class="btn-action" onclick="deleteRecord('coupons', {{ $item->id }})"><i class="fa-solid fa-trash"></i></button>
</td>
</tr>
@endforeach
@if(count($coupons) === 0)
<tr>
<td colspan="10" class="text-center text-muted py-4">No records found.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
@section('page_title', 'Gallery')
@section('page_description', 'Manage master data for Gallery Images')
@section('page_action')
<button class="btn btn-primary rounded-pill px-4" data-bs-toggle="modal" data-bs-target="#crudModal" onclick="openCreateModal()">+ Add New Image</button>
@endsection
@push('scripts')
<!-- CRUD Modal -->
<div class="modal fade" id="crudModal" tabindex="-1">
<div class="modal-dialog">
<form method="POST" action="" id="crudForm">
@csrf
<input type="hidden" name="_method" id="crudMethod" value="POST">
<div class="modal-content">
<div class="modal-header border-0 pb-0">
<h5 class="modal-title fw-bold" id="crudModalLabel">Create Gallery Entry</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body pt-4">
<div class="mb-3">
<label class="form-label">Filename (Title)</label>
<input type="text" class="form-control" name="filename" id="crud_filename" required>
</div>
<div class="mb-3">
<label class="form-label">Image URL</label>
<input type="url" class="form-control" name="url" id="crud_url" required placeholder="https://example.com/image.jpg">
</div>
<div class="mb-3">
<label class="form-label">Status</label>
<select class="form-select" name="status" id="crud_status">
<option value="Active">Active</option>
<option value="Inactive">Inactive</option>
</select>
</div>
</div>
<div class="modal-footer border-0 pt-0">
<button type="button" class="btn btn-light rounded-pill px-4" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary rounded-pill px-4" id="crudSubmitBtn">Save Changes</button>
</div>
</div>
</form>
</div>
</div>
<script>
const entityData = @json($gallery);
function openCreateModal() {
document.getElementById('crudModalLabel').innerText = 'Create Gallery Entry';
document.getElementById('crudMethod').value = 'POST';
document.getElementById('crudForm').action = '/admin/master/gallery';
document.getElementById('crudSubmitBtn').innerText = 'Create';
document.getElementById('crud_filename').value = '';
document.getElementById('crud_url').value = '';
document.getElementById('crud_status').value = 'Active';
}
function openEditModal(type, id) {
const item = entityData.find(x => x.id === id);
if (!item) return;
document.getElementById('crudModalLabel').innerText = 'Edit Gallery Entry';
document.getElementById('crudMethod').value = 'PUT';
document.getElementById('crudForm').action = '/admin/master/gallery/' + id;
document.getElementById('crudSubmitBtn').innerText = 'Update';
document.getElementById('crud_filename').value = item.filename || '';
document.getElementById('crud_url').value = item.url || '';
document.getElementById('crud_status').value = item.status || 'Active';
const modal = new bootstrap.Modal(document.getElementById('crudModal'));
modal.show();
}
</script>
@endpush
<div class="panel-card">
<div class="row row-cols-2 row-cols-md-4 g-4" id="gallery-grid-box">
@foreach($gallery as $item)
<div class="col">
<div class="card h-100 border rounded-3 overflow-hidden position-relative shadow-sm">
<img src="{{ $item->url }}" class="card-img-top object-fit-cover" height="150" alt="Gallery">
<!-- Status Badge overlay -->
@if($item->status == 'Inactive')
<span class="position-absolute top-0 start-0 m-2 badge bg-secondary">Inactive</span>
@else
<span class="position-absolute top-0 start-0 m-2 badge bg-success">Active</span>
@endif
<div class="card-body p-2 d-flex justify-content-between align-items-center">
<span class="small text-muted text-truncate" style="max-width:110px;">{{ $item->filename }}</span>
<div class="d-flex gap-1">
<button class="btn btn-link text-primary p-0 me-1" onclick="openEditModal('gallery', {{ $item->id }})"><i class="fa-solid fa-pen"></i></button>
<button class="btn btn-link text-danger p-0" onclick="deleteRecord('gallery', {{ $item->id }})"><i class="fa-solid fa-trash"></i></button>
</div>
</div>
</div>
</div>
@endforeach
@if(count($gallery) === 0)
<div class="col-12 text-center text-muted py-4">No records found.</div>
@endif
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>Order ID</th>
<th>Customer</th>
<th>Phone</th>
<th>Total</th>
<th>Pincode</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody id="orders-tbody">
@foreach($orders as $item)
<tr>
<td>{{ $item->orderId }}</td>
<td>{{ $item->customer }}</td>
<td>{{ $item->phone }}</td>
<td>{{ $item->total }}</td>
<td>{{ $item->pincode }}</td>
<td>{{ $item->status }}</td>
<td>
<button class="btn-action" onclick="openEditModal('orders', {{ $item->id }})"><i class="fa-solid fa-pen"></i></button>
<button class="btn-action" onclick="deleteRecord('orders', {{ $item->id }})"><i class="fa-solid fa-trash"></i></button>
</td>
</tr>
@endforeach
@if(count($orders) === 0)
<tr>
<td colspan="10" class="text-center text-muted py-4">No records found.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>Order ID</th>
<th>Customer Name</th>
<th>Current Status</th>
<th>Change State</th>
</tr>
</thead>
<tbody id="orderstatuschange-tbody">
@foreach($orders as $item)
<tr>
<td>{{ $item->orderId }}</td>
<td>{{ $item->customer }}</td>
<td>{{ $item->status }}</td>
<td>
<div class="d-flex gap-2">
<select id="selStatus-{{ $item->id }}" class="form-select form-select-sm" style="max-width:180px;">
<option value="Pending" {{ $item->status === 'Pending' ? 'selected' : '' }}>Pending</option>
<option value="Shipped" {{ $item->status === 'Shipped' ? 'selected' : '' }}>Shipped</option>
<option value="Delivered" {{ $item->status === 'Delivered' ? 'selected' : '' }}>Delivered</option>
</select>
<button class="btn btn-sm btn-primary rounded-pill px-3" onclick="updateOrderStatus({{ $item->id }})">Update</button>
</div>
</td>
</tr>
@endforeach
@if(count($orders) === 0)
<tr>
<td colspan="10" class="text-center text-muted py-4">No records found.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
<div class="row g-4 mb-5">
<div class="col-md-4">
<div class="stat-card">
<div class="stat-icon sales"><i class="fa-solid fa-indian-rupee-sign"></i></div>
<h6 class="text-muted fw-bold small text-uppercase">Total Sales</h6>
<h2 class="fw-bold mb-0">₹45,850</h2>
<span class="text-success small fw-semibold"><i class="fa-solid fa-arrow-up me-1"></i>+12% vs last week</span>
</div>
</div>
<div class="col-md-4">
<div class="stat-card">
<div class="stat-icon orders"><i class="fa-solid fa-truck"></i></div>
<h6 class="text-muted fw-bold small text-uppercase">Active Orders</h6>
<h2 class="fw-bold mb-0">18</h2>
<span class="text-success small fw-semibold"><i class="fa-solid fa-arrow-up me-1"></i>+4 today</span>
</div>
</div>
<div class="col-md-4">
<div class="stat-card">
<div class="stat-icon products"><i class="fa-solid fa-box"></i></div>
<h6 class="text-muted fw-bold small text-uppercase">Products Sold</h6>
<h2 class="fw-bold mb-0">124</h2>
<span class="text-muted small">Catalog: 3 Items</span>
</div>
</div>
</div>
<div class="panel-card">
<h5 class="fw-bold mb-4">Recent Sales Transactions</h5>
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>Order ID</th>
<th>Customer Name</th>
<th>Payment Method</th>
<th>Amount</th>
<th>Status</th>
</tr>
</thead>
<tbody id="overview-orders-tbody">
<!-- Orders data is fetched dynamically later in MPA phase,
or statically injected. Currently left as placeholder -->
<tr>
<td colspan="5" class="text-center text-muted py-4">No recent transactions.</td>
</tr>
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>Pincode</th>
<th>Serviceable Region</th>
<th>Est. Days</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody id="pincodes-tbody">
@foreach($pincodes as $item)
<tr>
<td>{{ $item->pincode }}</td>
<td>{{ $item->region }}</td>
<td>{{ $item->days }}</td>
<td>{{ $item->status }}</td>
<td>
<button class="btn-action" onclick="openEditModal('pincodes', {{ $item->id }})"><i class="fa-solid fa-pen"></i></button>
<button class="btn-action" onclick="deleteRecord('pincodes', {{ $item->id }})"><i class="fa-solid fa-trash"></i></button>
</td>
</tr>
@endforeach
@if(count($pincodes) === 0)
<tr>
<td colspan="10" class="text-center text-muted py-4">No records found.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>Product Name</th>
<th>Size Variant</th>
<th>Base Price</th>
<th>Discount</th>
<th>Final Price</th>
<th>Action</th>
</tr>
</thead>
<tbody id="productprices-tbody">
@foreach($productprices as $item)
<tr>
<td>{{ $item->name }}</td>
<td>{{ $item->variant }}</td>
<td>{{ $item->base }}</td>
<td>{{ $item->discount }}</td>
<td>{{ $item->final }}</td>
<td>
<button class="btn-action" onclick="openEditModal('productprices', {{ $item->id }})"><i class="fa-solid fa-pen"></i></button>
<button class="btn-action" onclick="deleteRecord('productprices', {{ $item->id }})"><i class="fa-solid fa-trash"></i></button>
</td>
</tr>
@endforeach
@if(count($productprices) === 0)
<tr>
<td colspan="10" class="text-center text-muted py-4">No records found.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>Product Name</th>
<th>Category</th>
<th>Price</th>
<th>Stock</th>
<th>Action</th>
</tr>
</thead>
<tbody id="products-tbody">
@foreach($products as $item)
<tr>
<td>{{ $item->name }}</td>
<td>{{ $item->category }}</td>
<td>{{ $item->price }}</td>
<td>{{ $item->stock }}</td>
<td>
<button class="btn-action" onclick="openEditModal('products', {{ $item->id }})"><i class="fa-solid fa-pen"></i></button>
<button class="btn-action" onclick="deleteRecord('products', {{ $item->id }})"><i class="fa-solid fa-trash"></i></button>
</td>
</tr>
@endforeach
@if(count($products) === 0)
<tr>
<td colspan="10" class="text-center text-muted py-4">No records found.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
@section('page_title', 'Sizes')
@section('page_description', 'Manage master data for Sizes')
@section('page_action')
<button class="btn btn-primary rounded-pill px-4" data-bs-toggle="modal" data-bs-target="#crudModal" onclick="openCreateModal()">+ Add New</button>
@endsection
@push('scripts')
<!-- CRUD Modal -->
<div class="modal fade" id="crudModal" tabindex="-1">
<div class="modal-dialog">
<form method="POST" action="" id="crudForm">
@csrf
<input type="hidden" name="_method" id="crudMethod" value="POST">
<div class="modal-content">
<div class="modal-header border-0 pb-0">
<h5 class="modal-title fw-bold" id="crudModalLabel">Create Sizes</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body pt-4">
<div class="mb-3">
<label class="form-label">Size Name</label>
<input type="text" class="form-control" name="name" id="crud_name" required>
</div>
<div class="mb-3">
<label class="form-label">Size Code</label>
<input type="text" class="form-control" name="code" id="crud_code" required>
</div>
<div class="mb-3">
<label class="form-label">Status</label>
<select class="form-select" name="status" id="crud_status">
<option value="Active">Active</option><option value="Inactive">Inactive</option>
</select>
</div>
</div>
<div class="modal-footer border-0 pt-0">
<button type="button" class="btn btn-light rounded-pill px-4" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary rounded-pill px-4" id="crudSubmitBtn">Save Changes</button>
</div>
</div>
</form>
</div>
</div>
<script>
const entityData = @json($sizes);
function openCreateModal() {
document.getElementById('crudModalLabel').innerText = 'Create Sizes';
document.getElementById('crudMethod').value = 'POST';
document.getElementById('crudForm').action = '/admin/master/sizes';
document.getElementById('crudSubmitBtn').innerText = 'Create';
document.getElementById('crud_name').value = '';
document.getElementById('crud_code').value = '';
document.getElementById('crud_status').value = '';
}
function openEditModal(type, id) {
// Find the record
const item = entityData.find(x => x.id === id);
if (!item) return;
document.getElementById('crudModalLabel').innerText = 'Edit Sizes';
document.getElementById('crudMethod').value = 'PUT';
document.getElementById('crudForm').action = '/admin/master/sizes/' + id;
document.getElementById('crudSubmitBtn').innerText = 'Update';
document.getElementById('crud_name').value = item.name || '';
document.getElementById('crud_code').value = item.code || '';
document.getElementById('crud_status').value = item.status || '';
const modal = new bootstrap.Modal(document.getElementById('crudModal'));
modal.show();
}
</script>
@endpush
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>Size Name</th>
<th>Size Code</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody id="sizes-tbody">
@foreach($sizes as $item)
<tr>
<td>{{ $item->name }}</td>
<td>{{ $item->code }}</td>
<td>{{ $item->status }}</td>
<td>
<button class="btn-action" onclick="openEditModal('sizes', {{ $item->id }})"><i class="fa-solid fa-pen"></i></button>
<button class="btn-action" onclick="deleteRecord('sizes', {{ $item->id }})"><i class="fa-solid fa-trash"></i></button>
</td>
</tr>
@endforeach
@if(count($sizes) === 0)
<tr>
<td colspan="10" class="text-center text-muted py-4">No records found.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
@section('page_title', 'States')
@section('page_description', 'Manage master data for States')
@section('page_action')
<button class="btn btn-primary rounded-pill px-4" data-bs-toggle="modal" data-bs-target="#crudModal" onclick="openCreateModal()">+ Add New</button>
@endsection
@push('scripts')
<!-- CRUD Modal -->
<div class="modal fade" id="crudModal" tabindex="-1">
<div class="modal-dialog">
<form method="POST" action="" id="crudForm">
@csrf
<input type="hidden" name="_method" id="crudMethod" value="POST">
<div class="modal-content">
<div class="modal-header border-0 pb-0">
<h5 class="modal-title fw-bold" id="crudModalLabel">Create States</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body pt-4">
<div class="mb-3">
<label class="form-label">Parent Country</label>
<input type="text" class="form-control" name="country" id="crud_country" required>
</div>
<div class="mb-3">
<label class="form-label">State Name</label>
<input type="text" class="form-control" name="name" id="crud_name" required>
</div>
<div class="mb-3">
<label class="form-label">Status</label>
<select class="form-select" name="status" id="crud_status">
<option value="Active">Active</option><option value="Inactive">Inactive</option>
</select>
</div>
</div>
<div class="modal-footer border-0 pt-0">
<button type="button" class="btn btn-light rounded-pill px-4" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary rounded-pill px-4" id="crudSubmitBtn">Save Changes</button>
</div>
</div>
</form>
</div>
</div>
<script>
const entityData = @json($states);
function openCreateModal() {
document.getElementById('crudModalLabel').innerText = 'Create States';
document.getElementById('crudMethod').value = 'POST';
document.getElementById('crudForm').action = '/admin/master/states';
document.getElementById('crudSubmitBtn').innerText = 'Create';
document.getElementById('crud_country').value = '';
document.getElementById('crud_name').value = '';
document.getElementById('crud_status').value = '';
}
function openEditModal(type, id) {
// Find the record
const item = entityData.find(x => x.id === id);
if (!item) return;
document.getElementById('crudModalLabel').innerText = 'Edit States';
document.getElementById('crudMethod').value = 'PUT';
document.getElementById('crudForm').action = '/admin/master/states/' + id;
document.getElementById('crudSubmitBtn').innerText = 'Update';
document.getElementById('crud_country').value = item.country || '';
document.getElementById('crud_name').value = item.name || '';
document.getElementById('crud_status').value = item.status || '';
const modal = new bootstrap.Modal(document.getElementById('crudModal'));
modal.show();
}
</script>
@endpush
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>State Name</th>
<th>Parent Country</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody id="state-tbody">
@foreach($states as $item)
<tr>
<td>{{ $item->name }}</td>
<td>{{ $item->country }}</td>
<td>{{ $item->status }}</td>
<td>
<button class="btn-action" onclick="openEditModal('state', {{ $item->id }})"><i class="fa-solid fa-pen"></i></button>
<button class="btn-action" onclick="deleteRecord('state', {{ $item->id }})"><i class="fa-solid fa-trash"></i></button>
</td>
</tr>
@endforeach
@if(count($states) === 0)
<tr>
<td colspan="10" class="text-center text-muted py-4">No records found.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
@section('page_title', 'Measuring Units')
@section('page_description', 'Manage master data for Measuring Units')
@section('page_action')
<button class="btn btn-primary rounded-pill px-4" data-bs-toggle="modal" data-bs-target="#crudModal" onclick="openCreateModal()">+ Add New</button>
@endsection
@push('scripts')
<!-- CRUD Modal -->
<div class="modal fade" id="crudModal" tabindex="-1">
<div class="modal-dialog">
<form method="POST" action="" id="crudForm">
@csrf
<input type="hidden" name="_method" id="crudMethod" value="POST">
<div class="modal-content">
<div class="modal-header border-0 pb-0">
<h5 class="modal-title fw-bold" id="crudModalLabel">Create Measuring Units</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body pt-4">
<div class="mb-3">
<label class="form-label">Unit Name</label>
<input type="text" class="form-control" name="name" id="crud_name" required>
</div>
<div class="mb-3">
<label class="form-label">Unit Code</label>
<input type="text" class="form-control" name="code" id="crud_code" required>
</div>
</div>
<div class="modal-footer border-0 pt-0">
<button type="button" class="btn btn-light rounded-pill px-4" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary rounded-pill px-4" id="crudSubmitBtn">Save Changes</button>
</div>
</div>
</form>
</div>
</div>
<script>
const entityData = @json($units);
function openCreateModal() {
document.getElementById('crudModalLabel').innerText = 'Create Measuring Units';
document.getElementById('crudMethod').value = 'POST';
document.getElementById('crudForm').action = '/admin/master/units';
document.getElementById('crudSubmitBtn').innerText = 'Create';
document.getElementById('crud_name').value = '';
document.getElementById('crud_code').value = '';
}
function openEditModal(type, id) {
// Find the record
const item = entityData.find(x => x.id === id);
if (!item) return;
document.getElementById('crudModalLabel').innerText = 'Edit Measuring Units';
document.getElementById('crudMethod').value = 'PUT';
document.getElementById('crudForm').action = '/admin/master/units/' + id;
document.getElementById('crudSubmitBtn').innerText = 'Update';
document.getElementById('crud_name').value = item.name || '';
document.getElementById('crud_code').value = item.code || '';
const modal = new bootstrap.Modal(document.getElementById('crudModal'));
modal.show();
}
</script>
@endpush
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>Unit Name</th>
<th>Code</th>
<th>Action</th>
</tr>
</thead>
<tbody id="unit-tbody">
@foreach($units as $item)
<tr>
<td>{{ $item->name }}</td>
<td>{{ $item->code }}</td>
<td>
<button class="btn-action" onclick="openEditModal('unit', {{ $item->id }})"><i class="fa-solid fa-pen"></i></button>
<button class="btn-action" onclick="deleteRecord('unit', {{ $item->id }})"><i class="fa-solid fa-trash"></i></button>
</td>
</tr>
@endforeach
@if(count($units) === 0)
<tr>
<td colspan="10" class="text-center text-muted py-4">No records found.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
@section('page_title', 'Unit Sizes')
@section('page_description', 'Manage master data for Unit Sizes')
@section('page_action')
<button class="btn btn-primary rounded-pill px-4" data-bs-toggle="modal" data-bs-target="#crudModal" onclick="openCreateModal()">+ Add New</button>
@endsection
@push('scripts')
<!-- CRUD Modal -->
<div class="modal fade" id="crudModal" tabindex="-1">
<div class="modal-dialog">
<form method="POST" action="" id="crudForm">
@csrf
<input type="hidden" name="_method" id="crudMethod" value="POST">
<div class="modal-content">
<div class="modal-header border-0 pb-0">
<h5 class="modal-title fw-bold" id="crudModalLabel">Create Unit Sizes</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body pt-4">
<div class="mb-3">
<label class="form-label">Size Identifier</label>
<input type="text" class="form-control" name="identifier" id="crud_identifier" required>
</div>
<div class="mb-3">
<label class="form-label">Measuring Unit</label>
<input type="text" class="form-control" name="unit" id="crud_unit" required>
</div>
</div>
<div class="modal-footer border-0 pt-0">
<button type="button" class="btn btn-light rounded-pill px-4" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary rounded-pill px-4" id="crudSubmitBtn">Save Changes</button>
</div>
</div>
</form>
</div>
</div>
<script>
const entityData = @json($unitsizes);
function openCreateModal() {
document.getElementById('crudModalLabel').innerText = 'Create Unit Sizes';
document.getElementById('crudMethod').value = 'POST';
document.getElementById('crudForm').action = '/admin/master/unitsizes';
document.getElementById('crudSubmitBtn').innerText = 'Create';
document.getElementById('crud_identifier').value = '';
document.getElementById('crud_unit').value = '';
}
function openEditModal(type, id) {
// Find the record
const item = entityData.find(x => x.id === id);
if (!item) return;
document.getElementById('crudModalLabel').innerText = 'Edit Unit Sizes';
document.getElementById('crudMethod').value = 'PUT';
document.getElementById('crudForm').action = '/admin/master/unitsizes/' + id;
document.getElementById('crudSubmitBtn').innerText = 'Update';
document.getElementById('crud_identifier').value = item.identifier || '';
document.getElementById('crud_unit').value = item.unit || '';
const modal = new bootstrap.Modal(document.getElementById('crudModal'));
modal.show();
}
</script>
@endpush
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>Size Identifier</th>
<th>Measuring Unit</th>
<th>Action</th>
</tr>
</thead>
<tbody id="unitsizes-tbody">
@foreach($unitsizes as $item)
<tr>
<td>{{ $item->identifier }}</td>
<td>{{ $item->unit }}</td>
<td>
<button class="btn-action" onclick="openEditModal('unitsizes', {{ $item->id }})"><i class="fa-solid fa-pen"></i></button>
<button class="btn-action" onclick="deleteRecord('unitsizes', {{ $item->id }})"><i class="fa-solid fa-trash"></i></button>
</td>
</tr>
@endforeach
@if(count($unitsizes) === 0)
<tr>
<td colspan="10" class="text-center text-muted py-4">No records found.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
@extends('layouts.admin')
@section('content')
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0">
<thead>
<tr>
<th>Product Title</th>
<th>Saves count</th>
<th>Stock Status</th>
<th>Catalog Price</th>
</tr>
</thead>
<tbody id="wishlist-tbody">
@foreach($wishlists as $item)
<tr>
<td>{{ $item->name }}</td>
<td>{{ $item->saves }}</td>
<td>{{ $item->status }}</td>
<td>{{ $item->price }}</td>
</tr>
@endforeach
@if(count($wishlists) === 0)
<tr>
<td colspan="10" class="text-center text-muted py-4">No records found.</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection
...@@ -118,313 +118,38 @@ ...@@ -118,313 +118,38 @@
<!-- Product Grid --> <!-- Product Grid -->
<section class="col-lg-9"> <section class="col-lg-9">
<div class="row g-4"> <div class="row g-4">
<!-- Product 1 --> @foreach($products as $product)
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">BESTSELLER</span>
<button class="btn-wishlist"><i class="bi bi-heart-fill"></i></button>
<img src="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=400&auto=format&fit=crop&q=80" alt="Premium Shell Mirror Frame">
<div class="product-card-body">
<h5 class="product-title">Premium Shell Mirror Frame</h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.9 <span class="text-muted">(42)</span></div>
<div class="size-select-group">
<button class="size-btn">S</button>
<button class="size-btn active">M</button>
<button class="size-btn">L</button>
</div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="product-price">₹1,200</div>
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p1" data-img="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button>
</div>
</div>
</div>
</div>
<!-- Product 2 -->
<div class="col-md-4 col-sm-6"> <div class="col-md-4 col-sm-6">
<div class="product-card"> <div class="product-card">
@if($product->is_bestseller)
<span class="badge-bestseller">BESTSELLER</span> <span class="badge-bestseller">BESTSELLER</span>
@endif
<button class="btn-wishlist"><i class="bi bi-heart"></i></button> <button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1542838132-92c53300491e?w=400&auto=format&fit=crop&q=80" alt="Decorative Shell Wall Frame"> <a href="/product-detail/{{ $product->slug }}">
<div class="product-card-body"> <img src="https://images.unsplash.com/photo-1544474655-9aed1e956bc2?w=500&auto=format&fit=crop&q=80" alt="{{ $product->name }}">
<h5 class="product-title"> </a>
<a href="{{ url('/product-detail') }}" class="text-decoration-none text-dark">Decorative Shell Wall Frame</a>
</h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.8 <span class="text-muted">(31)</span></div>
<div class="size-select-group">
<button class="size-btn">S</button>
<button class="size-btn active">M</button>
<button class="size-btn">L</button>
</div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="product-price">₹850</div>
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p2" data-img="https://images.unsplash.com/photo-1542838132-92c53300491e?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button>
</div>
</div>
</div>
</div>
<!-- Product 3 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=400&auto=format&fit=crop&q=80" alt="Handcrafted Shell Wind Chime">
<div class="product-card-body">
<h5 class="product-title">Handcrafted Shell Wind Chime</h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.5 <span class="text-muted">(18)</span></div>
<div class="size-select-group">
<button class="size-btn">S</button>
<button class="size-btn active">M</button>
<button class="size-btn">L</button>
</div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="product-price">₹450</div>
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p3" data-img="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button>
</div>
</div>
</div>
</div>
<!-- Product 4 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">BESTSELLER</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?w=400&auto=format&fit=crop&q=80" alt="Seashell Jewellery Box">
<div class="product-card-body">
<h5 class="product-title">Seashell Jewellery Box</h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.9 <span class="text-muted">(55)</span></div>
<div class="size-select-group">
<button class="size-btn">S</button>
<button class="size-btn active">M</button>
<button class="size-btn">L</button>
</div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="product-price">₹650</div>
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p4" data-img="https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button>
</div>
</div>
</div>
</div>
<!-- Product 5 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1505691938895-1758d7feb511?w=400&auto=format&fit=crop&q=80" alt="Ocean Theme Table Clock">
<div class="product-card-body">
<h5 class="product-title">Ocean Theme Table Clock</h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.7 <span class="text-muted">(12)</span></div>
<div class="size-select-group">
<button class="size-btn">S</button>
<button class="size-btn active">M</button>
<button class="size-btn">L</button>
</div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="product-price">₹950</div>
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p5" data-img="https://images.unsplash.com/photo-1505691938895-1758d7feb511?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button>
</div>
</div>
</div>
</div>
<!-- Product 6 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1595855759920-86582396756a?w=400&auto=format&fit=crop&q=80" alt="Seashell Photo Frame">
<div class="product-card-body">
<h5 class="product-title">Seashell Photo Frame</h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.6 <span class="text-muted">(24)</span></div>
<div class="size-select-group">
<button class="size-btn">S</button>
<button class="size-btn active">M</button>
<button class="size-btn">L</button>
</div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="product-price">₹400</div>
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p6" data-img="https://images.unsplash.com/photo-1595855759920-86582396756a?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button>
</div>
</div>
</div>
</div>
<!-- Product 7 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=400&auto=format&fit=crop&q=80" alt="Coastal Shell Coasters">
<div class="product-card-body">
<h5 class="product-title">Coastal Shell Coasters (Set of 4)</h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.8 <span class="text-muted">(16)</span></div>
<div class="size-select-group">
<button class="size-btn">S</button>
<button class="size-btn active">M</button>
<button class="size-btn">L</button>
</div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="product-price">₹350</div>
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p7" data-img="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button>
</div>
</div>
</div>
</div>
<!-- Product 8 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1520038410233-7141be7e6f97?w=400&auto=format&fit=crop&q=80" alt="Miniature Shell Animal Figurines">
<div class="product-card-body">
<h5 class="product-title">Miniature Shell Animals</h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.4 <span class="text-muted">(8)</span></div>
<div class="size-select-group">
<button class="size-btn">S</button>
<button class="size-btn active">M</button>
<button class="size-btn">L</button>
</div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="product-price">₹280</div>
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p8" data-img="https://images.unsplash.com/photo-1520038410233-7141be7e6f97?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button>
</div>
</div>
</div>
</div>
<!-- Product 9 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?w=400&auto=format&fit=crop&q=80" alt="Elegant Shell Necklace & Earrings Set">
<div class="product-card-body">
<h5 class="product-title">Elegant Shell Necklace Set</h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.7 <span class="text-muted">(21)</span></div>
<div class="size-select-group">
<button class="size-btn">S</button>
<button class="size-btn active">M</button>
<button class="size-btn">L</button>
</div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="product-price">₹550</div>
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p9" data-img="https://images.unsplash.com/photo-1599643478518-a784e5dc4c8f?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button>
</div>
</div>
</div>
</div>
<!-- Product 10 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1542838132-92c53300491e?w=400&auto=format&fit=crop&q=80" alt="Decorative Starfish Display">
<div class="product-card-body">
<h5 class="product-title">Decorative Starfish Display</h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.8 <span class="text-muted">(19)</span></div>
<div class="size-select-group">
<button class="size-btn">S</button>
<button class="size-btn active">M</button>
<button class="size-btn">L</button>
</div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="product-price">₹700</div>
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p10" data-img="https://images.unsplash.com/photo-1542838132-92c53300491e?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button>
</div>
</div>
</div>
</div>
<!-- Product 11 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=400&auto=format&fit=crop&q=80" alt="Shell Decorative Hanging Lamp">
<div class="product-card-body">
<h5 class="product-title">Shell Decorative Hanging Lamp</h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.9 <span class="text-muted">(37)</span></div>
<div class="size-select-group">
<button class="size-btn">S</button>
<button class="size-btn active">M</button>
<button class="size-btn">L</button>
</div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="product-price">₹1,850</div>
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p11" data-img="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button>
</div>
</div>
</div>
</div>
<!-- Product 12 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=400&auto=format&fit=crop&q=80" alt="Beach Sand & Shell Message Bottle">
<div class="product-card-body">
<h5 class="product-title">Beach Shell Message Bottle</h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.3 <span class="text-muted">(14)</span></div>
<div class="size-select-group">
<button class="size-btn">S</button>
<button class="size-btn active">M</button>
<button class="size-btn">L</button>
</div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="product-price">₹220</div>
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p12" data-img="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button>
</div>
</div>
</div>
</div>
<!-- Product 13 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=400&auto=format&fit=crop&q=80" alt="Mother of Pearl Soap Dish">
<div class="product-card-body">
<h5 class="product-title">Mother of Pearl Soap Dish</h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.6 <span class="text-muted">(22)</span></div>
<div class="size-select-group">
<button class="size-btn">S</button>
<button class="size-btn active">M</button>
<button class="size-btn">L</button>
</div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="product-price">₹450</div>
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p13" data-img="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button>
</div>
</div>
</div>
</div>
<!-- Product 14 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1520038410233-7141be7e6f97?w=400&auto=format&fit=crop&q=80" alt="Seashell Keychains">
<div class="product-card-body">
<h5 class="product-title">Seashell Keychains (Set of 5)</h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.2 <span class="text-muted">(9)</span></div>
<div class="size-select-group">
<button class="size-btn">S</button>
<button class="size-btn active">M</button>
<button class="size-btn">L</button>
</div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="product-price">₹180</div>
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p14" data-img="https://images.unsplash.com/photo-1520038410233-7141be7e6f97?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button>
</div>
</div>
</div>
</div>
<!-- Product 15 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1595855759920-86582396756a?w=400&auto=format&fit=crop&q=80" alt="Shell Art Flower Vase">
<div class="product-card-body"> <div class="product-card-body">
<h5 class="product-title">Shell Art Flower Vase</h5> <h5 class="product-title"><a href="/product-detail/{{ $product->slug }}" class="text-decoration-none text-dark">{{ $product->name }}</a></h5>
<div class="product-rating"><i class="bi bi-star-fill text-warning"></i> 4.8 <span class="text-muted">(41)</span></div> <div class="product-rating mb-2">
<div class="size-select-group"> <i class="bi bi-star-fill text-warning"></i>
<button class="size-btn">S</button> <i class="bi bi-star-fill text-warning"></i>
<button class="size-btn active">M</button> <i class="bi bi-star-fill text-warning"></i>
<button class="size-btn">L</button> <i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
</div> </div>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top"> <div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="product-price">₹1,150</div> <div class="d-flex align-items-center flex-wrap">
<button class="btn btn-primary-custom btn-sm btn-add-to-cart" data-id="p15" data-img="https://images.unsplash.com/photo-1595855759920-86582396756a?w=400&auto=format&fit=crop&q=80"><i class="bi bi-cart-plus"></i></button> <span class="product-price">₹{{ number_format($product->price, 2) }}</span>
@if($product->strike_price)
<span class="product-price-strike ms-2">₹{{ number_format($product->strike_price, 2) }}</span>
@endif
</div> </div>
<button class="btn btn-add-to-cart w-100 mt-3">Add to cart</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@endforeach
<!-- Pagination --> <!-- Pagination -->
<nav class="mt-5" aria-label="Product catalog navigation"> <nav class="mt-5" aria-label="Product catalog navigation">
<ul class="pagination justify-content-center"> <ul class="pagination justify-content-center">
......
...@@ -98,27 +98,31 @@ ...@@ -98,27 +98,31 @@
<div class="row g-3"> <div class="row g-3">
<div class="col-12"> <div class="col-12">
<label class="form-label checkout-form-label">Full Name *</label> <label class="form-label checkout-form-label">Full Name *</label>
<input type="text" class="form-control checkout-form-control w-100" placeholder="Your full name" required> <input type="text" name="customer_name" class="form-control checkout-form-control w-100" placeholder="Your full name" required>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label class="form-label checkout-form-label">Email *</label> <label class="form-label checkout-form-label">Email *</label>
<input type="email" class="form-control checkout-form-control w-100" placeholder="your@email.com" required> <input type="email" name="email" class="form-control checkout-form-control w-100" placeholder="your@email.com" required>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label class="form-label checkout-form-label">Phone *</label> <label class="form-label checkout-form-label">Phone *</label>
<input type="tel" class="form-control checkout-form-control w-100" placeholder="+91 XXXXX XXXXX" required> <input type="tel" name="phone" class="form-control checkout-form-control w-100" placeholder="+91 XXXXX XXXXX" required>
</div> </div>
<div class="col-12"> <div class="col-12">
<label class="form-label checkout-form-label">Address *</label> <label class="form-label checkout-form-label">Address *</label>
<input type="text" class="form-control checkout-form-control w-100" placeholder="Street address, Flat/Door number" required> <input type="text" name="shipping_address" class="form-control checkout-form-control w-100" placeholder="Street address, Flat/Door number" required>
</div> </div>
<div class="col-md-6"> <div class="col-md-4">
<label class="form-label checkout-form-label">City *</label> <label class="form-label checkout-form-label">City *</label>
<input type="text" class="form-control checkout-form-control w-100" placeholder="City" required> <input type="text" name="city" class="form-control checkout-form-control w-100" placeholder="City" value="Chennai" required>
</div> </div>
<div class="col-md-6"> <div class="col-md-4">
<label class="form-label checkout-form-label">State *</label>
<input type="text" name="state" class="form-control checkout-form-control w-100" placeholder="State" value="Tamil Nadu" required>
</div>
<div class="col-md-4">
<label class="form-label checkout-form-label">PIN Code *</label> <label class="form-label checkout-form-label">PIN Code *</label>
<input type="text" class="form-control checkout-form-control w-100" placeholder="600001" value="600001" required> <input type="text" name="pincode" class="form-control checkout-form-control w-100" placeholder="600001" value="600001" required>
</div> </div>
</div> </div>
</div> </div>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="Customer Dashboard. Manage your account and view your orders.">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard - VSI Mart</title>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap" rel="stylesheet">
<!-- Bootstrap 5 CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="styles.css">
<style>
.dashboard-header {
background: linear-gradient(135deg, #0f172a, #1e293b);
color: #fff;
padding: 40px 0;
border-bottom: 4px solid #3b82f6;
}
.dashboard-card {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: 16px;
box-shadow: 0 10px 30px rgba(0,0,0,0.05);
padding: 24px;
margin-bottom: 24px;
}
.order-card {
border: 1px solid #e2e8f0;
border-radius: 12px;
padding: 20px;
margin-bottom: 16px;
transition: all 0.2s ease;
}
.order-card:hover {
border-color: #3b82f6;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}
.order-header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #f1f5f9;
padding-bottom: 12px;
margin-bottom: 16px;
}
.order-id {
font-family: 'Plus Jakarta Sans', sans-serif;
font-weight: 700;
color: #0f172a;
font-size: 1.1rem;
}
.order-status {
padding: 6px 12px;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 700;
text-transform: uppercase;
}
.status-pending { background: #fef3c7; color: #d97706; }
.status-shipped { background: #e0e7ff; color: #4338ca; }
.status-delivered { background: #dcfce3; color: #15803d; }
.order-total {
font-weight: 700;
color: #3b82f6;
font-size: 1.2rem;
}
.item-list {
list-style: none;
padding: 0;
margin: 0;
}
.item-list li {
padding: 8px 0;
border-bottom: 1px dashed #e2e8f0;
display: flex;
justify-content: space-between;
font-size: 0.95rem;
}
.item-list li:last-child {
border-bottom: none;
}
.empty-state {
text-align: center;
padding: 40px 20px;
}
</style>
</head>
<body>
<!-- Top Pillayar Suzhi Bar -->
<div class="top-suzhi-bar text-center py-1" style="background-color: #fcfbf0; border-bottom: 1.5px solid #ebdcb9; display: flex; align-items: center; justify-content: center; height: 42px;">
<img src="pillayar_suzhi.png" alt="Pillayar Suzhi" style="height: 30px; object-fit: contain;">
</div>
<!-- Navigation Header -->
<nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top">
<div class="container-fluid px-lg-4">
<a class="navbar-brand text-white fw-bold d-flex align-items-center" href="{{ url('/') }}">
<img src="header_logo.png" alt="VSI Logo" style="height: 45px; margin-right: 10px; object-fit: contain;">
<img src="footer_logo.png" alt="VSI MART" style="height: 24px; object-fit: contain;">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarContent">
<ul class="navbar-nav mx-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="{{ url('/') }}">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url('/shop') }}">SHOP</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url('/gallery') }}">Gallery</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#contact">Contact</a>
</li>
</ul>
<div class="d-flex align-items-center gap-4">
<a href="{{ url('/wishlist') }}" class="header-wishlist-btn" title="Wishlist"><i class="bi bi-heart"></i></a>
<a href="{{ url('/cart') }}" class="header-cart-btn">
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin-right:4px;vertical-align:middle;"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/><line x1="6" y1="10" x2="21" y2="10"/><line x1="7" y1="14" x2="20" y2="14"/></svg> Cart
<span id="cart-count" style="display: none;">0</span>
</a>
<div class="d-flex align-items-center">
<a href="#" class="header-signin-btn">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin-right:5px;vertical-align:middle;"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" y1="12" x2="3" y2="12"/></svg> Sign In
</a>
</div>
</div>
</div>
</div>
</nav>
<!-- Dashboard Header -->
<div class="dashboard-header text-center">
<div class="container">
<h1 class="fw-bold" style="font-family: 'Plus Jakarta Sans', sans-serif;">My Dashboard</h1>
<p class="text-white-50">Manage your orders and account details</p>
</div>
</div>
<!-- Main Container -->
<main class="container py-5">
<div class="row">
<!-- Sidebar -->
<div class="col-lg-3 mb-4">
<div class="dashboard-card">
<div class="d-flex align-items-center mb-4">
<div class="bg-primary text-white rounded-circle d-flex align-items-center justify-content-center" style="width: 50px; height: 50px; font-size: 1.5rem;">
<i class="bi bi-person"></i>
</div>
<div class="ms-3">
<h5 class="mb-0 fw-bold" id="dash-user-name">Loading...</h5>
<small class="text-muted" id="dash-user-email"></small>
</div>
</div>
<ul class="nav flex-column nav-pills">
<li class="nav-item">
<a class="nav-link active" href="#"><i class="bi bi-box-seam me-2"></i> My Orders</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" href="#" onclick="alert('Profile settings coming soon!')"><i class="bi bi-gear me-2"></i> Settings</a>
</li>
</ul>
</div>
</div>
<!-- Content Area -->
<div class="col-lg-9">
<div class="dashboard-card" style="min-height: 400px;">
<h3 class="fw-bold mb-4" style="font-family: 'Plus Jakarta Sans', sans-serif;">Order History</h3>
<div id="orders-container">
<!-- Orders will be injected here via AJAX -->
<div class="text-center py-5">
<div class="spinner-border text-primary" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer id="contact" style="background: linear-gradient(to right, #2172E2, #03489F); color: #ffffff; padding: 4rem 0 2rem; font-family: 'Inter', sans-serif;">
<div class="container">
<div class="row g-4 align-items-start">
<div class="col-lg-5 col-md-6">
<div class="mb-3">
<img src="footer_logo.png" alt="VSI MART Logo" style="height: 48px; max-width: 100%; object-fit: contain;">
</div>
<p class="pe-lg-5 text-white-50" style="font-size: 0.9rem; line-height: 1.6; color: rgba(255,255,255,0.85) !important;">
Handmade seashell crafts and ocean-inspired décor,<br>
beautifully crafted by skilled artisans in Chennai.<br>
Unique gifts, souvenirs, and beach-style creations<br>
made with sustainably sourced natural shells.
</p>
</div>
<div class="col-lg-2 col-md-3">
<h5 class="text-white fw-bold mb-3" style="font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.15rem;">Quick Links</h5>
<ul class="list-unstyled d-flex flex-column gap-2" style="font-size: 0.9rem;">
<li><a href="{{ url('/') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Home</a></li>
<li><a href="{{ url('/shop') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Shop</a></li>
<li><a href="{{ url('/gallery') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Gallery</a></li>
<li><a href="#contact" class="text-white text-decoration-none opacity-85 hover-opacity-100">Contact</a></li>
</ul>
</div>
<div class="col-lg-3 col-md-3">
<h5 class="text-white fw-bold mb-3" style="font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.15rem;">Contact Us</h5>
<ul class="list-unstyled d-flex flex-column gap-2 text-white-50" style="font-size: 0.9rem; color: rgba(255,255,255,0.85) !important;">
<li>• Chennai, Tamil Nadu, India</li>
<li>• +91 XXXXX XXXXX</li>
<li>• info@vsimart.com</li>
</ul>
</div>
</div>
</div>
<hr class="my-4" style="background-color: rgba(255,255,255,0.35); height: 2.5px; opacity: 1; border: none; margin-left: 0; margin-right: 0; width: 100%;">
<div class="container">
<div class="text-start small text-white-50" style="color: rgba(255,255,255,0.85) !important;">
&copy; 2026 VSI Mart. All Rights Reserved.
</div>
</div>
</footer>
<!-- Bootstrap & jQuery Scripts -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<!-- Custom JS -->
<script src="main.js"></script>
<script>
$(document).ready(function() {
// First check if user is logged in
$.ajax({
url: "/api/customer/status",
method: "GET",
success: function(res) {
if (res.success && res.logged_in) {
$('#dash-user-name').text(res.data.name);
$('#dash-user-email').text(res.data.email);
fetchOrders();
} else {
// Redirect to home if not logged in
window.location.href = '/';
}
},
error: function() {
window.location.href = '/';
}
});
function fetchOrders() {
$.ajax({
url: "/api/customer/orders",
method: "GET",
success: function(res) {
if (res.success) {
renderOrders(res.data);
} else {
$('#orders-container').html('<div class="alert alert-danger">Failed to load orders.</div>');
}
},
error: function() {
$('#orders-container').html('<div class="alert alert-danger">Failed to load orders.</div>');
}
});
}
function renderOrders(orders) {
let container = $('#orders-container');
if (!orders || orders.length === 0) {
container.html(`
<div class="empty-state">
<i class="bi bi-bag-x" style="font-size: 4rem; color: #cbd5e1;"></i>
<h4 class="mt-3 text-secondary">No Orders Yet</h4>
<p class="text-muted">Looks like you haven't placed any orders.</p>
<a href="/shop" class="btn btn-primary rounded-pill px-4 mt-2">Start Shopping</a>
</div>
`);
return;
}
// Sort orders by id desc
orders.sort((a, b) => b.id - a.id);
let html = '';
orders.forEach(order => {
let statusClass = 'status-pending';
if (order.order_status === 'shipped') statusClass = 'status-shipped';
if (order.order_status === 'delivered') statusClass = 'status-delivered';
let itemsHtml = '';
if (order.items && order.items.length > 0) {
order.items.forEach(item => {
itemsHtml += `
<li>
<span><i class="bi bi-box-seam text-secondary me-2"></i>Product #${item.product_id} (x${item.quantity})</span>
<span class="text-dark fw-bold">₹${Math.round(item.price)}</span>
</li>
`;
});
} else {
itemsHtml = `<li><span class="text-muted">No details available</span></li>`;
}
let date = new Date(order.created_at).toLocaleDateString('en-IN', {
year: 'numeric', month: 'short', day: 'numeric'
});
html += `
<div class="order-card">
<div class="order-header">
<div>
<div class="order-id"><i class="bi bi-receipt me-2"></i>${order.order_number}</div>
<div class="text-muted small mt-1">Placed on ${date}</div>
</div>
<div class="text-end">
<div class="order-status ${statusClass}">${order.order_status}</div>
<div class="order-total mt-2">₹${Math.round(order.total)}</div>
</div>
</div>
<div class="order-body">
<h6 class="fw-bold mb-3" style="font-size: 0.9rem;">Order Items:</h6>
<ul class="item-list">
${itemsHtml}
</ul>
</div>
</div>
`;
});
container.html(html);
}
});
</script>
</body>
</html>
...@@ -63,13 +63,8 @@ ...@@ -63,13 +63,8 @@
<!-- Promotional Ticker --> <!-- Promotional Ticker -->
<div class="ticker-container"> <div class="ticker-container">
<div class="ticker-wrap"> <div class="ticker-wrap" id="announcementTicker">
<div class="ticker-item"><i class="fa-solid fa-truck"></i> Delivered within 3 days in Chennai</div> <!-- Populated dynamically via local state db -->
<div class="ticker-item"><i class="fa-solid fa-star"></i> New arrivals every week check them out!</div>
<div class="ticker-item"><i class="fa-solid fa-tag"></i> Use code <b>OCEAN10</b> for 10% off your first order</div>
<div class="ticker-item"><i class="fa-solid fa-box"></i> 4-7 days all-India shipping available</div>
<div class="ticker-item"><i class="fa-solid fa-truck-ramp-box"></i> Free delivery on orders above ₹999</div>
<div class="ticker-item"><i class="fa-solid fa-gift"></i> Gift wrapping available</div>
</div> </div>
</div> </div>
...@@ -187,143 +182,8 @@ ...@@ -187,143 +182,8 @@
<h2 class="h1 fw-bold text-dark mb-2" style="font-family: 'Poppins', sans-serif;">Our Bestsellers</h2> <h2 class="h1 fw-bold text-dark mb-2" style="font-family: 'Poppins', sans-serif;">Our Bestsellers</h2>
<p class="text-muted">Shop elegant shell crafts, beach souvenirs, jewelry, and decorative items inspired by the beauty of the ocean</p> <p class="text-muted">Shop elegant shell crafts, beach souvenirs, jewelry, and decorative items inspired by the beauty of the ocean</p>
</div> </div>
<div class="row g-4"> <div class="row g-4" id="dynamicBestsellers">
<!-- Product 1 --> <!-- Populated dynamically from products table -->
<div class="col-lg-3 col-md-6">
<div class="card product-card border rounded-3 overflow-hidden shadow-sm h-100">
<div class="position-relative">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="fa-regular fa-heart"></i></button>
<img src="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80" class="card-img-top object-fit-cover" alt="Decorative Shell Wall Frame" height="220">
</div>
<div class="card-body d-flex flex-column p-3">
<h5 class="product-title fw-bold mb-1" style="font-size: 0.95rem; color: #000000;">Decorative Shell Wall Frame</h5>
<div class="d-flex align-items-center mb-2">
<span class="product-price fw-bold text-dark fs-5">₹850</span>
<span class="product-price-strike text-muted small ms-2">₹935</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.7rem;">SAVE ₹85</span>
</div>
<div class="text-primary fw-bold small mb-2">9% OFF</div>
<div class="product-rating small mb-2">
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-regular fa-star text-warning"></i>
<span class="text-muted ms-1">(32)</span>
</div>
<div class="size-select-group my-2">
<span class="text-muted small w-100 mb-1">Size / Variant</span>
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<button class="btn btn-custom-primary w-100 mt-auto rounded-pill text-white btn-add-to-cart-dynamic" data-id="p1" data-name="Decorative Shell Wall Frame" data-price="850" data-img="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
<!-- Product 2 -->
<div class="col-lg-3 col-md-6">
<div class="card product-card border rounded-3 overflow-hidden shadow-sm h-100">
<div class="position-relative">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="fa-regular fa-heart"></i></button>
<img src="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=500&auto=format&fit=crop&q=80" class="card-img-top object-fit-cover" alt="Seashell Wind Chime" height="220">
</div>
<div class="card-body d-flex flex-column p-3">
<h5 class="product-title fw-bold mb-1" style="font-size: 0.95rem; color: #000000;">Seashell Wind Chime</h5>
<div class="d-flex align-items-center mb-2">
<span class="product-price fw-bold text-dark fs-5">₹450</span>
<span class="product-price-strike text-muted small ms-2">₹535</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.7rem;">SAVE ₹85</span>
</div>
<div class="text-primary fw-bold small mb-2">9% OFF</div>
<div class="product-rating small mb-2">
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-regular fa-star text-warning"></i>
<span class="text-muted ms-1">(32)</span>
</div>
<div class="size-select-group my-2">
<span class="text-muted small w-100 mb-1">Size / Variant</span>
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<button class="btn btn-custom-primary w-100 mt-auto rounded-pill text-white btn-add-to-cart-dynamic" data-id="p2" data-name="Seashell Wind Chime" data-price="450" data-img="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
<!-- Product 3 -->
<div class="col-lg-3 col-md-6">
<div class="card product-card border rounded-3 overflow-hidden shadow-sm h-100">
<div class="position-relative">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="fa-regular fa-heart"></i></button>
<img src="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=500&auto=format&fit=crop&q=80" class="card-img-top object-fit-cover" alt="Ocean Gift Hamper Box" height="220">
</div>
<div class="card-body d-flex flex-column p-3">
<h5 class="product-title fw-bold mb-1" style="font-size: 0.95rem; color: #000000;">Ocean Gift Hamper Box</h5>
<div class="d-flex align-items-center mb-2">
<span class="product-price fw-bold text-dark fs-5">₹1,850</span>
<span class="product-price-strike text-muted small ms-2">₹2,335</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.7rem;">SAVE ₹185</span>
</div>
<div class="text-primary fw-bold small mb-2">12% OFF</div>
<div class="product-rating small mb-2">
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-regular fa-star text-warning"></i>
<span class="text-muted ms-1">(32)</span>
</div>
<div class="size-select-group my-2">
<span class="text-muted small w-100 mb-1">Size / Variant</span>
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<button class="btn btn-custom-primary w-100 mt-auto rounded-pill text-white btn-add-to-cart-dynamic" data-id="p3" data-name="Ocean Gift Hamper Box" data-price="1850" data-img="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
<!-- Product 4 -->
<div class="col-lg-3 col-md-6">
<div class="card product-card border rounded-3 overflow-hidden shadow-sm h-100">
<div class="position-relative">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="fa-regular fa-heart"></i></button>
<img src="https://images.unsplash.com/photo-1595855759920-86582396756a?w=500&auto=format&fit=crop&q=80" class="card-img-top object-fit-cover" alt="Personalized Shell Name Plate" height="220">
</div>
<div class="card-body d-flex flex-column p-3">
<h5 class="product-title fw-bold mb-1" style="font-size: 0.95rem; color: #000000;">Personalized Shell Name Plate</h5>
<div class="d-flex align-items-center mb-2">
<span class="product-price fw-bold text-dark fs-5">₹850</span>
<span class="product-price-strike text-muted small ms-2">₹935</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.7rem;">SAVE ₹85</span>
</div>
<div class="text-primary fw-bold small mb-2">9% OFF</div>
<div class="product-rating small mb-2">
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-regular fa-star text-warning"></i>
<span class="text-muted ms-1">(32)</span>
</div>
<div class="size-select-group my-2">
<span class="text-muted small w-100 mb-1">Size / Variant</span>
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<button class="btn btn-custom-primary w-100 mt-auto rounded-pill text-white btn-add-to-cart-dynamic" data-id="p4" data-name="Personalized Shell Name Plate" data-price="850" data-img="https://images.unsplash.com/photo-1595855759920-86582396756a?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div> </div>
<div class="text-center mt-5"> <div class="text-center mt-5">
<a href="{{ url('/shop') }}" class="btn btn-outline-primary rounded-pill px-4 py-2 border-2">View All Products &rarr;</a> <a href="{{ url('/shop') }}" class="btn btn-outline-primary rounded-pill px-4 py-2 border-2">View All Products &rarr;</a>
...@@ -679,6 +539,102 @@ ...@@ -679,6 +539,102 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<!-- Custom JS --> <!-- Custom JS -->
<script src="main.js"></script> <script src="main.js"></script>
<script>
// Fetch and render announcements dynamically from the backend table
$(document).ready(function() {
$.ajax({
url: "{{ url('/admin/active-announcements') }}",
method: "GET",
dataType: "json",
success: function(response) {
if (response.success && response.data.length > 0) {
$('#announcementTicker').html(response.data.map(a => `
<div class="ticker-item"><i class="fa-solid ${a.icon || 'fa-bullhorn'}"></i> ${a.content}</div>
`).join(''));
} else {
$('#announcementTicker').html('<div class="ticker-item"><i class="fa-solid fa-bullhorn"></i> Welcome to VSI Mart - Ocean Treasures!</div>');
}
},
error: function() {
$('#announcementTicker').html('<div class="ticker-item"><i class="fa-solid fa-bullhorn"></i> Welcome to VSI Mart - Handcrafted Ocean Treasures</div>');
}
});
// Fetch and render dynamic bestsellers from relational table
$.ajax({
url: "{{ url('/api/products') }}?bestsellers=1",
method: "GET",
dataType: "json",
success: function(response) {
if (response.success && response.data.data.length > 0) {
let html = '';
response.data.data.forEach(p => {
let imgUrl = p.primary_image ? p.primary_image.image_url : 'https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80';
let strikePart = p.strike_price ? `<span class="product-price-strike text-muted small ms-2">₹${Math.round(p.strike_price)}</span>` : '';
let saveBadge = p.strike_price && p.strike_price > p.price ? `<span class="badge bg-primary ms-auto" style="font-size: 0.7rem;">SAVE ₹${Math.round(p.strike_price - p.price)}</span>` : '';
let discountTag = p.strike_price && p.strike_price > p.price ? `<div class="text-primary fw-bold small mb-2">${Math.round(((p.strike_price - p.price)/p.strike_price)*100)}% OFF</div>` : '';
let sizeButtons = '';
if (p.variants && p.variants.length > 0) {
p.variants.forEach((v, idx) => {
sizeButtons += `<button class="size-btn ${idx === 0 ? 'active' : ''}" data-price="${Math.round(v.price)}" data-size="${v.size}">${v.size}</button> `;
});
} else {
sizeButtons = `
<button class="size-btn active" data-price="${Math.round(p.price)}" data-size="Small">Small</button>
<button class="size-btn" data-price="${Math.round(p.price * 1.25)}" data-size="Medium">Medium</button>
<button class="size-btn" data-price="${Math.round(p.price * 1.50)}" data-size="Large">Large</button>
`;
}
html += `
<div class="col-lg-3 col-md-6">
<div class="card product-card border rounded-3 overflow-hidden shadow-sm h-100" id="prod-card-${p.id}">
<div class="position-relative">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="fa-regular fa-heart"></i></button>
<img src="${imgUrl}" class="card-img-top object-fit-cover" alt="${p.name}" height="220">
</div>
<div class="card-body d-flex flex-column p-3">
<h5 class="product-title fw-bold mb-1" style="font-size: 0.95rem; color: #000000;">${p.name}</h5>
<div class="d-flex align-items-center mb-2">
<span class="product-price fw-bold text-dark fs-5 display-price">₹${Math.round(p.price)}</span>
${strikePart}
${saveBadge}
</div>
${discountTag}
<div class="product-rating small mb-2">
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-regular fa-star text-warning"></i>
<span class="text-muted ms-1">(32)</span>
</div>
<div class="size-select-group my-2">
<span class="text-muted small w-100 mb-1">Size / Variant</span>
${sizeButtons}
</div>
<button class="btn btn-custom-primary w-100 mt-auto rounded-pill text-white btn-add-to-cart-dynamic" data-id="${p.id}" data-name="${p.name}" data-price="${Math.round(p.price)}" data-img="${imgUrl}">Add to cart</button>
</div>
</div>
</div>
`;
});
$('#dynamicBestsellers').html(html);
// Attach live click handlers to dynamic size selection buttons
$('.size-btn').on('click', function() {
const newPrice = $(this).attr('data-price');
const card = $(this).closest('.product-card');
card.find('.display-price').text('₹' + newPrice);
card.find('.btn-add-to-cart-dynamic').attr('data-price', newPrice);
});
}
}
});
});
</script>
</body> </body>
</html> </html>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Dashboard - VSI Mart</title>
<!-- Bootstrap 5 CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- FontAwesome 6 Icons -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<style>
:root {
--primary-blue: #2172E2;
--dark-blue: #03489F;
--light-bg: #f8fafc;
--success-green: #10b981;
--warning-orange: #f59e0b;
--accent-red: #ef4444;
}
body {
font-family: 'Plus Jakarta Sans', sans-serif;
background-color: var(--light-bg);
color: #1e293b;
margin: 0;
overflow-x: hidden;
}
/* Seashell Pre-loader overlay */
.loader-overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: #03489F;
z-index: 9999;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: white;
transition: opacity 0.5s ease, visibility 0.5s ease;
}
/* High-end Shells AI animated loader - Realistic shell collection cycling */
.shells-ai-loader-container {
width: 140px;
height: 140px;
margin-bottom: 25px;
position: relative;
animation: shells-float 3.5s ease-in-out infinite;
}
.shells-ai-svg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
transition: opacity 0.8s ease-in-out;
}
/* Cycle keyframes for each of the 4 shells based on the image */
.shells-ai-svg.shell-scallop {
animation: cycle-shell-1 8s infinite ease-in-out;
}
.shells-ai-svg.shell-conch {
animation: cycle-shell-2 8s infinite ease-in-out;
}
.shells-ai-svg.shell-cowrie {
animation: cycle-shell-3 8s infinite ease-in-out;
}
.shells-ai-svg.shell-snail {
animation: cycle-shell-4 8s infinite ease-in-out;
}
@keyframes shells-float {
0%, 100% { transform: translateY(0) scale(1); }
50% { transform: translateY(-18px) scale(1.05); }
}
@keyframes cycle-shell-1 {
0%, 20% { opacity: 1; filter: drop-shadow(0 0 18px rgba(227, 82, 107, 0.85)); }
25%, 95% { opacity: 0; }
100% { opacity: 1; }
}
@keyframes cycle-shell-2 {
0%, 20% { opacity: 0; }
25%, 45% { opacity: 1; filter: drop-shadow(0 0 20px rgba(255, 91, 0, 0.95)); }
50%, 100% { opacity: 0; }
}
@keyframes cycle-shell-3 {
0%, 45% { opacity: 0; }
50%, 70% { opacity: 1; filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.9)); }
75%, 100% { opacity: 0; }
}
@keyframes cycle-shell-4 {
0%, 70% { opacity: 0; }
75%, 95% { opacity: 1; filter: drop-shadow(0 0 20px rgba(76, 163, 117, 0.9)); }
100% { opacity: 0; }
}
/* Glassmorphism Login Container */
.login-overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: linear-gradient(135deg, #03489F 0%, #2172E2 100%);
display: flex;
align-items: center;
justify-content: center;
z-index: 1500;
transition: opacity 0.4s ease, visibility 0.4s ease;
}
.login-card {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 24px;
padding: 40px;
width: 100%;
max-width: 440px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
color: white;
text-align: center;
}
/* Sidebar Styling */
.sidebar {
height: 100vh;
background: linear-gradient(180deg, var(--dark-blue), var(--primary-blue));
color: white;
position: fixed;
top: 0;
left: 0;
width: 260px;
padding-top: 20px;
z-index: 100;
overflow-y: auto;
transition: all 0.3s ease;
}
.sidebar .brand-logo {
padding: 10px 25px 25px 25px;
font-size: 1.5rem;
font-weight: 800;
letter-spacing: 0.5px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
margin-bottom: 20px;
}
.sidebar-heading {
font-size: 0.72rem;
text-transform: uppercase;
letter-spacing: 1.5px;
color: rgba(255, 255, 255, 0.5);
padding: 12px 25px 6px 25px;
font-weight: 700;
}
.sidebar-menu {
list-style: none;
padding: 0;
margin: 0;
}
.sidebar-menu li a {
display: flex;
align-items: center;
padding: 11px 25px;
color: rgba(255, 255, 255, 0.85);
text-decoration: none;
font-weight: 500;
transition: all 0.2s ease;
border-left: 4px solid transparent;
font-size: 0.92rem;
}
.sidebar-menu li a:hover, .sidebar-menu li.active a {
color: white;
background-color: rgba(255, 255, 255, 0.1);
border-left-color: #FFB900;
}
.sidebar-menu li a i {
margin-right: 12px;
font-size: 1.05rem;
width: 20px;
text-align: center;
}
.submenu {
list-style: none;
padding-left: 15px;
background-color: rgba(0, 0, 0, 0.15);
}
.submenu li a {
padding: 8px 25px;
font-size: 0.85rem;
}
/* Collapsible Menu Header */
.collapsible-header {
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 25px;
color: rgba(255, 255, 255, 0.9);
font-weight: 600;
font-size: 0.92rem;
transition: background 0.2s;
}
.collapsible-header:hover {
background-color: rgba(255, 255, 255, 0.05);
}
.collapsible-header i.chevron {
transition: transform 0.2s;
}
.collapsible-header.collapsed i.chevron {
transform: rotate(-90deg);
}
/* Main Content Styling */
.main-content {
margin-left: 260px;
padding: 40px;
min-height: 100vh;
transition: all 0.3s ease;
}
.panel-card {
background-color: white;
border-radius: 16px;
border: 1px solid #e2e8f0;
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
padding: 25px;
margin-bottom: 30px;
}
.stat-card {
background-color: white;
border-radius: 16px;
padding: 24px;
border: 1px solid #e2e8f0;
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
transition: transform 0.2s ease;
}
.stat-icon {
width: 48px;
height: 48px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.35rem;
margin-bottom: 15px;
}
.stat-icon.sales { background-color: #dbeafe; color: var(--primary-blue); }
.stat-icon.orders { background-color: #d1fae5; color: var(--success-green); }
.stat-icon.products { background-color: #fef3c7; color: var(--warning-orange); }
.table-responsive {
border-radius: 12px;
overflow: hidden;
border: 1px solid #e2e8f0;
}
.table th {
font-weight: 600;
font-size: 0.82rem;
color: #64748b;
text-transform: uppercase;
letter-spacing: 0.5px;
padding: 12px 15px;
background-color: #f8fafc;
border-bottom: 1px solid #e2e8f0;
}
.table td {
padding: 12px 15px;
vertical-align: middle;
font-size: 0.88rem;
border-bottom: 1px solid #f1f5f9;
}
.status-badge {
padding: 5px 12px;
border-radius: 30px;
font-weight: 600;
font-size: 0.75rem;
display: inline-block;
}
.status-pending { background-color: #fef3c7; color: #d97706; }
.status-shipped { background-color: #e0f2fe; color: #0369a1; }
.status-delivered { background-color: #d1fae5; color: #047857; }
.btn-action {
width: 32px;
height: 32px;
border-radius: 8px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid #e2e8f0;
background-color: white;
color: #64748b;
transition: all 0.2s ease;
text-decoration: none;
margin-right: 3px;
}
.btn-action:hover {
background-color: #f8fafc;
color: var(--primary-blue);
border-color: var(--primary-blue);
}
/* Toast Container */
.toast-box {
position: fixed;
bottom: 25px;
right: 25px;
background-color: #1e293b;
color: white;
padding: 12px 24px;
border-radius: 12px;
font-weight: 600;
font-size: 0.9rem;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
z-index: 9999;
display: flex;
align-items: center;
gap: 10px;
transform: translateY(100px);
opacity: 0;
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast-box.show {
transform: translateY(0);
opacity: 1;
}
</style>
</head>
<body>
<!-- Seashell Pre-loader overlay -->
<div class="loader-overlay" id="pageLoader">
<div class="shells-ai-loader-container">
<!-- Shell 1: Pink Scallop Shell -->
<svg viewBox="0 0 100 100" class="shells-ai-svg shell-scallop">
<defs>
<linearGradient id="scallopGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#FF8A8A" />
<stop offset="50%" stop-color="#E3526B" />
<stop offset="100%" stop-color="#9C1E3E" />
</linearGradient>
</defs>
<path d="M50,12 C44,30 32,45 22,62 C16,72 19,82 30,84 C38,85 45,74 50,67 C55,74 62,85 70,84 C81,82 84,72 78,62 C68,45 56,30 50,12 Z" fill="url(#scallopGrad)"/>
<path d="M50,12 L50,67 M50,12 C47,30 43,48 40,65 M50,12 C53,30 57,48 60,65 M50,12 C40,30 30,48 26,67 M50,12 C60,30 70,48 74,67 M50,12 C35,30 22,48 18,70 M50,12 C65,30 78,48 82,70" stroke="rgba(255,255,255,0.45)" stroke-width="2" fill="none"/>
</svg>
<!-- Shell 2: Orange Conch Shell -->
<svg viewBox="0 0 100 100" class="shells-ai-svg shell-conch">
<defs>
<linearGradient id="conchGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#FFEED4" />
<stop offset="60%" stop-color="#FFBD8A" />
<stop offset="100%" stop-color="#FF5B00" />
</linearGradient>
</defs>
<path d="M45,15 C48,22 55,25 60,20 C65,15 58,10 50,8 C40,6 35,12 40,18 Z" fill="#FFEED4"/>
<path d="M40,18 C30,30 20,48 22,65 C24,80 40,82 50,75 C62,65 72,40 68,28 C64,18 52,15 40,18 Z" fill="url(#conchGrad)"/>
<path d="M48,32 C42,42 35,55 38,72 C40,80 50,82 54,75 C58,68 62,55 58,40 C55,32 50,30 48,32 Z" fill="#FF5B00" opacity="0.9"/>
<path d="M38,20 C32,32 26,45 28,60 M46,20 C42,32 38,48 40,65" stroke="rgba(255,255,255,0.3)" stroke-width="2.2" fill="none"/>
</svg>
<!-- Shell 3: Ivory Cowrie Shell -->
<svg viewBox="0 0 100 100" class="shells-ai-svg shell-cowrie">
<defs>
<linearGradient id="cowrieGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#FFFFFF" />
<stop offset="70%" stop-color="#F2EFE9" />
<stop offset="100%" stop-color="#D9D0C1" />
</linearGradient>
</defs>
<path d="M50,15 C32,15 25,32 25,50 C25,68 32,85 50,85 C68,85 75,68 75,50 C75,32 68,15 50,15 Z" fill="url(#cowrieGrad)" stroke="#C4B9A3" stroke-width="1"/>
<path d="M50,22 C48,35 48,65 50,78" stroke="#877C68" stroke-width="4" stroke-linecap="round" fill="none"/>
<path d="M43,30 L48,30 M43,38 L48,38 M43,46 L48,46 M43,54 L48,54 M43,62 L48,62 M43,70 L48,70 M57,30 L52,30 M57,38 L52,38 M57,46 L52,46 M57,54 L52,54 M57,62 L52,62 M57,70 L52,70" stroke="#877C68" stroke-width="1.8"/>
</svg>
<!-- Shell 4: Green Snail Shell -->
<svg viewBox="0 0 100 100" class="shells-ai-svg shell-snail">
<defs>
<linearGradient id="snailGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#9CDEB5" />
<stop offset="50%" stop-color="#4CA375" />
<stop offset="100%" stop-color="#216E45" />
</linearGradient>
</defs>
<path d="M50,18 C30,18 20,32 20,50 C20,68 35,82 50,82 C65,82 80,68 80,50 C80,35 70,22 55,20 C42,18 32,28 32,42 C32,54 42,62 52,60 C60,58 65,50 62,42 C60,35 52,32 48,38" fill="url(#snailGrad)"/>
<path d="M50,18 C30,18 20,32 20,50 C20,68 35,82 50,82 C65,82 80,68 80,50" stroke="#104A2B" stroke-width="2.5" fill="none"/>
<path d="M55,20 C42,18 32,28 32,42 C32,54 42,62 52,60" stroke="#104A2B" stroke-width="1.8" fill="none"/>
<path d="M22,40 L30,42 M22,60 L31,56 M35,76 L40,68 M55,80 L52,71 M72,70 L65,63 M78,50 L68,48 M70,32 L62,35 M55,20 L52,30" stroke="rgba(255,255,255,0.4)" stroke-width="2"/>
</svg>
</div>
<h4 class="fw-bold tracking-wider">VSI MART</h4>
<span class="small opacity-75">Loading seashell treasures...</span>
</div>
<!-- Glassmorphic Login Overlay -->
<div class="login-overlay d-none" id="loginOverlay">
<div class="login-card">
<div class="shells-ai-loader-container mx-auto">
<!-- Shell 1: Pink Scallop Shell -->
<svg viewBox="0 0 100 100" class="shells-ai-svg shell-scallop">
<path d="M50,12 C44,30 32,45 22,62 C16,72 19,82 30,84 C38,85 45,74 50,67 C55,74 62,85 70,84 C81,82 84,72 78,62 C68,45 56,30 50,12 Z" fill="url(#scallopGrad)"/>
<path d="M50,12 L50,67 M50,12 C47,30 43,48 40,65 M50,12 C53,30 57,48 60,65 M50,12 C40,30 30,48 26,67 M50,12 C60,30 70,48 74,67 M50,12 C35,30 22,48 18,70 M50,12 C65,30 78,48 82,70" stroke="rgba(255,255,255,0.45)" stroke-width="2" fill="none"/>
</svg>
<!-- Shell 2: Orange Conch Shell -->
<svg viewBox="0 0 100 100" class="shells-ai-svg shell-conch">
<path d="M45,15 C48,22 55,25 60,20 C65,15 58,10 50,8 C40,6 35,12 40,18 Z" fill="#FFEED4"/>
<path d="M40,18 C30,30 20,48 22,65 C24,80 40,82 50,75 C62,65 72,40 68,28 C64,18 52,15 40,18 Z" fill="url(#conchGrad)"/>
<path d="M48,32 C42,42 35,55 38,72 C40,80 50,82 54,75 C58,68 62,55 58,40 C55,32 50,30 48,32 Z" fill="#FF5B00" opacity="0.9"/>
<path d="M38,20 C32,32 26,45 28,60 M46,20 C42,32 38,48 40,65" stroke="rgba(255,255,255,0.3)" stroke-width="2.2" fill="none"/>
</svg>
<!-- Shell 3: Ivory Cowrie Shell -->
<svg viewBox="0 0 100 100" class="shells-ai-svg shell-cowrie">
<path d="M50,15 C32,15 25,32 25,50 C25,68 32,85 50,85 C68,85 75,68 75,50 C75,32 68,15 50,15 Z" fill="url(#cowrieGrad)" stroke="#C4B9A3" stroke-width="1"/>
<path d="M50,22 C48,35 48,65 50,78" stroke="#877C68" stroke-width="4" stroke-linecap="round" fill="none"/>
<path d="M43,30 L48,30 M43,38 L48,38 M43,46 L48,46 M43,54 L48,54 M43,62 L48,62 M43,70 L48,70 M57,30 L52,30 M57,38 L52,38 M57,46 L52,46 M57,54 L52,54 M57,62 L52,62 M57,70 L52,70" stroke="#877C68" stroke-width="1.8"/>
</svg>
<!-- Shell 4: Green Snail Shell -->
<svg viewBox="0 0 100 100" class="shells-ai-svg shell-snail">
<path d="M50,18 C30,18 20,32 20,50 C20,68 35,82 50,82 C65,82 80,68 80,50 C80,35 70,22 55,20 C42,18 32,28 32,42 C32,54 42,62 52,60 C60,58 65,50 62,42 C60,35 52,32 48,38" fill="url(#snailGrad)"/>
<path d="M50,18 C30,18 20,32 20,50 C20,68 35,82 50,82 C65,82 80,68 80,50" stroke="#104A2B" stroke-width="2.5" fill="none"/>
<path d="M55,20 C42,18 32,28 32,42 C32,54 42,62 52,60" stroke="#104A2B" stroke-width="1.8" fill="none"/>
<path d="M22,40 L30,42 M22,60 L31,56 M35,76 L40,68 M55,80 L52,71 M72,70 L65,63 M78,50 L68,48 M70,32 L62,35 M55,20 L52,30" stroke="rgba(255,255,255,0.4)" stroke-width="2"/>
</svg>
</div>
<h3 class="fw-bold mb-2">VSI Mart Admin</h3>
<p class="text-white-50 mb-4">Please log in to manage your inventory and store operations.</p>
<form id="loginForm">
<div class="mb-3 text-start">
<label class="form-label small fw-semibold text-white-50">Username</label>
<input type="text" id="username" class="form-control bg-transparent text-white border-white-50 rounded-pill px-3" value="admin" required>
</div>
<div class="mb-4 text-start">
<label class="form-label small fw-semibold text-white-50">Password</label>
<input type="password" id="password" class="form-control bg-transparent text-white border-white-50 rounded-pill px-3" value="admin123" required>
</div>
<button type="submit" class="btn btn-warning w-100 rounded-pill py-2.5 fw-bold text-dark mb-2">Login</button>
<div class="text-danger small" id="loginError"></div>
</form>
</div>
</div>
<!-- Sidebar Layout -->
<div class="sidebar" id="adminSidebar">
<div class="brand-logo d-flex align-items-center">
<svg viewBox="0 0 100 100" class="me-2 text-warning" style="width: 28px; height: 28px; filter: drop-shadow(0 0 4px rgba(255,185,0,0.8));">
<path d="M50,15 C45,30 35,45 25,60 C20,70 22,80 32,82 C40,83 45,72 50,65 C55,72 60,83 68,82 C78,80 80,70 75,60 C65,45 55,30 50,15 Z" fill="#FFB900" />
</svg>
<span>VSI Admin</span>
</div>
<!-- DASHBOARD TAB -->
<ul class="sidebar-menu">
<li class="{{ Request::is('admin/dashboard') || Request::is('admin') ? 'active' : '' }}"><a href="{{ url('/admin/dashboard') }}"><i class="fa-solid fa-chart-pie"></i>Overview</a></li>
</ul>
<!-- MASTER DATA GROUP (COLLAPSIBLE) -->
<div class="sidebar-heading collapsible-header" data-bs-toggle="collapse" data-bs-target="#masterSubmenu" aria-expanded="true">
<span>Master Data</span>
<i class="fa-solid fa-chevron-down chevron"></i>
</div>
<div class="collapse show" id="masterSubmenu">
<ul class="sidebar-menu submenu">
<li class="{{ Request::is('admin/countries') ? 'active' : '' }}"><a href="{{ url('/admin/countries') }}"><i class="fa-solid fa-globe"></i>Countries</a></li>
<li class="{{ Request::is('admin/states') ? 'active' : '' }}"><a href="{{ url('/admin/states') }}"><i class="fa-solid fa-map"></i>States</a></li>
<li class="{{ Request::is('admin/cities') ? 'active' : '' }}"><a href="{{ url('/admin/cities') }}"><i class="fa-solid fa-city"></i>Cities</a></li>
<li class="{{ Request::is('admin/units') ? 'active' : '' }}"><a href="{{ url('/admin/units') }}"><i class="fa-solid fa-scale-balanced"></i>Units</a></li>
<li class="{{ Request::is('admin/unitsizes') ? 'active' : '' }}"><a href="{{ url('/admin/unitsizes') }}"><i class="fa-solid fa-ruler-combined"></i>Unit Sizes</a></li>
<li class="{{ Request::is('admin/sizes') ? 'active' : '' }}"><a href="{{ url('/admin/sizes') }}"><i class="fa-solid fa-ruler"></i>Sizes</a></li>
<li class="{{ Request::is('admin/categories') ? 'active' : '' }}"><a href="{{ url('/admin/categories') }}"><i class="fa-solid fa-list"></i>Categories</a></li>
</ul>
</div>
<!-- MANAGE PORTAL GROUP (COLLAPSIBLE) -->
<div class="sidebar-heading collapsible-header" data-bs-toggle="collapse" data-bs-target="#manageSubmenu" aria-expanded="true">
<span>Manage Portal</span>
<i class="fa-solid fa-chevron-down chevron"></i>
</div>
<div class="collapse show" id="manageSubmenu">
<ul class="sidebar-menu submenu">
<li class="{{ Request::is('admin/products') ? 'active' : '' }}"><a href="{{ url('/admin/products') }}"><i class="fa-solid fa-boxes-stacked"></i>Products</a></li>
<li class="{{ Request::is('admin/productprices') ? 'active' : '' }}"><a href="{{ url('/admin/productprices') }}"><i class="fa-solid fa-tags"></i>Product Prices</a></li>
<li class="{{ Request::is('admin/orders') ? 'active' : '' }}"><a href="{{ url('/admin/orders') }}"><i class="fa-solid fa-cart-shopping"></i>Orders</a></li>
<li class="{{ Request::is('admin/orderstatuschange') ? 'active' : '' }}"><a href="{{ url('/admin/orderstatuschange') }}"><i class="fa-solid fa-truck-ramp-box"></i>Order Status Change</a></li>
<li class="{{ Request::is('admin/announcements') ? 'active' : '' }}"><a href="{{ url('/admin/announcements') }}"><i class="fa-solid fa-bullhorn"></i>Announcements</a></li>
<li class="{{ Request::is('admin/gallery') ? 'active' : '' }}"><a href="{{ url('/admin/gallery') }}"><i class="fa-regular fa-image"></i>Gallery</a></li>
<li class="{{ Request::is('admin/pincodes') ? 'active' : '' }}"><a href="{{ url('/admin/pincodes') }}"><i class="fa-solid fa-map-pin"></i>Pincodes</a></li>
<li class="{{ Request::is('admin/coupons') ? 'active' : '' }}"><a href="{{ url('/admin/coupons') }}"><i class="fa-solid fa-percent"></i>Coupons</a></li>
<li class="{{ Request::is('admin/wishlist') ? 'active' : '' }}"><a href="{{ url('/admin/wishlist') }}"><i class="fa-solid fa-heart"></i>Wishlist</a></li>
</ul>
</div>
<!-- LOGOUT CONTROL -->
<ul class="sidebar-menu mt-4 border-top border-white-10">
<li><a href="#" id="logoutBtn" class="text-warning"><i class="fa-solid fa-arrow-right-from-bracket"></i>Logout</a></li>
</ul>
</div>
<!-- Main Content Panel -->
<div class="main-content" id="adminMainContent">
<!-- Dynamic Header -->
<div class="d-flex justify-content-between align-items-center mb-5">
<div>
<h1 class="fw-bold text-dark mb-1">@yield('page_title', 'Dashboard Overview')</h1>
<p class="text-muted mb-0">@yield('page_description', 'Manage and oversee VSI-MART seashell operations.')</p>
</div>
<div>
@yield('page_action')
</div>
</div>
<!-- DYNAMIC VIEWS CONTAINER (MODULAR BLADE INCLUDES) -->
<div id="viewsWrapper">
@yield('content')
</div>
</div>
<!-- Toast Notification Popup -->
<div class="toast-box" id="toastBox">
<i class="fa-solid fa-circle-check text-success"></i>
<span id="toastMsg">Operation successful!</span>
</div>
<!-- MAIN CRUDS / MODALS / CONTROLLERS SCRIPT -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script>
// Preloader fadeout
window.addEventListener('load', () => {
setTimeout(() => {
const loader = document.getElementById('pageLoader');
if (loader) {
loader.style.opacity = '0';
setTimeout(() => {
loader.style.visibility = 'hidden';
}, 500);
}
}, 800);
});
// Flash message handling
@if(session('success'))
document.addEventListener('DOMContentLoaded', () => {
const toast = document.getElementById('toastBox');
document.getElementById('toastMsg').innerText = "{{ session('success') }}";
toast.classList.add('show');
setTimeout(() => toast.classList.remove('show'), 2500);
});
@endif
@if(session('error'))
document.addEventListener('DOMContentLoaded', () => {
const toast = document.getElementById('toastBox');
document.getElementById('toastMsg').innerText = "{{ session('error') }}";
toast.querySelector('.fa-circle-check').classList.replace('fa-circle-check', 'fa-circle-xmark');
toast.querySelector('.fa-circle-xmark').classList.replace('text-success', 'text-danger');
toast.classList.add('show');
setTimeout(() => toast.classList.remove('show'), 3500);
});
@endif
// Unified Delete Function
function deleteRecord(type, id) {
if (confirm('Are you sure you want to delete this record?')) {
const form = document.createElement('form');
form.method = 'POST';
form.action = '/admin/master/' + type + '/' + id;
const csrf = document.createElement('input');
csrf.type = 'hidden';
csrf.name = '_token';
csrf.value = '{{ csrf_token() }}';
const method = document.createElement('input');
method.type = 'hidden';
method.name = '_method';
method.value = 'DELETE';
form.appendChild(csrf);
form.appendChild(method);
document.body.appendChild(form);
form.submit();
}
}
</script>
@stack('scripts')
</body>
</html>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<meta name="keywords" content="seashell crafts, beach decor, shell gifts, handmade jewelry, Chennai crafts, VSI Mart"> <meta name="keywords" content="seashell crafts, beach decor, shell gifts, handmade jewelry, Chennai crafts, VSI Mart">
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Decorative Shell Wall Frame - VSI Mart</title> <title>{{ ->name }} - VSI Mart</title>
<!-- Google Fonts --> <!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<ol class="breadcrumb"> <ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ url('/') }}" class="text-decoration-none">Home</a></li> <li class="breadcrumb-item"><a href="{{ url('/') }}" class="text-decoration-none">Home</a></li>
<li class="breadcrumb-item"><a href="{{ url('/shop') }}" class="text-decoration-none">All Products</a></li> <li class="breadcrumb-item"><a href="{{ url('/shop') }}" class="text-decoration-none">All Products</a></li>
<li class="breadcrumb-item active" aria-current="page">Decorative Shell Wall Frame</li> <li class="breadcrumb-item active" aria-current="page">{{ ->name }}</li>
</ol> </ol>
</nav> </nav>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
<div class="col-lg-6"> <div class="col-lg-6">
<div class="card border-0 shadow-sm rounded-4 overflow-hidden position-relative mb-3"> <div class="card border-0 shadow-sm rounded-4 overflow-hidden position-relative mb-3">
<span class="badge-bestseller">Best Seller</span> <span class="badge-bestseller">Best Seller</span>
<img id="main-product-img" src="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=1600&auto=format&fit=crop&q=90" alt="Decorative Shell Wall Frame" class="w-100 img-fluid" style="height: 630px; object-fit: cover;"> <img id="main-product-img" src="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=1600&auto=format&fit=crop&q=90" alt="{{ ->name }}" class="w-100 img-fluid" style="height: 630px; object-fit: cover;">
</div> </div>
<!-- Thumbnail carousel (5 images) --> <!-- Thumbnail carousel (5 images) -->
<div class="row g-2"> <div class="row g-2">
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
<!-- Right Side: Details & Configurator --> <!-- Right Side: Details & Configurator -->
<div class="col-lg-6"> <div class="col-lg-6">
<h1 class="fw-bold text-dark mb-2" style="font-size: 1.8rem;">Decorative Shell Wall Frame</h1> <h1 class="fw-bold text-dark mb-2" style="font-size: 1.8rem;">{{ ->name }}</h1>
<div class="d-flex align-items-center mb-1"> <div class="d-flex align-items-center mb-1">
<span class="fs-2 fw-bold text-dark me-2">₹450</span> <span class="fs-2 fw-bold text-dark me-2">₹450</span>
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
</div> </div>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<button class="btn-add-cart-detail w-100 py-2.5 btn-add-to-cart-dynamic" data-id="p1" data-name="Decorative Shell Wall Frame" data-price="450" data-img="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=800&auto=format&fit=crop&q=80"> <button class="btn-add-cart-detail w-100 py-2.5 btn-add-to-cart-dynamic" data-id="p1" data-name="{{ ->name }}" data-price="450" data-img="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=800&auto=format&fit=crop&q=80">
Add to cart Add to cart
</button> </button>
</div> </div>
...@@ -253,9 +253,9 @@ ...@@ -253,9 +253,9 @@
<div class="product-card"> <div class="product-card">
<span class="badge-bestseller">Best Seller</span> <span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button> <button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80" alt="Decorative Shell Wall Frame"> <img src="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80" alt="{{ ->name }}">
<div class="product-card-body"> <div class="product-card-body">
<h5 class="product-title">Decorative Shell Wall Frame</h5> <h5 class="product-title">{{ ->name }}</h5>
<div class="product-rating"> <div class="product-rating">
<i class="bi bi-star-fill text-warning"></i> <i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i> <i class="bi bi-star-fill text-warning"></i>
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
<span class="product-price-strike">₹935</span> <span class="product-price-strike">₹935</span>
<span class="badge bg-primary ms-2 px-2 py-1" style="font-size: 0.72rem; background-color: var(--primary-blue) !important;">SAVE ₹85</span> <span class="badge bg-primary ms-2 px-2 py-1" style="font-size: 0.72rem; background-color: var(--primary-blue) !important;">SAVE ₹85</span>
</div> </div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p1" data-name="Decorative Shell Wall Frame" data-price="850" data-img="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80">Add to cart</button> <button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p1" data-name="{{ ->name }}" data-price="850" data-img="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -127,15 +127,15 @@ ...@@ -127,15 +127,15 @@
<!-- Grid Header options --> <!-- Grid Header options -->
<div class="d-flex flex-wrap justify-content-between align-items-center mb-4 shop-header-options-bar"> <div class="d-flex flex-wrap justify-content-between align-items-center mb-4 shop-header-options-bar">
<div class="results-text">Showing 1–20 of 159 results</div> <div class="results-text">Showing 0–0 of 0 results</div>
<div class="d-flex align-items-center gap-3"> <div class="d-flex align-items-center gap-3">
<!-- Sort by Latest --> <!-- Sort by Latest -->
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<span class="label-sort">Sort:</span> <span class="label-sort">Sort:</span>
<select class="select-sort"> <select class="select-sort" id="sort-select">
<option>Sort by Latest</option> <option value="latest">Sort by Latest</option>
<option>Price: Low to High</option> <option value="price_low">Price: Low to High</option>
<option>Price: High to Low</option> <option value="price_high">Price: High to Low</option>
</select> </select>
</div> </div>
...@@ -146,9 +146,7 @@ ...@@ -146,9 +146,7 @@
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<span class="label-sort">Sort:</span> <span class="label-sort">Sort:</span>
<select class="select-sort"> <select class="select-sort">
<option>20 items</option> <option>12 items</option>
<option>40 items</option>
<option>60 items</option>
</select> </select>
</div> </div>
...@@ -164,515 +162,18 @@ ...@@ -164,515 +162,18 @@
</div> </div>
</div> </div>
<h3 class="fw-bold text-dark mb-4">15 products</h3> <h3 class="fw-bold text-dark mb-4">0 products</h3>
<!-- Products Grid --> <!-- Products Grid -->
<div class="row g-4" id="shop-product-grid"> <div class="row g-4" id="shop-product-grid">
<!-- Product items dynamically generated or replicated directly --> <!-- Populated dynamically via AJAX from products table -->
<!-- Replicated rows of bestseller frame/chime/hamper items as seen in screenshot -->
<!-- Row 1 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<a href="{{ url('/product-detail') }}"><img src="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80" alt="Decorative Shell Wall Frame"></a>
<div class="product-card-body">
<h5 class="product-title"><a href="{{ url('/product-detail') }}" class="text-decoration-none text-dark">Decorative Shell Wall Frame</a></h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹850</span>
<span class="product-price-strike">₹935</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹85</span>
</div>
<div class="text-primary fw-bold small mt-1">9% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p1" data-name="Decorative Shell Wall Frame" data-price="850" data-img="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=500&auto=format&fit=crop&q=80" alt="Seashell Wind Chime">
<div class="product-card-body">
<h5 class="product-title">Seashell Wind Chime</h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹450</span>
<span class="product-price-strike">₹535</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹85</span>
</div>
<div class="text-primary fw-bold small mt-1">9% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p2" data-name="Seashell Wind Chime" data-price="450" data-img="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=500&auto=format&fit=crop&q=80" alt="Ocean Gift Hamper Box">
<div class="product-card-body">
<h5 class="product-title">Ocean Gift Hamper Box</h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹1,850</span>
<span class="product-price-strike">₹2,335</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹185</span>
</div>
<div class="text-primary fw-bold small mt-1">12% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p3" data-name="Ocean Gift Hamper Box" data-price="1850" data-img="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div>
<!-- Repeated Rows to represent the 15 grid list as in screenshot page 2 -->
<!-- Row 2 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80" alt="Decorative Shell Wall Frame">
<div class="product-card-body">
<h5 class="product-title">Decorative Shell Wall Frame</h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹850</span>
<span class="product-price-strike">₹935</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹85</span>
</div>
<div class="text-primary fw-bold small mt-1">9% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p1" data-name="Decorative Shell Wall Frame" data-price="850" data-img="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=500&auto=format&fit=crop&q=80" alt="Seashell Wind Chime">
<div class="product-card-body">
<h5 class="product-title">Seashell Wind Chime</h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹450</span>
<span class="product-price-strike">₹535</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹85</span>
</div>
<div class="text-primary fw-bold small mt-1">9% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p2" data-name="Seashell Wind Chime" data-price="450" data-img="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=500&auto=format&fit=crop&q=80" alt="Ocean Gift Hamper Box">
<div class="product-card-body">
<h5 class="product-title">Ocean Gift Hamper Box</h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹1,850</span>
<span class="product-price-strike">₹2,335</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹185</span>
</div>
<div class="text-primary fw-bold small mt-1">12% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p3" data-name="Ocean Gift Hamper Box" data-price="1850" data-img="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div>
<!-- Row 3 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80" alt="Decorative Shell Wall Frame">
<div class="product-card-body">
<h5 class="product-title">Decorative Shell Wall Frame</h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹850</span>
<span class="product-price-strike">₹935</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹85</span>
</div>
<div class="text-primary fw-bold small mt-1">9% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p1" data-name="Decorative Shell Wall Frame" data-price="850" data-img="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=500&auto=format&fit=crop&q=80" alt="Seashell Wind Chime">
<div class="product-card-body">
<h5 class="product-title">Seashell Wind Chime</h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹450</span>
<span class="product-price-strike">₹535</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹85</span>
</div>
<div class="text-primary fw-bold small mt-1">9% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p2" data-name="Seashell Wind Chime" data-price="450" data-img="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=500&auto=format&fit=crop&q=80" alt="Ocean Gift Hamper Box">
<div class="product-card-body">
<h5 class="product-title">Ocean Gift Hamper Box</h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹1,850</span>
<span class="product-price-strike">₹2,335</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹185</span>
</div>
<div class="text-primary fw-bold small mt-1">12% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p3" data-name="Ocean Gift Hamper Box" data-price="1850" data-img="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div>
<!-- Row 4 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80" alt="Decorative Shell Wall Frame">
<div class="product-card-body">
<h5 class="product-title">Decorative Shell Wall Frame</h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹850</span>
<span class="product-price-strike">₹935</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹85</span>
</div>
<div class="text-primary fw-bold small mt-1">9% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p1" data-name="Decorative Shell Wall Frame" data-price="850" data-img="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=500&auto=format&fit=crop&q=80" alt="Seashell Wind Chime">
<div class="product-card-body">
<h5 class="product-title">Seashell Wind Chime</h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹450</span>
<span class="product-price-strike">₹535</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹85</span>
</div>
<div class="text-primary fw-bold small mt-1">9% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p2" data-name="Seashell Wind Chime" data-price="450" data-img="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=500&auto=format&fit=crop&q=80" alt="Ocean Gift Hamper Box">
<div class="product-card-body">
<h5 class="product-title">Ocean Gift Hamper Box</h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹1,850</span>
<span class="product-price-strike">₹2,335</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹185</span>
</div>
<div class="text-primary fw-bold small mt-1">12% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p3" data-name="Ocean Gift Hamper Box" data-price="1850" data-img="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div>
<!-- Row 5 -->
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80" alt="Decorative Shell Wall Frame">
<div class="product-card-body">
<h5 class="product-title">Decorative Shell Wall Frame</h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹850</span>
<span class="product-price-strike">₹935</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹85</span>
</div>
<div class="text-primary fw-bold small mt-1">9% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p1" data-name="Decorative Shell Wall Frame" data-price="850" data-img="https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=500&auto=format&fit=crop&q=80" alt="Seashell Wind Chime">
<div class="product-card-body">
<h5 class="product-title">Seashell Wind Chime</h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹450</span>
<span class="product-price-strike">₹535</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹85</span>
</div>
<div class="text-primary fw-bold small mt-1">9% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p2" data-name="Seashell Wind Chime" data-price="450" data-img="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6">
<div class="product-card">
<span class="badge-bestseller">Best Seller</span>
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<img src="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=500&auto=format&fit=crop&q=80" alt="Ocean Gift Hamper Box">
<div class="product-card-body">
<h5 class="product-title">Ocean Gift Hamper Box</h5>
<div class="product-rating">
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star-fill text-warning"></i>
<i class="bi bi-star text-warning"></i>
<span class="text-muted small ms-1">(32)</span>
</div>
<div class="size-select-group">
<button class="size-btn active">Small</button>
<button class="size-btn">Medium</button>
<button class="size-btn">Large</button>
</div>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center">
<span class="product-price">₹1,850</span>
<span class="product-price-strike">₹2,335</span>
<span class="badge bg-primary ms-auto" style="font-size: 0.72rem; padding: 0.2rem 0.4rem;">SAVE ₹185</span>
</div>
<div class="text-primary fw-bold small mt-1">12% OFF</div>
<button class="btn btn-add-to-cart w-100 mt-3 btn-add-to-cart-dynamic" data-id="p3" data-name="Ocean Gift Hamper Box" data-price="1850" data-img="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?w=500&auto=format&fit=crop&q=80">Add to cart</button>
</div>
</div>
</div>
</div> </div>
</div> </div>
<!-- Pagination --> <!-- Pagination -->
<nav class="mt-5" aria-label="Product catalog navigation"> <nav class="mt-5" aria-label="Product catalog navigation">
<ul class="custom-pagination"> <ul class="custom-pagination" id="pagination-container">
<li class="page-item arrow-item"><a class="page-link" href="#" aria-label="Previous"><i class="bi bi-chevron-left" style="-webkit-text-stroke: 1px currentColor;"></i></a></li> <!-- Populated dynamically -->
<li class="page-item active"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">4</a></li>
<li class="page-item"><a class="page-link" href="#">5</a></li>
<li class="page-item"><a class="page-link" href="#">6</a></li>
<li class="page-item arrow-item"><a class="page-link" href="#" aria-label="Next"><i class="bi bi-chevron-right" style="-webkit-text-stroke: 1px currentColor;"></i></a></li>
</ul> </ul>
</nav> </nav>
</main> </main>
...@@ -756,6 +257,194 @@ ...@@ -756,6 +257,194 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<!-- Custom JS --> <!-- Custom JS -->
<script src="main.js"></script> <script src="main.js"></script>
<script>
$(document).ready(function() {
let currentCategory = 'all';
let currentSearch = '';
let currentSort = 'latest';
let currentPage = 1;
// Load Categories dynamically
function loadCategories() {
$.ajax({
url: "{{ url('/api/categories') }}",
method: "GET",
success: function(res) {
if (res.success && res.data.length > 0) {
let html = `<button class="filter-category-btn ${currentCategory === 'all' ? 'active' : ''}" data-category="all">All Products</button>`;
res.data.forEach(c => {
html += `<button class="filter-category-btn ${currentCategory === c.slug ? 'active' : ''}" data-category="${c.slug}">${c.name} (${c.products_count || 0})</button>`;
});
$('#shop-category-list').html(html);
}
}
});
}
// Load Products dynamically
function loadProducts(page = 1) {
currentPage = page;
const url = `{{ url('/api/products') }}?page=${page}&category=${currentCategory}&search=${encodeURIComponent(currentSearch)}&sort=${currentSort}`;
$.ajax({
url: url,
method: "GET",
dataType: "json",
success: function(response) {
if (response.success) {
const paginator = response.data;
const products = paginator.data;
// Update count labels
$('.results-text').text(`Showing ${paginator.from || 0}–${paginator.to || 0} of ${paginator.total} results`);
$('.col-lg-9 h3.fw-bold').text(`${paginator.total} products`);
if (products.length === 0) {
$('#shop-product-grid').html('<div class="col-12 text-center py-5"><i class="bi bi-search fs-1 text-muted"></i><h4 class="mt-3">No products found</h4><p class="text-muted">Try adjusting your filters or search query.</p></div>');
$('#pagination-container').empty();
return;
}
let html = '';
products.forEach(p => {
let imgUrl = p.primary_image ? p.primary_image.image_url : 'https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=500&auto=format&fit=crop&q=80';
let strikePart = p.strike_price ? `<span class="product-price-strike text-muted small ms-2">₹${Math.round(p.strike_price)}</span>` : '';
let saveBadge = p.strike_price && p.strike_price > p.price ? `<span class="badge bg-primary ms-auto" style="font-size: 0.7rem;">SAVE ₹${Math.round(p.strike_price - p.price)}</span>` : '';
let discountTag = p.strike_price && p.strike_price > p.price ? `<div class="text-primary fw-bold small mb-2">${Math.round(((p.strike_price - p.price)/p.strike_price)*100)}% OFF</div>` : '';
let sizeButtons = '';
if (p.variants && p.variants.length > 0) {
p.variants.forEach((v, idx) => {
sizeButtons += `<button class="size-btn ${idx === 0 ? 'active' : ''}" data-price="${Math.round(v.price)}" data-size="${v.size}">${v.size}</button> `;
});
} else {
sizeButtons = `
<button class="size-btn active" data-price="${Math.round(p.price)}" data-size="Small">Small</button>
<button class="size-btn" data-price="${Math.round(p.price * 1.25)}" data-size="Medium">Medium</button>
<button class="size-btn" data-price="${Math.round(p.price * 1.50)}" data-size="Large">Large</button>
`;
}
html += `
<div class="col-lg-4 col-md-6 mb-4">
<div class="card product-card border rounded-3 overflow-hidden shadow-sm h-100" id="prod-card-${p.id}">
<div class="position-relative">
${p.is_bestseller ? '<span class="badge-bestseller">Best Seller</span>' : ''}
<button class="btn-wishlist"><i class="fa-regular fa-heart"></i></button>
<img src="${imgUrl}" class="card-img-top object-fit-cover" alt="${p.name}" height="220">
</div>
<div class="card-body d-flex flex-column p-3 product-card-body">
<h5 class="product-title fw-bold mb-1" style="font-size: 0.95rem; color: #000000; height: 38px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;">${p.name}</h5>
<div class="d-flex align-items-center mb-2">
<span class="product-price fw-bold text-dark fs-5 display-price">₹${Math.round(p.price)}</span>
${strikePart}
${saveBadge}
</div>
${discountTag}
<div class="product-rating small mb-2">
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-regular fa-star text-warning"></i>
<span class="text-muted ms-1">(24)</span>
</div>
<div class="size-select-group my-2">
<span class="text-muted small w-100 mb-1">Size / Variant</span>
${sizeButtons}
</div>
<button class="btn btn-custom-primary w-100 mt-auto rounded-pill text-white btn-add-to-cart-dynamic" data-id="${p.id}" data-name="${p.name}" data-price="${Math.round(p.price)}" data-img="${imgUrl}">Add to cart</button>
</div>
</div>
</div>
`;
});
$('#shop-product-grid').html(html);
// Render pagination links
renderPagination(paginator);
}
}
});
}
function renderPagination(paginator) {
if (paginator.last_page <= 1) {
$('#pagination-container').empty();
return;
}
let html = '';
// Previous button
if (paginator.current_page > 1) {
html += `<li class="page-item arrow-item"><a class="page-link" href="#" data-page="${paginator.current_page - 1}" aria-label="Previous"><i class="bi bi-chevron-left" style="-webkit-text-stroke: 1px currentColor;"></i></a></li>`;
} else {
html += `<li class="page-item arrow-item disabled"><a class="page-link" href="#" aria-label="Previous"><i class="bi bi-chevron-left" style="-webkit-text-stroke: 1px currentColor;"></i></a></li>`;
}
// Page numbers
for (let i = 1; i <= paginator.last_page; i++) {
html += `<li class="page-item ${paginator.current_page === i ? 'active' : ''}"><a class="page-link" href="#" data-page="${i}">${i}</a></li>`;
}
// Next button
if (paginator.current_page < paginator.last_page) {
html += `<li class="page-item arrow-item"><a class="page-link" href="#" data-page="${paginator.current_page + 1}" aria-label="Next"><i class="bi bi-chevron-right" style="-webkit-text-stroke: 1px currentColor;"></i></a></li>`;
} else {
html += `<li class="page-item arrow-item disabled"><a class="page-link" href="#" aria-label="Next"><i class="bi bi-chevron-right" style="-webkit-text-stroke: 1px currentColor;"></i></a></li>`;
}
$('#pagination-container').html(html);
}
// Category select trigger
$(document).on('click', '.filter-category-btn', function() {
$('.filter-category-btn').removeClass('active');
$(this).addClass('active');
currentCategory = $(this).attr('data-category');
loadProducts(1);
});
// Live Search query with keyup debounce
let searchTimeout;
$('#shop-search-input').on('input', function() {
clearTimeout(searchTimeout);
currentSearch = $(this).val().trim();
searchTimeout = setTimeout(() => {
loadProducts(1);
}, 300);
});
// Sorting change
$('#sort-select').on('change', function() {
currentSort = $(this).val();
loadProducts(1);
});
// Pagination item click
$(document).on('click', '#pagination-container .page-link', function(e) {
e.preventDefault();
let page = $(this).data('page');
if (page) {
loadProducts(page);
$('html, body').animate({ scrollTop: $('.shop-header-options-bar').offset().top - 100 }, 200);
}
});
// Size selection price update
$(document).on('click', '.size-btn', function() {
const newPrice = $(this).attr('data-price');
const card = $(this).closest('.product-card');
card.find('.display-price').text('₹' + newPrice);
card.find('.btn-add-to-cart-dynamic').attr('data-price', newPrice);
});
// Initial load
loadCategories();
loadProducts(1);
});
</script>
</body> </body>
</html> </html>
......
<?php <?php
use App\Http\Controllers\AdminController;
use App\Http\Controllers\CatalogController; use App\Http\Controllers\CatalogController;
use App\Http\Controllers\CheckoutController; use App\Http\Controllers\CheckoutController;
use App\Http\Controllers\CouponController; use App\Http\Controllers\CouponController;
...@@ -24,6 +23,13 @@ Route::get('/categories', [CatalogController::class, 'categories']); ...@@ -24,6 +23,13 @@ Route::get('/categories', [CatalogController::class, 'categories']);
Route::get('/products', [CatalogController::class, 'products']); Route::get('/products', [CatalogController::class, 'products']);
Route::get('/products/{slug}', [CatalogController::class, 'productDetails']); Route::get('/products/{slug}', [CatalogController::class, 'productDetails']);
// Customer Auth Endpoints
Route::post('/customer/register', [\App\Http\Controllers\CustomerAuthController::class, 'register']);
Route::post('/customer/login', [\App\Http\Controllers\CustomerAuthController::class, 'login']);
Route::post('/customer/logout', [\App\Http\Controllers\CustomerAuthController::class, 'logout']);
Route::get('/customer/status', [\App\Http\Controllers\CustomerAuthController::class, 'status']);
Route::get('/customer/orders', [\App\Http\Controllers\CustomerAuthController::class, 'orders']);
// Serviceability Pincode Endpoints // Serviceability Pincode Endpoints
Route::post('/check-pincode', [PincodeController::class, 'checkServiceability']); Route::post('/check-pincode', [PincodeController::class, 'checkServiceability']);
...@@ -37,15 +43,3 @@ Route::post('/validate-coupon', [CouponController::class, 'validateCoupon']); ...@@ -37,15 +43,3 @@ Route::post('/validate-coupon', [CouponController::class, 'validateCoupon']);
Route::get('/wishlist', [WishlistController::class, 'index']); Route::get('/wishlist', [WishlistController::class, 'index']);
Route::post('/wishlist', [WishlistController::class, 'store']); Route::post('/wishlist', [WishlistController::class, 'store']);
Route::delete('/wishlist/{productId}', [WishlistController::class, 'destroy']); Route::delete('/wishlist/{productId}', [WishlistController::class, 'destroy']);
// Admin Dashboard Endpoints
Route::prefix('admin')->group(function () {
Route::get('/metrics', [AdminController::class, 'metrics']);
Route::post('/products', [AdminController::class, 'storeProduct']);
Route::put('/products/{id}', [AdminController::class, 'updateProduct']);
Route::delete('/products/{id}', [AdminController::class, 'destroyProduct']);
Route::get('/orders', [AdminController::class, 'orders']);
Route::put('/orders/{id}/status', [AdminController::class, 'updateOrderStatus']);
});
<?php
use App\Http\Controllers\Backend\AdminViewController;
use App\Http\Controllers\Backend\AdminMasterDataController;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Backend Routes
|--------------------------------------------------------------------------
*/
Route::prefix('admin')->group(function () {
Route::get('/', [AdminViewController::class, 'dashboard']);
Route::get('/dashboard', [AdminViewController::class, 'dashboard']);
Route::get('/countries', [AdminViewController::class, 'countries']);
Route::get('/states', [AdminViewController::class, 'states']);
Route::get('/cities', [AdminViewController::class, 'cities']);
Route::get('/units', [AdminViewController::class, 'units']);
Route::get('/unitsizes', [AdminViewController::class, 'unitsizes']);
Route::get('/sizes', [AdminViewController::class, 'sizes']);
Route::get('/categories', [AdminViewController::class, 'categories']);
// Master Data Write Operations
Route::post('/master/{type}', [AdminMasterDataController::class, 'store']);
Route::put('/master/{type}/{id}', [AdminMasterDataController::class, 'update']);
Route::delete('/master/{type}/{id}', [AdminMasterDataController::class, 'destroy']);
Route::get('/products', [AdminViewController::class, 'products']);
Route::get('/productprices', [AdminViewController::class, 'productprices']);
Route::get('/orders', [AdminViewController::class, 'orders']);
Route::get('/orderstatuschange', [AdminViewController::class, 'orderstatuschange']);
Route::get('/announcements', [AdminViewController::class, 'announcements']);
Route::get('/gallery', [AdminViewController::class, 'gallery']);
Route::get('/pincodes', [AdminViewController::class, 'pincodes']);
Route::get('/coupons', [AdminViewController::class, 'coupons']);
Route::get('/wishlist', [AdminViewController::class, 'wishlist']);
});
<?php <?php
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
use App\Http\Controllers\FrontendController;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
...@@ -21,9 +22,7 @@ Route::get('/shop', function () { ...@@ -21,9 +22,7 @@ Route::get('/shop', function () {
return view('shop'); return view('shop');
}); });
Route::get('/product-detail', function () { Route::get('/product-detail/{slug}', [FrontendController::class, 'productDetail']);
return view('product-detail');
});
Route::get('/cart', function () { Route::get('/cart', function () {
return view('cart'); return view('cart');
...@@ -37,10 +36,10 @@ Route::get('/gallery', function () { ...@@ -37,10 +36,10 @@ Route::get('/gallery', function () {
return view('gallery'); return view('gallery');
}); });
Route::get('/catalog', function () { Route::get('/catalog', [FrontendController::class, 'ourCollection']);
return view('catalog');
});
Route::get('/admin', function () { Route::get('/dashboard', function () {
return view('admin'); return view('dashboard');
}); });
const fs = require('fs');
let c = fs.readFileSync('resources/views/catalog.blade.php', 'utf8');
const startStr = '<!-- Product Card 1 -->';
const endStr = '<!-- Pagination -->';
let startIndex = c.indexOf(startStr);
let endIndex = c.indexOf(endStr);
if (startIndex !== -1 && endIndex !== -1) {
let replacement = `@foreach($products as $product)
<div class="col-lg-4 col-md-6 mb-4">
<div class="product-card">
@if($product->is_bestseller)
<span class="badge-bestseller">Best Seller</span>
@endif
<button class="btn-wishlist"><i class="bi bi-heart"></i></button>
<a href="/product-detail/{{ $product->slug }}">
<img src="https://images.unsplash.com/photo-1544474655-9aed1e956bc2?w=500&auto=format&fit=crop&q=80" alt="{{ $product->name }}">
</a>
<div class="product-card-body">
<h5 class="product-title"><a href="/product-detail/{{ $product->slug }}" class="text-decoration-none text-dark">{{ $product->name }}</a></h5>
<div class="d-flex flex-column mt-auto pt-2 border-top">
<div class="d-flex align-items-center flex-wrap">
<span class="product-price">₹{{ number_format($product->price, 2) }}</span>
@if($product->strike_price)
<span class="product-price-strike ms-2">₹{{ number_format($product->strike_price, 2) }}</span>
@endif
</div>
<button class="btn btn-add-to-cart w-100 mt-3">Add to cart</button>
</div>
</div>
</div>
</div>
@endforeach\n`;
c = c.substring(0, startIndex) + replacement + c.substring(endIndex);
fs.writeFileSync('resources/views/catalog.blade.php', c);
console.log('Success');
} else {
console.log('Could not find bounds');
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment