Merge branch 'feature-product' into development

This commit is contained in:
Husnu Setiawan 2026-02-23 02:06:59 +07:00
commit b1c6d37a5d
49 changed files with 1098 additions and 1804 deletions

View File

@ -21,6 +21,7 @@ class AddressController extends Controller
return [
'id' => $address->id,
'label' => $address->label,
'name' => $address->name,
'location' => $address->location,
'address' => $address->address,
'is_primary' => $address->is_primary,
@ -29,6 +30,8 @@ class AddressController extends Controller
'district_id' => $address->district_id,
'subdistrict_id' => $address->subdistrict_id,
'postal_code' => $address->postal_code,
'latitude' => $address->latitude,
'longitude' => $address->longitude,
];
});
@ -82,25 +85,35 @@ class AddressController extends Controller
public function update(Request $request, $id)
{
$request->validate([
'label' => 'required|string|max:255',
'name' => 'required|string|max:255',
'phone' => 'required|string|max:255',
'province_id' => 'required|exists:provinces,id',
'city_id' => 'required|exists:cities,id',
'district_id' => 'required|exists:districts,id',
'subdistrict_id' => 'required|exists:subdistricts,id',
'postal_code' => 'required|string|max:10',
'address' => 'required|string|max:255',
'latitude' => 'required|numeric|between:-90,90',
'longitude' => 'required|numeric|between:-180,180',
'is_primary' => 'boolean'
]);
$address = auth()->user()->addresses()->findOrFail($id);
$address->update([
'label' => $request->label,
'name' => $request->name,
'phone' => $request->phone,
'province_id' => $request->province_id,
'city_id' => $request->city_id,
'district_id' => $request->district_id,
'subdistrict_id' => $request->subdistrict_id,
'postal_code' => $request->postal_code,
'address' => $request->address,
'is_primary' => $request->boolean('is_primary')
'latitude' => $request->latitude,
'longitude' => $request->longitude,
'is_primary' => $request->is_primary ?? $address->is_primary,
]);
// Update location names based on selected IDs
@ -133,12 +146,17 @@ class AddressController extends Controller
public function store(Request $request)
{
$request->validate([
'label' => 'required|string|max:255',
'name' => 'required|string|max:255',
'phone' => 'required|string|max:255',
'province_id' => 'required|exists:provinces,id',
'city_id' => 'required|exists:cities,id',
'district_id' => 'required|exists:districts,id',
'subdistrict_id' => 'required|exists:subdistricts,id',
'postal_code' => 'required|string|max:10',
'address' => 'required|string|max:255',
'postal_code' => 'required|string|max:10',
'latitude' => 'nullable|numeric|between:-90,90',
'longitude' => 'nullable|numeric|between:-180,180',
'is_primary' => 'boolean'
]);
@ -149,18 +167,18 @@ class AddressController extends Controller
$subdistrict = Subdistrict::find($request->subdistrict_id);
$address = auth()->user()->addresses()->create([
'label' => 'Address ' . (auth()->user()->addresses()->count() + 1),
'label' => $request->label,
'name' => $request->name,
'phone' => $request->phone,
'province_id' => $request->province_id,
'city_id' => $request->city_id,
'district_id' => $request->district_id,
'subdistrict_id' => $request->subdistrict_id,
'province_name' => $province?->name,
'regency_name' => $city?->name,
'district_name' => $district?->name,
'village_name' => $subdistrict?->name,
'postal_code' => $request->postal_code,
'address' => $request->address,
'is_primary' => $request->boolean('is_primary')
'postal_code' => $request->postal_code,
'latitude' => $request->latitude,
'longitude' => $request->longitude,
'is_primary' => $request->is_primary ?? false,
]);
// If set as primary, unset other primary addresses

View File

@ -62,6 +62,7 @@ class LoginWaController extends Controller
return response()->json([
'success' => true,
'message' => __('otp.sent'),
'redirect' => route('login-phone.otp.view', ['identity' => $identity]),
]);
} catch (\Exception $e) {
@ -78,6 +79,7 @@ class LoginWaController extends Controller
{
return view('account.otp', [
'identity' => $identity,
'type' => 'phone',
]);
}

View File

@ -46,7 +46,7 @@ class ProfileController extends Controller
if ($request->hasFile('photo')) {
$ext = $request->file('photo')->extension();
$filename = $request->file('photo')->storeAs("profile", $user->id.".".$ext, "public");
$user->photo = $filename;
$user->photo = asset('storage/' . $filename);
}
$user->save();

View File

@ -0,0 +1,13 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ContactController extends Controller
{
public function index(Request $request)
{
return view('contact.v1');
}
}

View File

@ -205,6 +205,31 @@ class ProductController extends Controller
]);
}
public function brandsWithImages(Request $request)
{
$brandRepository = new \App\Repositories\Catalog\BrandRepository;
$brands = $brandRepository->getList([]);
// Render brand links HTML with images as swiper slides
$brandHtml = '';
$currentBrandId = $request->input('current_brand');
foreach ($brands as $brand) {
$isActive = $currentBrandId == $brand->id;
// Only show brands that have images
if ($brand->image_url) {
$brandHtml .= '<a class="swiper-slide text-body" href="#!" aria-label="'.$brand->name.'" role="group" style="width: 170.2px; margin-right: 20px;">';
$brandHtml .= '<img src="'.$brand->image_url.'" alt="'.$brand->name.'" class="me-2" width="100" height="100">';
$brandHtml .= '</a>';
}
}
return response()->json([
'success' => true,
'brands' => $brandHtml,
]);
}
public function announcements(Request $request)
{
// Static announcements for now - can be moved to database later
@ -388,6 +413,70 @@ class ProductController extends Controller
]);
}
public function populersJson(Request $request)
{
$type = $request->input('type', 'new');
$limit = 6;
$user = auth()->user();
$userId = $user ? $user->id : 0;
[$location_id, $is_consignment] = Cache::remember('employee_user_'.$userId, 60 * 60 * 24, function () use ($user) {
if ($user == null) {
return [10, false];
}
$employee = @$user->employee;
$location_id = @$employee->location_id;
$location = @$employee->location;
$is_consignment = (bool) @$location->is_consignment;
return [$location_id, $is_consignment];
});
$productRepository = new ProductRepository;
// Set parameters based on type
$params = [
'limit' => $limit,
'location_id' => $location_id,
'is_consignment' => $is_consignment,
];
switch ($type) {
case 'new':
$params['sort'] = 'new';
break;
case 'best_sellers':
$params['sort'] = 'best_sellers';
break;
case 'special-offer':
$params['event'] = 'special-offer';
break;
case 'top_rated':
$params['sort'] = 'random';
break;
default:
$params['sort'] = 'new';
break;
}
$params['limit'] = 10;
$products = $productRepository->getList($params);
$p = $products->map(function($row){
$row->image_url = $row->image_url;
return $row;
});
return response()->json([
'data' =>$p,
]);
}
public function detail($slug, Request $request, ProductRepository $productRepository)
{

View File

@ -0,0 +1,63 @@
<?php
namespace App\Http\Controllers;
use App\Repositories\Member\VoucherEvent\VoucherEventRepository;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log;
class VoucherEventController extends Controller
{
protected $voucherEventRepository;
public function __construct(VoucherEventRepository $voucherEventRepository)
{
$this->voucherEventRepository = $voucherEventRepository;
}
/**
* Redeem a voucher event
*
* @param int $voucherEvent
* @param Request $request
* @return JsonResponse
*/
public function redeem($voucherEvent, Request $request): JsonResponse
{
try {
// Get the authenticated user
$user = auth()->user();
if (!$user) {
return response()->json([
'success' => false,
'message' => 'User not authenticated'
], 401);
}
// Call the repository's redeem method
$result = $this->voucherEventRepository->redeem($voucherEvent, $user);
if ($result['success']) {
return response()->json([
'success' => true,
'message' => $result['message'] ?? 'Voucher redeemed successfully!',
'data' => $result['data'] ?? null
]);
} else {
return response()->json([
'success' => false,
'message' => $result['message'] ?? 'Failed to redeem voucher'
], 400);
}
} catch (\Exception $e) {
Log::error($e);
return response()->json([
'success' => false,
'message' => $e->getMessage()
], 500);
}
}
}

View File

@ -57,6 +57,7 @@ class User extends Authenticatable
return $this->hasOne(Customer::class);
}
public function addresses()
{
return $this->hasMany(Address::class);
@ -64,6 +65,6 @@ class User extends Authenticatable
public function getPhotoUrlAttribute()
{
return $this->photo ? env('WMS_ASSET_URL') . '/' . $this->photo : asset('img/photo-placeholder.png');
return $this->photo ? (str_contains($this->photo, 'http') ? $this->photo : env('WMS_ASSET_URL') . '/' . $this->photo) : asset('img/photo-placeholder.png');
}
}

View File

@ -27,7 +27,9 @@ class BrandRepository
return Brand::whereIn('name', $ids)->orderBy('priority', 'desc')
->where('priority', '>', 0)
->orderBy('name', 'asc')->get();
->orderBy('name', 'asc')
->get();
}
return Brand::orderBy('priority', 'desc')->orderBy('name', 'asc')

View File

@ -451,4 +451,5 @@ class MemberAuthRepository
return $user;
}
}

View File

@ -19,7 +19,7 @@ class VoucherRepository
$model = Voucher::where('customer_id', (int) @$customer->id)
->where('used_at', null)
->where('expired_at','>=',Carbon::now())
->orderBy('created_at','desc')->paginate($request->limit);
->orderBy('created_at','desc')->paginate($request->limit ?? 100);
return $model;
}

View File

@ -15,7 +15,7 @@ class VoucherEventRepository
{
public function getList($request)
{
$model = VoucherEvent::where('redeem_point', '>', 0)->orderBy('created_at','desc')->paginate($request->limit);
$model = VoucherEvent::where('redeem_point', '>', 0)->orderBy('created_at','desc')->paginate($request->limit ?? 100);
return $model;
}
@ -114,7 +114,12 @@ class VoucherEventRepository
$nominal = $voucher->nominal;
}
$customer = Customer::where('user_id', auth()->user()->id)->firstOrFail();
$customer = auth()->user()->customer ?? null;
if ($customer == null) {
throw ValidationException::withMessages([
"customer" => "Lengkapi profil terlebih dahulu"
]);
}
$point = DB::select("SELECT SUM(point) as point FROM customer_points WHERE customer_id = ? ", [$customer->id]);
$point = (float) @$point[0]->point;
@ -141,7 +146,7 @@ class VoucherEventRepository
'user_id' => auth()->user()->id
]);
$customer = Customer::where('user_id', auth()->user()->id)->firstOrFail();
$customer = auth()->user()->customer;
$this->redeemPoint($customer->id, $voucher->redeem_point, "Redeem point for ".$model->description, $model);

View File

@ -0,0 +1,39 @@
<?php
namespace App\View\Components\Checkout;
use App\Repositories\Member\VoucherEvent\VoucherEventRepository;
use App\Repositories\Member\Voucher\VoucherRepository;
use Illuminate\View\Component;
use Illuminate\View\View;
class PromoCode extends Component
{
public $voucher_events;
public $vouchers;
/**
* Create the component instance.
*
* @param VoucherEventRepository $voucherEventRepository
* @return void
*/
public function __construct(VoucherRepository $voucherRepository, VoucherEventRepository $voucherEventRepository)
{
$this->voucher_events = $voucherEventRepository->getList([]);
$this->vouchers = $voucherRepository->getList([]);
}
/**
* Get the view / contents that represent the component.
*
* @return View|string
*/
public function render()
{
return view('components.checkout.promo-code', [
'voucher_events' => $this->voucher_events,
'vouchers' => $this->vouchers
]);
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\View\Components;
use App\Repositories\Catalog\BrandRepository;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class FooterBrands extends Component
{
public $brands;
/**
* Create a new component instance.
*/
public function __construct(BrandRepository $brandRepository)
{
$this->brands = $brandRepository->getList([]);
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.footer-brands', ['brands' => $this->brands]);
}
}

View File

@ -4,6 +4,8 @@ namespace App\View\Components\Layout;
use App\Repositories\Catalog\CategoryRepository;
use App\Repositories\Catalog\GenderRepository;
use App\Repositories\Catalog\BrandRepository;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
@ -13,6 +15,7 @@ class NavbarCategory extends Component
public $genders = [];
public $categories = [];
public $brands = [];
/**
* Create a new component instance.
*/
@ -22,13 +25,18 @@ class NavbarCategory extends Component
$genderRepository = new GenderRepository();
$categoryRepository = new CategoryRepository();
$brandsRepository = new BrandRepository();
$this->genders = $genderRepository->getList([]);
$this->genders = collect($this->genders)->chunk(7);
$this->categories = $categoryRepository->getList([]);
// chunk
$this->categories = collect($this->categories)->chunk(7);
$this->brands = $brandsRepository->getList([]);
$this->brands = collect($this->brands)->chunk(7);
}
/**

View File

@ -17,6 +17,14 @@ return [
'select_village' => 'Select subdistrict...',
'zip_code' => 'ZIP code',
'address' => 'Address',
'label' => 'Label',
'name' => 'Name',
'phone' => 'Phone',
'please_enter_phone' => 'Please enter your phone number!',
'latitude' => 'Latitude',
'longitude' => 'Longitude',
'please_enter_latitude' => 'Please enter your latitude!',
'please_enter_longitude' => 'Please enter your longitude!',
'set_as_primary_address' => 'Set as primary address',
'save_changes' => 'Save changes',
'close' => 'Close',
@ -29,6 +37,8 @@ return [
'please_select_village' => 'Please select your village!',
'please_enter_zip_code' => 'Please enter your ZIP code!',
'please_enter_address' => 'Please enter your address!',
'please_enter_label' => 'Please enter your label!',
'please_enter_name' => 'Please enter your name!',
'saving' => 'Saving',
'error_saving_address' => 'Error saving address',
'address_updated_successfully' => 'Address updated successfully',

View File

@ -45,4 +45,15 @@ return [
'pickup' => 'Pickup',
'pickup_ready' => 'Your order will be ready for pickup at the selected store',
'continue_to_payment' => 'Continue to Payment',
'apply_promo_code' => 'Apply promo code',
'enter_promo_code' => 'Enter promo code',
'enter_valid_promo_code' => 'Enter a valid promo code!',
'apply' => 'Apply',
'available_vouchers' => 'Available Vouchers',
'available_voucher_events' => 'Available Voucher Events',
'points_required' => 'Points Required',
'valid_period' => 'Valid Period',
'terms_and_conditions' => 'Terms and Conditions',
'close' => 'Close',
'redeem' => 'Redeem',
];

64
lang/en/contact.php Normal file
View File

@ -0,0 +1,64 @@
<?php
return [
'title' => 'Contact us',
'subtitle' => 'Feel free to contact us and we will be happy to help you!',
// Contact details section
'location_title' => 'Location',
'location_address' => 'Jalan Pintu Air Raya No.11 B,D,E,F,G RT.8/RW.1, Ps. Baru, Kecamatan Sawah Besar, Kota Jakarta Pusat, Daerah Khusus Ibukota Jakarta 10710',
'location_link' => 'Get directions',
'phone_title' => 'Phone',
'phone_number' => '(021) 3500703',
'phone_whatsapp' => '0818-4343-01',
'email_title' => 'Email',
'email_address' => 'sales@asiagolf.id',
// Contact form
'form_title' => 'Send us a message',
'form_subtitle' => 'We usually respond within 24 hours',
'name_label' => 'Name',
'name_placeholder' => 'Your name',
'email_label' => 'Email',
'email_placeholder' => 'your.email@example.com',
'subject_label' => 'Subject',
'subject_placeholder' => 'What is this about?',
'message_label' => 'Message',
'message_placeholder' => 'Tell us more about your inquiry...',
'submit_button' => 'Send message',
// Social media
'social_title' => 'Follow us',
'social_instagram' => 'Instagram',
'social_facebook' => 'Facebook',
'social_twitter' => 'Twitter',
// Success messages
'success_title' => 'Thank you for your message!',
'success_message' => 'We have received your message and will get back to you soon.',
// Error messages
'error_title' => 'Something went wrong',
'error_message' => 'Please try again later or contact us directly.',
// Working hours
'working_hours_title' => 'Working hours',
'working_hours_mon_fri' => 'Mon - Fri 8:00 - 18:00',
'working_hours_sat_sun' => 'Sat - Sun 10:00 - 16:00',
// Support section
'support_title' => 'Looking for support?',
'support_message' => 'We might already have what you\'re looking for. See our FAQs or head to our dedicated Help Center.',
'help_center_button' => 'Help center',
// FAQ
'faq_delivery_question' => 'How long will delivery take?',
'faq_delivery_answer' => 'Delivery times vary based on your location and chosen shipping method. Generally, our standard delivery takes up to 5 days, while our Express Delivery ensures your order reaches you within 1 day. Please note that these times may be subject to occasional variations due to unforeseen circumstances, but we do our best to meet these estimates.',
];

View File

@ -17,7 +17,15 @@ return [
'select_village' => 'Pilih kelurahan/desa...',
'zip_code' => 'Kode Pos',
'address' => 'Alamat',
'set_as_primary_address' => 'Jadikan alamat utama',
'label' => 'Label',
'name' => 'Nama',
'phone' => 'Telepon',
'please_enter_phone' => 'Silakan masukkan nomor telepon Anda!',
'latitude' => 'Lintang',
'longitude' => 'Bujur',
'please_enter_latitude' => 'Silakan masukkan lintang Anda!',
'please_enter_longitude' => 'Silakan masukkan bujur Anda!',
'set_as_primary_address' => 'Jadikan sebagai alamat utama',
'save_changes' => 'Simpan perubahan',
'close' => 'Tutup',
'alternative_shipping_address' => 'Alamat Pengiriman Alternatif',
@ -29,6 +37,8 @@ return [
'please_select_village' => 'Silakan pilih kelurahan/desa Anda!',
'please_enter_zip_code' => 'Silakan masukkan kode pos Anda!',
'please_enter_address' => 'Silakan masukkan alamat Anda!',
'please_enter_label' => 'Silakan masukkan label Anda!',
'please_enter_name' => 'Silakan masukkan nama Anda!',
'saving' => 'Menyimpan',
'error_saving_address' => 'Terjadi kesalahan saat menyimpan alamat',
'address_updated_successfully' => 'Alamat berhasil diperbarui',

View File

@ -45,4 +45,15 @@ return [
'pickup' => 'Ambil di Toko',
'pickup_ready' => 'Pesanan Anda akan siap diambil di toko yang dipilih',
'continue_to_payment' => 'Lanjut ke Pembayaran',
'apply_promo_code' => 'Gunakan kode promo',
'enter_promo_code' => 'Masukkan kode promo',
'enter_valid_promo_code' => 'Masukkan kode promo yang valid!',
'apply' => 'Gunakan',
'available_vouchers' => 'Voucher Tersedia',
'available_voucher_events' => 'Event Voucher Tersedia',
'points_required' => 'Poin Diperlukan',
'valid_period' => 'Periode Berlaku',
'terms_and_conditions' => 'Syarat dan Ketentuan',
'close' => 'Tutup',
'redeem' => 'Tukar',
];

64
lang/id/contact.php Normal file
View File

@ -0,0 +1,64 @@
<?php
return [
'title' => 'Hubungi Kami',
'subtitle' => 'Jangan ragu untuk menghubungi kami dan kami akan dengan senang hati membantu Anda!',
// Contact details section
'location_title' => 'Lokasi',
'location_address' => 'Jalan Pintu Air Raya No.11 B,D,E,F,G RT.8/RW.1, Ps. Baru, Kecamatan Sawah Besar, Kota Jakarta Pusat, Daerah Khusus Ibukota Jakarta 10710',
'location_link' => 'Petunjuk arah',
'phone_title' => 'Telepon',
'phone_number' => '(021) 3500703',
'phone_whatsapp' => '0818-4343-01',
'email_title' => 'Email',
'email_address' => 'sales@asiagolf.id',
// Contact form
'form_title' => 'Kirim pesan',
'form_subtitle' => 'Kami biasanya merespons dalam 24 jam',
'name_label' => 'Nama',
'name_placeholder' => 'Nama Anda',
'email_label' => 'Email',
'email_placeholder' => 'email.anda@example.com',
'subject_label' => 'Subjek',
'subject_placeholder' => 'Tentang apa ini?',
'message_label' => 'Pesan',
'message_placeholder' => 'Ceritakan lebih lanjut tentang pertanyaan Anda...',
'submit_button' => 'Kirim pesan',
// Social media
'social_title' => 'Ikuti kami',
'social_instagram' => 'Instagram',
'social_facebook' => 'Facebook',
'social_twitter' => 'Twitter',
// Success messages
'success_title' => 'Terima kasih atas pesan Anda!',
'success_message' => 'Kami telah menerima pesan Anda dan akan segera menghubungi Anda kembali.',
// Error messages
'error_title' => 'Terjadi kesalahan',
'error_message' => 'Silakan coba lagi nanti atau hubungi kami langsung.',
// Working hours
'working_hours_title' => 'Jam operasional',
'working_hours_mon_fri' => 'Sen - Jum 08:00 - 18:00',
'working_hours_sat_sun' => 'Sab - Min 10:00 - 16:00',
// Support section
'support_title' => 'Mencari bantuan?',
'support_message' => 'Kami mungkin sudah memiliki apa yang Anda cari. Lihat FAQ kami atau kunjungi ke Pusat Bantuan kami.',
'help_center_button' => 'Pusat bantuan',
// FAQ
'faq_delivery_question' => 'Berapa lama pengiriman akan berlangsung?',
'faq_delivery_answer' => 'Waktu pengiriman bervariasi tergantung pada lokasi Anda dan metode pengiriman yang dipilih. Umumnya, pengiriman standar kami memakan waktu hingga 5 hari, sementara Pengiriman Ekspres memastikan pesanan Anda sampai dalam 1 hari. Harap dicatat bahwa waktu ini dapat berubah karena keadaan yang tidak terduga, tetapi kami melakukan yang terbaik untuk memenuhi perkiraan ini.',
];

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -6,9 +6,18 @@
export default (() => {
const htmlElement = document.documentElement
// Check the 'data-pwa' attribute of the HTML element
// Check if Bootstrap is loaded
const checkBootstrapLoaded = () => {
if (typeof bootstrap === 'undefined') {
console.error('Bootstrap is not loaded');
return false;
}
return true;
};
// Check 'data-pwa' attribute of HTML element
if (htmlElement.getAttribute('data-pwa') !== 'true') {
// Unregister the service worker if it's registered and 'data-pwa' is not 'true'
// Unregister service worker if it's registered and 'data-pwa' is not 'true'
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then((registrations) => {
for (let registration of registrations) {
@ -19,6 +28,11 @@ export default (() => {
return // Stop further execution to prevent PWA setup when not specified
}
// Check Bootstrap before proceeding with any Bootstrap-dependent code
if (!checkBootstrapLoaded()) {
return;
}
// Settings
const SETTINGS = {
appName: 'AsiaGolf',
@ -171,9 +185,16 @@ export default (() => {
// Get prompt instance
const promptElement = document.getElementById(promptId)
// Check if Bootstrap is loaded before using it
if (!checkBootstrapLoaded()) {
console.error('Cannot create PWA prompt: Bootstrap is not loaded');
return;
}
/* eslint-disable no-undef */
const promptInstance = new bootstrap.Modal(promptElement, {
backdrop: 'static', // Optional: makes prompt not close when clicking outside
backdrop: false, // Disable backdrop to prevent layering issues
keyboard: false, // Optional: makes prompt not close when pressing escape key
})
/* eslint-enable no-undef */

View File

@ -6,6 +6,8 @@
* @author Coderthemes
* @version 1.0.0
*/
import 'bootstrap'
import 'img-comparison-slider'
import 'simplebar'

View File

@ -101,6 +101,32 @@
<div class="alert alert-danger d-none new-address-form-message" role="alert"></div>
<div class="alert alert-success d-none new-address-form-success" role="alert"></div>
<div class="col-sm-6">
<div class="position-relative">
<label class="form-label">{{ __('addresses.label') }}</label>
<input type="text" class="form-control new-label" id="new-label" required>
<div class="invalid-feedback">{{ __('addresses.please_enter_label') }}</div>
</div>
</div>
<div class="col-sm-6">
<div class="position-relative">
<label class="form-label">{{ __('addresses.name') }}</label>
<input type="text" class="form-control new-name" id="new-name" required>
<div class="invalid-feedback">{{ __('addresses.please_enter_name') }}</div>
</div>
</div>
<div class="col-sm-6">
<div class="position-relative">
<label class="form-label">{{ __('addresses.phone') }}</label>
<input type="tel" class="form-control new-phone" required>
<div class="invalid-feedback">{{ __('addresses.please_enter_phone') }}</div>
</div>
</div>
<div class="col-sm-6">
<div class="position-relative">
<label class="form-label">{{ __('addresses.province') }}</label>
@ -140,17 +166,33 @@
<div class="invalid-feedback">{{ __('addresses.please_select_village') }}</div>
</div>
</div>
<div class="col-sm-4">
<div class="col-sm-6">
<div class="position-relative">
<label for="new-zip" class="form-label">{{ __('addresses.zip_code') }}</label>
<input type="text" class="form-control" id="new-zip" required>
<label class="form-label">{{ __('addresses.zip_code') }}</label>
<input type="text" class="form-control new-zip" required>
<div class="invalid-feedback">{{ __('addresses.please_enter_zip_code') }}</div>
</div>
</div>
<div class="col-sm-6">
<div class="position-relative">
<label class="form-label">{{ __('addresses.latitude') }}</label>
<input type="text" class="form-control new-latitude" step="0.000001" required>
<div class="invalid-feedback">{{ __('addresses.please_enter_latitude') }}</div>
</div>
</div>
<div class="col-sm-6">
<div class="position-relative">
<label class="form-label">{{ __('addresses.longitude') }}</label>
<input type="text" class="form-control new-longitude" step="0.000001" required>
<div class="invalid-feedback">{{ __('addresses.please_enter_longitude') }}</div>
</div>
</div>
<div class="col-sm-8">
<div class="position-relative">
<label for="new-address" class="form-label">{{ __('addresses.address') }}</label>
<input type="text" class="form-control" id="new-address" required>
<textarea class="form-control" id="new-address" rows="3" required></textarea>
<div class="invalid-feedback">{{ __('addresses.please_enter_address') }}</div>
</div>
</div>
@ -315,6 +357,7 @@
<ul class="list-unstyled fs-sm m-0">
<li>${address.location}</li>
<li>${address.address}</li>
</ul>
</div>
<div class="collapse primary-address-${address.id}" id="primaryAddressEdit${address.id}">
@ -325,6 +368,32 @@
<input type="hidden" name="_method" value="PUT">
<input type="hidden" name="_token" value="${document.querySelector('meta[name="csrf-token"]')?.getAttribute('content') || ''}">
<div class="col-sm-6">
<div class="position-relative">
<label class="form-label">{{ __('addresses.label') }}</label>
<input type="text" class="form-control edit-label" value="${address.label}" required>
<div class="invalid-feedback">{{ __('addresses.please_enter_address') }}</div>
</div>
</div>
<div class="col-sm-6">
<div class="position-relative">
<label class="form-label">{{ __('addresses.name') }}</label>
<input type="text" class="form-control edit-name" value="${address.name ?? ''}" required>
<div class="invalid-feedback">{{ __('addresses.please_enter_name') }}</div>
</div>
</div>
<div class="col-sm-6">
<div class="position-relative">
<label class="form-label">{{ __('addresses.phone') }}</label>
<input type="tel" class="form-control edit-phone" value="${address.phone ?? ''}" required>
<div class="invalid-feedback">{{ __('addresses.please_enter_phone') }}</div>
</div>
</div>
<div class="col-sm-6">
<div class="position-relative">
<label class="form-label">{{ __('addresses.province') }}</label>
@ -370,25 +439,41 @@
</div>
</div>
<div class="col-sm-4">
<div class="col-sm-6">
<div class="position-relative">
<label class="form-label">{{ __('addresses.zip_code') }}</label>
<input type="text" class="form-control postal_code" value="${address.postal_code}" required>
<div class="invalid-feedback">{{ __('addresses.please_enter_zip_code') }}</div>
</div>
</div>
<div class="col-sm-6">
<div class="position-relative">
<label class="form-label">{{ __('addresses.latitude') }}</label>
<input type="text" class="form-control latitude" value="${address.latitude ?? ''}" step="0.000001" required>
<div class="invalid-feedback">{{ __('addresses.please_enter_latitude') }}</div>
</div>
</div>
<div class="col-sm-6">
<div class="position-relative">
<label class="form-label">{{ __('addresses.longitude') }}</label>
<input type="text" class="form-control longitude" value="${address.longitude ?? ''}" step="0.000001" required>
<div class="invalid-feedback">{{ __('addresses.please_enter_longitude') }}</div>
</div>
</div>
<div class="col-sm-8">
<div class="position-relative">
<label class="form-label">{{ __('addresses.address') }}</label>
<input type="text" class="form-control zip_code" value="${address.address}" required>
<input type="text" class="form-control address-input" value="${address.address}" required>
<div class="invalid-feedback">{{ __('addresses.please_enter_address') }}</div>
</div>
</div>
<div class="col-12">
<div class="form-check mb-0">
<input type="checkbox" class="form-check-input" ${address.is_primary ? 'checked' : ''}>
<input type="checkbox" class="form-check-input " id="set-primary-${address.id}" ${address.is_primary ? 'checked' : ''}>
<label class="form-check-label">{{ __('addresses.set_as_primary_address') }}</label>
</div>
</div>
@ -942,6 +1027,22 @@
// Get CSRF token
const tokenInput = form.querySelector('input[name="_token"]');
if (tokenInput) submitData._token = tokenInput.value;
// Get Name
const nameInput = isNewAddress ?
form.querySelector('#new-name') : form.querySelector('.edit-name');
if (nameInput) submitData.name = nameInput.value;
// Get Phone
const phoneInput = isNewAddress ?
form.querySelector('.new-phone') : form.querySelector('.edit-phone');
if (phoneInput) submitData.phone = phoneInput.value;
// Get Label
const labelInput = isNewAddress ?
form.querySelector('#new-label') : form.querySelector('.edit-label');
if (labelInput) submitData.label = labelInput.value;
// Get province ID
const provinceSelect = isNewAddress ?
@ -968,9 +1069,19 @@
form.querySelector('#new-zip') : form.querySelector('.postal_code');
if (zipInput) submitData.postal_code = zipInput.value;
// Get address
// Get latitude
const latitudeInput = isNewAddress ?
form.querySelector('.new-latitude') : form.querySelector('.latitude');
if (latitudeInput) submitData.latitude = latitudeInput.value;
// Get longitude
const longitudeInput = isNewAddress ?
form.querySelector('.new-longitude') : form.querySelector('.longitude');
if (longitudeInput) submitData.longitude = longitudeInput.value;
// Get address
const addressInput = isNewAddress ?
form.querySelector('#new-address') : form.querySelector('.zip_code');
form.querySelector('#new-address') : form.querySelector('.address-input');
if (addressInput) submitData.address = addressInput.value;
// Get primary checkbox

View File

@ -38,8 +38,9 @@
<div class="position-relative">
<div class="avatar avatar-lg" style="aspect-ratio: 1/1; overflow: hidden; max-width: 300px; width: 100%; height: auto;">
@if(auth()->user()->photo)
<img src="{{ asset('storage/' . auth()->user()->photo) }}" alt="{{ auth()->user()->name }}" class="avatar-img rounded-circle" style="width: 100%; height: 100%; object-fit: cover;" onerror="this.src='{{ asset('img/photo-placeholder.png') }}'">
<img src="{{ auth()->user()->photo_url }}" alt="{{ auth()->user()->name }}" class="avatar-img rounded-circle" style="width: 100%; height: 100%; object-fit: cover;" onerror="this.src='{{ asset('img/photo-placeholder.png') }}'">
@else
<img src="{{ asset('img/photo-placeholder.png') }}" alt="{{ auth()->user()->name }}" class="avatar-img rounded-circle" style="width: 100%; height: 100%; object-fit: cover;">
@endif

View File

@ -37,7 +37,7 @@
<div class="position-relative mb-4">
<label for="otp" class="form-label">{{ __('otp.enter_code') }}</label>
<input class="form-control form-control-lg" type="text" placeholder="000000" maxlength="6"
<input class="form-control form-control-lg" type="text" placeholder="{{ __('otp.enter_code') }}" maxlength="6"
pattern="[0-9]{6}" required="" name="otp" id="otp" autocomplete="one-time-code" />
<div class="invalid-tooltip bg-transparent py-0">{{ __('otp.invalid_code') }}</div>
</div>

View File

@ -47,8 +47,7 @@
<tr>
<th scope="col" class="fs-sm fw-normal py-3 ps-0"><span
class="text-body">Product</span></th>
<th scope="col" class="text-body fs-sm fw-normal py-3 d-none d-xl-table-cell"><span
class="text-body">Price</span></th>
<th scope="col" class="text-body fs-sm fw-normal py-3 d-none d-md-table-cell"><span
class="text-body">Quantity</span></th>
<th scope="col" class="text-body fs-sm fw-normal py-3 d-none d-md-table-cell"><span
@ -86,8 +85,10 @@
<a class="flex-shrink-0"
href="{{ route('product.detail', $cart->itemVariant->item->slug) }}">
<img src="{{ $cart->itemReference->item->image_url ?? '' }}"
width="110" alt="{{ $cart->name ?? 'Product' }}">
width="80" alt="{{ $cart->name ?? 'Product' }}">
</a>
<div class="w-100 min-w-0 ps-2 ps-xl-3">
<h5 class="d-flex animate-underline mb-2">
<a class="d-block fs-sm fw-medium text-truncate animate-target"
@ -103,6 +104,11 @@
<span class="text-dark-emphasis fw-medium">${{ number_format($cart->itemReference->display_price ?? 0, 2) }}</span>
</li>
</ul> --}}
<input type="hidden" id="price_{{ $cart->id }}"
value="{{ $cart->itemVariant->display_price ?? 0 }}">
Rp {{ number_format($cart->itemVariant->display_price ?? 0, 0, ',', '.') }}
<div class="count-input rounded-2 d-md-none mt-3">
<button type="button" class="btn btn-sm btn-icon"
data-decrement aria-label="Decrement quantity">
@ -118,11 +124,7 @@
</div>
</div>
</td>
<td class="h6 py-3 d-none d-xl-table-cell">
<input type="hidden" id="price_{{ $cart->id }}"
value="{{ $cart->itemVariant->display_price ?? 0 }}">
Rp {{ number_format($cart->itemVariant->display_price ?? 0, 0, ',', '.') }}
</td>
<td class="py-3 d-none d-md-table-cell">
<div class="count-input">
<button type="button" class="btn btn-icon" data-decrement
@ -215,34 +217,7 @@
</div>
</div>
</div>
<div class="accordion bg-body-tertiary rounded-5 p-4">
<div class="accordion-item border-0">
<h3 class="accordion-header" id="promoCodeHeading">
<button type="button"
class="accordion-button animate-underline collapsed py-0 ps-sm-2 ps-lg-0 ps-xl-2"
data-bs-toggle="collapse" data-bs-target="#promoCode" aria-expanded="false"
aria-controls="promoCode">
<i class="ci-percent fs-xl me-2"></i>
<span class="animate-target me-2">Apply promo code</span>
</button>
</h3>
<div class="accordion-collapse collapse" id="promoCode"
aria-labelledby="promoCodeHeading">
<div class="accordion-body pt-3 pb-2 ps-sm-2 px-lg-0 px-xl-2">
<form class="needs-validation d-flex gap-2" novalidate>
<div class="position-relative w-100">
<input type="text" class="form-control"
placeholder="Enter promo code" required>
<div class="invalid-tooltip bg-transparent py-0">Enter a valid promo
code!
</div>
</div>
<button type="submit" class="btn btn-dark">Apply</button>
</form>
</div>
</div>
</div>
</div>
<x-checkout.promo-code />
</div>
</aside>
@endif
@ -251,7 +226,7 @@
<!-- Trending products (Carousel) -->
<section class="container pb-4 pb-md-5 mb-2 mb-sm-0 mb-lg-2 mb-xl-4">
{{-- <section class="container pb-4 pb-md-5 mb-2 mb-sm-0 mb-lg-2 mb-xl-4">
<h2 class="h3 border-bottom pb-4 mb-0">Trending products</h2>
<!-- Product carousel -->
@ -681,11 +656,11 @@
</button>
</div>
</div>
</section>
</section> --}}
<!-- Subscription form + Vlog -->
<section class="bg-body-tertiary py-5">
{{-- <section class="bg-body-tertiary py-5">
<div class="container pt-sm-2 pt-md-3 pt-lg-4 pt-xl-5">
<div class="row">
<div class="col-md-6 col-lg-5 mb-5 mb-md-0">
@ -753,7 +728,7 @@
</div>
</div>
</div>
</section>
</section> --}}
</main>
<!-- Clear Cart Confirmation Modal -->
@ -804,7 +779,7 @@
</div>
</div>
@include('layouts.partials/footer')
@include('layouts.partials/footer2')
@endsection
@section('scripts')

View File

@ -0,0 +1,264 @@
<div class="accordion bg-body-tertiary rounded-5 p-4">
<div class="accordion-item border-0">
<h3 class="accordion-header" id="promoCodeHeading">
<button type="button"
class="accordion-button animate-underline collapsed py-0 ps-sm-2 ps-lg-0 ps-xl-2"
data-bs-toggle="collapse"
data-bs-target="#promoCode"
aria-expanded="false"
aria-controls="promoCode">
<i class="ci-percent fs-xl me-2"></i>
<span class="animate-target me-2">
{{ __('checkout.apply_promo_code') }}
</span>
</button>
</h3>
<div class="accordion-collapse collapse"
id="promoCode"
aria-labelledby="promoCodeHeading">
<div class="accordion-body pt-3 pb-2 ps-sm-2 px-lg-0 px-xl-2">
{{-- Promo Code Form --}}
<form class="needs-validation d-flex gap-2" novalidate>
<div class="position-relative w-100">
<input type="text"
class="form-control"
placeholder="{{ __('checkout.enter_promo_code') }}"
required>
<div class="invalid-tooltip bg-transparent py-0">
{{ __('checkout.enter_valid_promo_code') }}
</div>
</div>
<button type="submit" class="btn btn-dark">
{{ __('checkout.apply') }}
</button>
</form>
{{-- List Voucher --}}
@if($vouchers && count($vouchers) > 0)
<div class="mt-3">
<h6 class="mb-2">
{{ __('checkout.available_vouchers') }}
</h6>
<div class="d-flex flex-wrap gap-2">
@foreach($vouchers as $voucher)
<span class="badge bg-light text-dark px-3 py-2">
{{ $voucher->code }}
</span>
@endforeach
</div>
</div>
@endif
{{-- List Voucher Events --}}
@if($voucher_events && count($voucher_events) > 0)
<div class="mt-3">
<h6 class="mb-2">
{{ __('checkout.available_voucher_events') }}
</h6>
<div class="d-flex flex-wrap gap-2">
@foreach($voucher_events as $voucher_event)
<span class="badge bg-primary text-white px-3 py-2"
style="cursor:pointer"
data-id="{{ $voucher_event->id }}"
data-name="{{ $voucher_event->name }}"
data-description="{{ $voucher_event->description }}"
data-point="{{ $voucher_event->redeem_point }}"
data-start="{{ $voucher_event->start_date }}"
data-end="{{ $voucher_event->end_date }}"
data-terms="{{ $voucher_event->terms_and_conditions }}"
data-bs-toggle="modal"
data-bs-target="#voucherEventModal">
{{ $voucher_event->name ?? '-' }}
</span>
@endforeach
</div>
</div>
@endif
</div>
</div>
</div>
</div>
{{-- SINGLE REUSABLE MODAL --}}
<div class="modal fade" id="voucherEventModal" tabindex="-1">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content rounded-4">
<div class="modal-header border-0">
<h5 class="modal-title fw-semibold">
Voucher Event
</h5>
<button type="button"
class="btn-close"
data-bs-dismiss="modal">
</button>
</div>
<div class="modal-body pt-0">
<div id="voucherEventContent"></div>
</div>
<div class="modal-footer border-0">
<button type="button"
class="btn btn-secondary"
data-bs-dismiss="modal">
{{ __('checkout.close') }}
</button>
<button type="button"
class="btn btn-primary"
id="redeemVoucherBtn"
data-voucher-event-id="">
{{ __('checkout.redeem') }}
</button>
</div>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
const modal = document.getElementById('voucherEventModal');
modal.addEventListener('show.bs.modal', function (event) {
const button = event.relatedTarget;
const name = button.getAttribute('data-name');
const description = button.getAttribute('data-description');
const point = button.getAttribute('data-point');
const start = button.getAttribute('data-start');
const end = button.getAttribute('data-end');
const terms = button.getAttribute('data-terms');
let content = '';
if (description) {
content += `<p>${description}</p>`;
}
if (point) {
content += `
<div class="mb-2">
<strong>{{ __('checkout.points_required') }}:</strong>
${point}
</div>
`;
}
if (start && end) {
content += `
<div class="mb-2">
<strong>{{ __('checkout.valid_period') }}:</strong><br>
${start} - ${end}
</div>
`;
}
if (terms) {
content += `
<div class="mt-3 small text-muted">
<strong>{{ __('checkout.terms_and_conditions') }}:</strong>
<p>${terms}</p>
</div>
`;
}
modal.querySelector('.modal-title').textContent = name;
document.getElementById('voucherEventContent').innerHTML = content;
// Set voucher event ID for redeem button
const redeemBtn = document.getElementById('redeemVoucherBtn');
redeemBtn.setAttribute('data-voucher-event-id', button.getAttribute('data-id'));
});
// Handle redeem button click
document.getElementById('redeemVoucherBtn').addEventListener('click', function() {
const voucherEventId = this.getAttribute('data-voucher-event-id');
if (!voucherEventId) {
console.error('No voucher event ID found');
return;
}
// Disable button during processing
this.disabled = true;
this.innerHTML = '<span class="spinner-border spinner-border-sm me-2"></span>Processing...';
// Make AJAX call to redeem voucher
fetch(`/voucher-events/${voucherEventId}/redeem`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]')?.getAttribute('content') || ''
},
body: JSON.stringify({})
})
.then(response => response.json())
.then(data => {
if (data.success) {
// Show success message
alert('Voucher redeemed successfully!');
// Close modal
const modal = bootstrap.Modal.getInstance(document.getElementById('voucherEventModal'));
modal.hide();
// Reload page to update cart
setTimeout(() => {
window.location.reload();
}, 1000);
} else {
// Show error message
alert(data.message || 'Failed to redeem voucher');
}
})
.catch(error => {
console.error('Error:', error);
alert('An error occurred while redeeming the voucher');
})
.finally(() => {
// Re-enable button
this.disabled = false;
this.innerHTML = '{{ __('checkout.redeem') }}';
});
});
// Custom modal handler to prevent backdrop issues
const voucherBadges = document.querySelectorAll('[data-bs-toggle="modal"][data-bs-target="#voucherEventModal"]');
voucherBadges.forEach(function(badge) {
badge.addEventListener('click', function(e) {
e.preventDefault();
// Remove any existing backdrop
const existingBackdrop = document.querySelector('.modal-backdrop');
if (existingBackdrop) {
existingBackdrop.remove();
}
// Show modal without backdrop
const modalInstance = new bootstrap.Modal(modal, {
backdrop: false
});
modalInstance.show();
});
});
});
</script>

View File

@ -0,0 +1,13 @@
@if($brands && $brands->count() > 0)
<ul class="nav flex-column gap-2 pt-sm-3 pb-3 pb-sm-0 mt-n1 mb-1 mb-sm-0">
@foreach($brands as $index => $brand)
<li class="d-flex w-100 pt-1">
<a class="nav-link animate-underline animate-target d-inline fw-normal text-truncate p-0"
href="{{ route('product.index',['filter[brand_id]'=>$brand->id]) }}">{{ $brand->name }}</a>
</li>
@endforeach
</ul>
@endif

View File

@ -71,8 +71,8 @@ document.addEventListener('DOMContentLoaded', function() {
// Show loading spinner
loadingSpinner.classList.remove('d-none');
// Make AJAX request for brands
fetch('{{ route("product.ajax.brands") }}')
// Make AJAX request for brands with images
fetch('{{ route("product.ajax.brands-with-images") }}')
.then(response => response.json())
.then(data => {
if (data.success && data.brands) {

View File

@ -113,16 +113,12 @@ document.addEventListener('DOMContentLoaded', function() {
}
// Make AJAX request for popular products
fetch('{{ route("product.ajax.populers") }}?type=best_sellers&limit=6')
fetch('{{ route("product.ajax.populers-json") }}?type=best_sellers&limit=6')
.then(response => response.json())
.then(data => {
if (data.success && data.products) {
// Parse the HTML to extract individual product cards
const tempDiv = document.createElement('div');
tempDiv.innerHTML = data.products;
const productCards = tempDiv.querySelectorAll('.col');
const productsArray = Array.from(productCards);
if ( data.data) {
// Handle JSON response directly
const productsArray = data.data;
// Split products into two slides (3 products each)
const slide1 = productsArray.slice(0, 3);
@ -139,16 +135,16 @@ document.addEventListener('DOMContentLoaded', function() {
listDiv.className = 'd-flex flex-column gap-3 gap-lg-4';
slide.forEach(product => {
// Convert product card to list item format
const productImg = product.querySelector('img');
const productLink = product.querySelector('a');
const productPrice = product.querySelector('.h6, .price');
// Convert product object to list item format
const productImg = product.image_url;
const productLink = product.name;
const productPrice = product.unit_price;
const listItem = document.createElement('div');
listItem.className = 'd-flex align-items-center position-relative bg-body-tertiary rounded overflow-hidden animate-underline';
const img = document.createElement('img');
img.src = productImg ? productImg.src : '/img/shop/fashion/thumbs/0' + (index * 3 + slide.indexOf(product) + 1) + '.png';
img.src = productImg ? productImg : '/img/shop/fashion/thumbs/0' + (index * 3 + slide.indexOf(product) + 1) + '.png';
img.width = 110;
img.alt = 'Thumbnail';
@ -157,23 +153,22 @@ document.addEventListener('DOMContentLoaded', function() {
const link = document.createElement('a');
link.className = 'nav-link text-dark-emphasis stretched-link w-100 min-w-0 p-0';
link.href = productLink ? productLink.href : '#';
link.href = product.slug ? '/product/' + product.slug : '#';
const span = document.createElement('span');
span.className = 'animate-target text-truncate';
span.textContent = productLink ? productLink.textContent.trim() : 'Product Name';
span.textContent = productLink ? productLink : 'Product Name';
const price = document.createElement('div');
price.className = 'h6 mb-0';
price.textContent = productPrice ? productPrice.textContent : '$0.00';
price.textContent = productPrice ? Number(productPrice).toLocaleString('id-ID', { style: 'currency', currency: 'IDR', minimumFractionDigits: 0 }) : '$0.00';
const name = document.createElement('div');
name.className = 'text-truncate mb-1';
name.textContent = productLink ? productLink.textContent.trim() : 'Product Name';
name.textContent = productLink ? productLink : 'Product Name';
link.appendChild(span);
navDiv.appendChild(link);
navDiv.appendChild(name);
navDiv.appendChild(price);
listItem.appendChild(img);
listItem.appendChild(navDiv);

View File

@ -11,53 +11,53 @@
<div class="overflow-x-auto pb-3 mb-n3" data-simplebar>
<div class="d-flex gap-2 gap-md-3 gap-lg-4" style="min-width: 700px">
<a class="hover-effect-scale hover-effect-opacity position-relative w-100 overflow-hidden"
href="#!">
href="https://www.instagram.com/asiagolfindonesia/">
<span
class="hover-effect-target position-absolute top-0 start-0 w-100 h-100 bg-black bg-opacity-25 opacity-0 z-1"></span>
<i
class="ci-instagram hover-effect-target fs-4 text-white position-absolute top-50 start-50 translate-middle opacity-0 z-2"></i>
<div class="hover-effect-target ratio ratio-1x1">
<img src="https://dev.smgdev.top/api/storage/thumbnail_demo.png?id=40144" alt="Instagram image">
<img src="{{ asset('ig/627126351_868515585958098_5234946979031253180_n.jpg') }}" alt="Instagram image" class="object-fit-cover">
</div>
</a>
<a class="hover-effect-scale hover-effect-opacity position-relative w-100 overflow-hidden"
href="#!">
href="https://www.instagram.com/asiagolfindonesia/">
<span
class="hover-effect-target position-absolute top-0 start-0 w-100 h-100 bg-black bg-opacity-25 opacity-0 z-1"></span>
<i
class="ci-instagram hover-effect-target fs-4 text-white position-absolute top-50 start-50 translate-middle opacity-0 z-2"></i>
<div class="hover-effect-target ratio ratio-1x1">
<img src="https://dev.smgdev.top/api/storage/thumbnail_demo.png?id=40144" alt="Instagram image">
<img src="{{ asset('ig/607467049_3991986004432775_3154614208824352862_n.jpg') }}" alt="Instagram image" class="object-fit-cover">
</div>
</a>
<a class="hover-effect-scale hover-effect-opacity position-relative w-100 overflow-hidden"
href="#!">
href="https://www.instagram.com/asiagolfindonesia/">
<span
class="hover-effect-target position-absolute top-0 start-0 w-100 h-100 bg-black bg-opacity-25 opacity-0 z-1"></span>
<i
class="ci-instagram hover-effect-target fs-4 text-white position-absolute top-50 start-50 translate-middle opacity-0 z-2"></i>
<div class="hover-effect-target ratio ratio-1x1">
<img src="https://dev.smgdev.top/api/storage/thumbnail_demo.png?id=40144" alt="Instagram image">
<img src="{{ asset('ig/637072850_18450267685100713_2841227512989064742_n.jpg') }}" alt="Instagram image" class="object-fit-cover">
</div>
</a>
<a class="hover-effect-scale hover-effect-opacity position-relative w-100 overflow-hidden"
href="#!">
href="https://www.instagram.com/asiagolfindonesia/">
<span
class="hover-effect-target position-absolute top-0 start-0 w-100 h-100 bg-black bg-opacity-25 opacity-0 z-1"></span>
<i
class="ci-instagram hover-effect-target fs-4 text-white position-absolute top-50 start-50 translate-middle opacity-0 z-2"></i>
<div class="hover-effect-target ratio ratio-1x1">
<img src="https://dev.smgdev.top/api/storage/thumbnail_demo.png?id=40144" alt="Instagram image">
<img src="{{ asset('ig/637270426_18450238369100713_2695956505063029899_n.jpg') }}" alt="Instagram image" class="object-fit-cover">
</div>
</a>
<a class="hover-effect-scale hover-effect-opacity position-relative w-100 overflow-hidden"
href="#!">
href="https://www.instagram.com/asiagolfindonesia/">
<span
class="hover-effect-target position-absolute top-0 start-0 w-100 h-100 bg-black bg-opacity-25 opacity-0 z-1"></span>
<i
class="ci-instagram hover-effect-target fs-4 text-white position-absolute top-50 start-50 translate-middle opacity-0 z-2"></i>
<div class="hover-effect-target ratio ratio-1x1">
<img src="https://dev.smgdev.top/api/storage/thumbnail_demo.png?id=40144" alt="Instagram image">
<img src="{{ asset('ig/639478537_1665736817945005_7744756753154487865_n.jpg') }}" alt="Instagram image" class="object-fit-cover">
</div>
</a>
</div>

View File

@ -16,20 +16,6 @@
<img src="{{ $product->image_url }}" loading="lazy" class="w-100 h-100 object-cover">
</div>
</a>
{{-- <div
class="hover-effect-target position-absolute start-0 bottom-0 w-100 z-2 opacity-0 pb-2 pb-sm-3 px-2 px-sm-3">
<div
class="d-flex align-items-center justify-content-center gap-2 gap-xl-3 bg-body rounded-2 p-2">
<span class="fs-xs fw-medium text-secondary-emphasis py-1 px-sm-2">XS</span>
<span class="fs-xs fw-medium text-secondary-emphasis py-1 px-sm-2">S</span>
<span class="fs-xs fw-medium text-secondary-emphasis py-1 px-sm-2">M</span>
<span class="fs-xs fw-medium text-secondary-emphasis py-1 px-sm-2">L</span>
<div class="nav">
<a class="nav-link fs-xs text-body-tertiary py-1 px-2"
href="{{ route('second', ['shop', 'product-fashion']) }}">+3</a>
</div>
</div>
</div> --}}
</div>
<div class="nav mb-2">
<a class="nav-link animate-target min-w-0 text-dark-emphasis p-0"

View File

@ -269,7 +269,7 @@
<i class="ci-shopping-bag animate-target me-1"></i>
</a>
</div>
</div>
</div>
<!-- Main navigation that turns into offcanvas on screens < 992px wide (lg breakpoint) -->
<div class="collapse navbar-stuck-hide" id="stuckNav">
@ -312,7 +312,7 @@
<!-- Account and Wishlist buttons visible on screens < 768px wide (md breakpoint) -->
<div class="offcanvas-header border-top px-0 py-3 mt-3 d-md-none">
<div class="nav nav-justified w-100">
<a class="nav-link border-end" href="{{ route('login') }}">
<a class="nav-link border-end" href="{{ route('profile') }}">
<i class="ci-user fs-lg opacity-60 me-2"></i>
{{ __('header.account') }}
</a>

View File

@ -9,15 +9,33 @@
<!-- Nav tabs -->
<ul class="nav nav-underline justify-content-lg-center mt-n2 mt-lg-0 mb-4" role="tablist">
@foreach ($genders as $key => $gender)
<li class="nav-item" role="presentation">
<button type="button" class="nav-link text-uppercase {{ $key == 0 ? 'active' : '' }}" id="gender-{{ $gender->id }}-tab"
data-bs-toggle="tab" data-bs-target="#gender-{{ $gender->id }}-tab-pane" role="tab"
aria-controls="gender-{{ $gender->id }}-tab-pane" aria-selected="true">
{{ $gender->name }}
<button type="button" class="nav-link text-uppercase active" id="category-tab"
data-bs-toggle="tab" data-bs-target="#category-tab-pane" role="tab"
aria-controls="category-tab-pane" aria-selected="true">
Category
</button>
</li>
@endforeach
<li class="nav-item" role="presentation">
<button type="button" class="nav-link text-uppercase" id="brand-tab"
data-bs-toggle="tab" data-bs-target="#brand-tab-pane" role="tab"
aria-controls="brand-tab-pane" aria-selected="true">
Brand
</button>
</li>
<li class="nav-item" role="presentation">
<button type="button" class="nav-link text-uppercase" id="gender-tab"
data-bs-toggle="tab" data-bs-target="#gender-tab-pane" role="tab"
aria-controls="gender-tab-pane" aria-selected="true">
Gender
</button>
</li>
{{-- <li class="nav-item" role="presentation">
<button type="button" class="nav-link text-uppercase active" id="womens-tab" data-bs-toggle="tab"
data-bs-target="#womens-tab-pane" role="tab" aria-controls="womens-tab-pane"
@ -44,48 +62,76 @@
<!-- Tab panes -->
<div class="tab-content pb-xl-4">
@foreach ($genders as $key => $gender)
<div class="tab-pane fade show {{ $key == 0 ? 'active' : '' }}" id="gender-{{ $gender->id }}-tab-pane" role="tabpanel"
aria-labelledby="gender-{{ $gender->id }}-tab">
<div class="row g-4">
<div class="tab-pane fade show active" id="category-tab-pane" role="tabpanel"
aria-labelledby="category-tab">
<div class="row g-4">
@foreach ($categories as $chunks)
<div class="col-lg-2">
<ul class="nav flex-column gap-2 mt-0">
@foreach ($chunks as $chunk)
<li class="d-flex w-100 pt-1">
<a class="nav-link animate-underline animate-target d-inline fw-normal text-truncate p-0"
href="{{ route('product.index', ['filter[category]' => $chunk->id, 'filter[gender]' => $gender->id]) }}">{{ $chunk->name }}</a>
</li>
@endforeach
</ul>
</div>
@endforeach
<div class="col-lg-4 d-none d-lg-block" data-bs-theme="light">
<div class="position-relative d-flex flex-column h-100 rounded-4 overflow-hidden p-4">
<div
class="position-relative d-flex flex-column justify-content-between h-100 z-2 pt-xl-2 ps-xl-2">
<div class="h4 lh-base">Women's<br>Heels<br>Collection</div>
<div>
<a class="btn btn-sm btn-dark stretched-link"
href="{{ route('second', ['shop', 'catalog-fashion']) }}"
data-bs-theme="light">Shop now</a>
</div>
</div>
<img src="/img/mega-menu/fashion/01.jpg"
class="position-absolute top-0 start-0 w-100 h-100 object-fit-cover rtl-flip"
alt="Image">
@foreach ($categories as $chunks)
<div class="col-lg-2">
<ul class="nav flex-column gap-2 mt-0">
@foreach ($chunks as $chunk)
<li class="d-flex w-100 pt-1">
<a class="nav-link animate-underline animate-target d-inline fw-normal text-truncate p-0"
href="{{ route('product.index', ['filter[category_id]' => $chunk->id]) }}">{{ $chunk->name }}</a>
</li>
@endforeach
</ul>
</div>
</div>
</div>
</div>
@endforeach
@endforeach
</div>
</div>
<div class="tab-pane fade show" id="brand-tab-pane" role="tabpanel"
aria-labelledby="brand-tab">
<div class="row g-4">
@foreach ($brands as $chunks)
<div class="col-lg-2">
<ul class="nav flex-column gap-2 mt-0">
@foreach ($chunks as $chunk)
<li class="d-flex w-100 pt-1">
<a class="nav-link animate-underline animate-target d-inline fw-normal text-truncate p-0"
href="{{ route('product.index', ['filter[category_id]' => $chunk->id]) }}">{{ $chunk->name }}</a>
</li>
@endforeach
</ul>
</div>
@endforeach
</div>
</div>
<div class="tab-pane fade show" id="gender-tab-pane" role="tabpanel"
aria-labelledby="gender-tab">
<div class="row g-4">
@foreach ($genders as $chunks)
<div class="col-lg-2">
<ul class="nav flex-column gap-2 mt-0">
@foreach ($chunks as $chunk)
<li class="d-flex w-100 pt-1">
<a class="nav-link animate-underline animate-target d-inline fw-normal text-truncate p-0"
href="{{ route('product.index', ['filter[gender_id]' => $chunk->id]) }}">{{ $chunk->name }}</a>
</li>
@endforeach
</ul>
</div>
@endforeach
</div>
</div>
</div>
</div>

View File

@ -144,7 +144,9 @@
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-trigger="hover" aria-expanded="false">{{ __('navbar.contact') }}</a>
<ul class="dropdown-menu" style="--cz-dropdown-spacer: .75rem">
<li><a class="dropdown-item" href="{{ route('any', 'terms-and-conditions')}}">{{ __('navbar.terms_conditions') }}</a></li>
<li><a class="dropdown-item" href="{{ route('terms-and-conditions')}}">{{ __('navbar.terms_conditions') }}</a></li>
<li><a class="dropdown-item" href="{{ route('contact')}}">{{ __('navbar.contact') }}</a></li>
</ul>
</li>

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,7 @@
@include('layouts.partials/title-meta')
@vite(['resources/js/theme-switcher.js'])
@include('layouts.partials/head-css')
</head>

View File

@ -1,22 +1,23 @@
<!-- Sidebar navigation that turns into offcanvas on screens < 992px wide (lg breakpoint) -->
<aside class="col-lg-3">
@if (auth()->check())
<div class="offcanvas-lg offcanvas-start pe-lg-0 pe-xl-4" id="accountSidebar">
<!-- Header -->
<div class="offcanvas-header d-lg-block py-3 p-lg-0">
<div class="d-flex align-items-center">
<div class="flex-shrink-0 ms-3">
@if(auth()->user()->photo)
@if(auth()->user()?->photo != null)
<img src="{{ asset('storage/' . auth()->user()->photo) }}" alt="{{ auth()->user()->name }}"
class="rounded-circle" style="width: 3rem; height: 3rem; object-fit: cover;"
onerror="this.src='{{ asset('img/photo-placeholder.png') }}'">
@else
<div class="h5 d-flex justify-content-center align-items-center text-primary bg-primary-subtle lh-1 rounded-circle mb-0"
style="width: 3rem; height: 3rem;">{{ auth()->user()->name ? substr(auth()->user()->name, 0, 1) : 'S' }}</div>
style="width: 3rem; height: 3rem;">{{ auth()->user()?->name ? substr(auth()->user()?->name, 0, 1) : 'S' }}</div>
@endif
</div>
<div class="min-w-0 ps-3">
<h5 class="h6 mb-1">{{ auth()->user()->name }}</h5>
<h5 class="h6 mb-1">{{ auth()->user()?->name }}</h5>
<div class="nav flex-nowrap text-nowrap min-w-0">
<a class="nav-link animate-underline text-body p-0" href="#bonusesModal" data-bs-toggle="modal">
{{-- <svg class="text-warning flex-shrink-0 me-2" xmlns="http://www.w3.org/2000/svg"
@ -107,4 +108,5 @@
</nav>
</div>
</div>
@endif
</aside>

View File

@ -2,7 +2,7 @@
<div class="container pb-md-3">
<!-- Features -->
<div class="border-bottom py-5">
{{-- <div class="border-bottom py-5">
<div class="row row-cols-2 row-cols-md-4 g-4 gx-sm-5 py-sm-1 py-md-2 py-lg-3 mb-n2 mb-md-0">
<div class="col mb-2 mb-md-0">
<i class="ci-layers-2 fs-xl text-dark-emphasis mb-3"></i>
@ -26,7 +26,7 @@
<p class="fs-sm text-body mb-0">Spend less time searching and more time creating.</p>
</div>
</div>
</div>
</div> --}}
<!-- Subscription + Links -->
<div class="py-5">
@ -75,31 +75,14 @@
</div>
<div class="accordion-item col-sm-4 border-0">
<h6 class="accordion-header" id="membersHeading">
<span class="text-dark-emphasis d-none d-sm-block">For members</span>
<span class="text-dark-emphasis d-none d-sm-block">Brands</span>
<button type="button" class="accordion-button collapsed py-3 d-sm-none"
data-bs-toggle="collapse" data-bs-target="#membersLinks" aria-expanded="false"
aria-controls="membersLinks">For members</button>
aria-controls="membersLinks">Brands</button>
</h6>
<div class="accordion-collapse collapse d-sm-block" id="membersLinks"
aria-labelledby="membersHeading" data-bs-parent="#footerLinks">
<ul class="nav flex-column gap-2 pt-sm-3 pb-3 pb-sm-0 mt-n1 mb-1 mb-sm-0">
<li class="d-flex w-100 pt-1">
<a class="nav-link animate-underline animate-target d-inline fw-normal text-truncate p-0"
href="#!">Licenses</a>
</li>
<li class="d-flex w-100 pt-1">
<a class="nav-link animate-underline animate-target d-inline fw-normal text-truncate p-0"
href="#!">Return policy</a>
</li>
<li class="d-flex w-100 pt-1">
<a class="nav-link animate-underline animate-target d-inline fw-normal text-truncate p-0"
href="#!">Payment methods</a>
</li>
<li class="d-flex w-100 pt-1">
<a class="nav-link animate-underline animate-target d-inline fw-normal text-truncate p-0"
href="#!">Become a vendor</a>
</li>
</ul>
<x-footer-brands />
</div>
<hr class="d-sm-none my-0">
</div>

View File

@ -1,5 +1,4 @@
@vite(['node_modules/choices.js/public/assets/styles/choices.min.css', 'node_modules/swiper/swiper-bundle.min.css', 'node_modules/glightbox/dist/css/glightbox.min.css', 'node_modules/simplebar/dist/simplebar.min.css', 'node_modules/flatpickr/dist/flatpickr.min.css', 'node_modules/nouislider/dist/nouislider.min.css', 'node_modules/img-comparison-slider/dist/styles.css'])
@vite(['node_modules/choices.js/public/assets/styles/choices.min.css', 'node_modules/swiper/swiper-bundle.min.css', 'node_modules/glightbox/dist/css/glightbox.min.css', 'node_modules/simplebar/dist/simplebar.min.css', 'node_modules/flatpickr/dist/flatpickr.min.css', 'node_modules/nouislider/dist/nouislider.min.css', 'node_modules/img-comparison-slider/dist/styles.css', 'node_modules/bootstrap/dist/css/bootstrap.min.css'])
@vite(['resources/icons/cartzilla-icons.min.css'])
@vite(['resources/scss/theme.scss'])

View File

@ -97,7 +97,7 @@
</div>
<!-- Price -->
<div class="accordion-item border-0 pb-1 pb-xl-2">
{{-- <div class="accordion-item border-0 pb-1 pb-xl-2">
<h4 class="accordion-header" id="headingPrice">
<button type="button" class="accordion-button p-0 pb-3" data-bs-toggle="collapse"
data-bs-target="#price" aria-expanded="true" aria-controls="price">
@ -127,7 +127,7 @@
</div>
</div>
</div>
</div>
</div> --}}
<!-- Brands -->
{{-- <div class="accordion-item border-0 pb-1 pb-xl-2">

View File

@ -52,25 +52,41 @@
<p>{{ __('tnc.contact_content') }}</p>
<ul class="list-unstyled pb-1">
<li class="nav pt-1">
<a class="nav-link align-items-start fs-base p-0" href="tel:+15053753082">
<a class="nav-link align-items-start fs-base p-0" href="tel:0213500703">
<i class="ci-phone fs-xl mt-1 me-2"></i>
+1&nbsp;50&nbsp;537&nbsp;53&nbsp;082
(021) 3500703
</a>
</li>
<li class="nav pt-1">
<a class="nav-link align-items-start fs-base p-0" href="mailto:contact@catzillastore.com">
<a class="nav-link align-items-start fs-base p-0" href="https://wa.me/62818434301">
<i class="ci-whatsapp fs-xl mt-1 me-2"></i>
0818-4343-01
</a>
</li>
<li class="nav pt-1">
<a class="nav-link align-items-start fs-base p-0" href="https://www.instagram.com/asiagolfindonesia/">
<i class="ci-instagram fs-xl mt-1 me-2"></i>
@asiagolfindonesia
</a>
</li>
<li class="nav pt-1">
<a class="nav-link align-items-start fs-base p-0" href="mailto:sales@asiagolf.id">
<i class="ci-mail fs-xl mt-1 me-2"></i>
contact@catzillastore.com
sales@asiagolf.id
</a>
</li>
<li class="nav pt-1">
<a class="nav-link align-items-start fs-base p-0" href="#!">
<a class="nav-link align-items-start fs-base p-0" href="https://maps.google.com/?q=Jalan+Pintu+Air+Raya+No.11+B,D,E,F,G+RT.8/RW.1,+Ps.+Baru,+Kecamatan+Sawah+Besar,+Kota+Jakarta+Pusat,+Daerah+Khusus+Ibukota+Jakarta+10710" target="_blank">
<i class="ci-map-pin fs-xl mt-1 me-2"></i>
12 Beale St. Suite 600 San Francisco, California 94105
Jalan Pintu Air Raya No.11 B,D,E,F,G RT.8/RW.1, Ps. Baru, Kecamatan Sawah Besar, Kota Jakarta Pusat, Daerah Khusus Ibukota Jakarta 10710
</a>
</li>
</ul>
<p class="pb-3 mb-0">{{ __('tnc.help_text') }} <a class="fw-medium" href="{{ route('second', ['help', 'topics-v1'])}}">{{ __('tnc.help_link') }}</a></p>
<p class="pb-3 mb-0">{{ __('tnc.help_text') }} <a class="fw-medium" href="{{ route('help')}}">{{ __('tnc.help_link') }}</a></p>
<hr class="my-3 my-lg-4">

View File

@ -17,6 +17,9 @@ use App\Http\Controllers\RoutingController;
use App\Http\Controllers\SearchController;
use App\Http\Controllers\TncController;
use App\Http\Controllers\HelpController;
use App\Http\Controllers\VoucherEventController;
use App\Http\Controllers\ContactController;
use Illuminate\Support\Facades\Route;
Route::group(['prefix' => '/dummy'], function () {
@ -38,8 +41,10 @@ Route::get('/', [HomeController::class, 'index'])->name('home');
Route::get('/products', [ProductController::class, 'index'])->name('product.index');
Route::get('/products/ajax', [ProductController::class, 'ajax'])->name('product.ajax');
Route::get('/products/ajax/populers', [ProductController::class, 'populers'])->name('product.ajax.populers');
Route::get('/products/ajax/populers-json', [ProductController::class, 'populersJson'])->name('product.ajax.populers-json');
Route::get('/products/ajax/highlights', [ProductController::class, 'highlights'])->name('product.ajax.highlights');
Route::get('/products/ajax/brands', [ProductController::class, 'brands'])->name('product.ajax.brands');
Route::get('/products/ajax/brands-with-images', [ProductController::class, 'brandsWithImages'])->name('product.ajax.brands-with-images');
Route::get('/products/ajax/categories', [ProductController::class, 'categories'])->name('product.ajax.categories');
Route::get('/products/ajax/genders', [ProductController::class, 'genders'])->name('product.ajax.genders');
Route::get('/products/ajax/announcements', [ProductController::class, 'announcements'])->name('product.ajax.announcements');
@ -111,6 +116,10 @@ Route::middleware(['auth'])->prefix('/checkout')->group(function () {
});
Route::middleware(['auth'])->prefix('/voucher-events')->group(function () {
Route::post('/{voucherEvent}/redeem', [VoucherEventController::class, 'redeem'])->name('voucher-events.redeem');
});
Route::middleware(['auth'])->prefix('/orders')->group(function () {
Route::get('/', [OrderController::class, 'index'])->name('orders');
@ -118,3 +127,4 @@ Route::middleware(['auth'])->prefix('/orders')->group(function () {
});
Route::get('/terms-and-conditions', [TncController::class, 'index'])->name('terms-and-conditions');
Route::get('/help', [HelpController::class, 'index'])->name('help');
Route::get('/contact', [ContactController::class, 'index'])->name('contact');

View File

@ -15,6 +15,7 @@ export default defineConfig({
"node_modules/simplebar/dist/simplebar.min.css",
'node_modules/flatpickr/dist/flatpickr.min.css',
"node_modules/nouislider/dist/nouislider.min.css",
"node_modules/bootstrap/dist/css/bootstrap.min.css",
//js
"resources/js/theme-switcher.js",