link product
This commit is contained in:
parent
7e820e7b45
commit
b3630efd2e
|
|
@ -62,6 +62,10 @@ class User extends Authenticatable
|
||||||
{
|
{
|
||||||
return $this->hasMany(Address::class);
|
return $this->hasMany(Address::class);
|
||||||
}
|
}
|
||||||
|
public function primary_address()
|
||||||
|
{
|
||||||
|
return $this->hasOne(Address::class)->where('is_primary', true);
|
||||||
|
}
|
||||||
|
|
||||||
public function getPhotoUrlAttribute()
|
public function getPhotoUrlAttribute()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
aria-label="Add to Wishlist">
|
aria-label="Add to Wishlist">
|
||||||
<i class="ci-heart animate-target"></i>
|
<i class="ci-heart animate-target"></i>
|
||||||
</button>
|
</button>
|
||||||
<a class="d-block p-2 p-lg-3" href="{{ route('second', ['shop', 'product-grocery']) }}">
|
<a class="d-block p-2 p-lg-3" href="{{ route('product.detail', [ $value->slug]) }}">
|
||||||
<div class="ratio" style="--cz-aspect-ratio: calc(160 / 191 * 100%)">
|
<div class="ratio" style="--cz-aspect-ratio: calc(160 / 191 * 100%)">
|
||||||
<img src="{{ $value->image_url }}" alt="Image" loading="lazy">
|
<img src="{{ $value->image_url }}" alt="Image" loading="lazy">
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -82,8 +82,8 @@
|
||||||
<div class="card-body pt-0 px-1 px-md-2 px-lg-3 pb-2">
|
<div class="card-body pt-0 px-1 px-md-2 px-lg-3 pb-2">
|
||||||
<div class="h6 mb-2">{{ $value->display_price_currency }}</div>
|
<div class="h6 mb-2">{{ $value->display_price_currency }}</div>
|
||||||
<h3 class="fs-sm lh-base mb-0">
|
<h3 class="fs-sm lh-base mb-0">
|
||||||
<a class="hover-effect-underline fw-normal"
|
<a class="hover-effect-underline fw-normal"
|
||||||
href="{{ route('second', ['shop', 'product-grocery']) }}">{{ $value->name }}</a>
|
href="{{ route('product.detail', [$value->slug]) }}">{{ $value->name }}</a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="fs-xs text-body-secondary px-1 px-md-2 px-lg-3 pb-2 pb-md-3">{{ $value->unit }}</div>
|
<div class="fs-xs text-body-secondary px-1 px-md-2 px-lg-3 pb-2 pb-md-3">{{ $value->unit }}</div>
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
aria-label="Add to Wishlist">
|
aria-label="Add to Wishlist">
|
||||||
<i class="ci-heart animate-target"></i>
|
<i class="ci-heart animate-target"></i>
|
||||||
</button>
|
</button>
|
||||||
<a class="d-block p-2 p-lg-3" href="shop-product-grocery.html">
|
<a class="d-block p-2 p-lg-3" href="{{ route('product.detail', $value->slug) }}">
|
||||||
<div class="ratio" style="--cz-aspect-ratio: calc(160 / 191 * 100%)">
|
<div class="ratio" style="--cz-aspect-ratio: calc(160 / 191 * 100%)">
|
||||||
<img src="{{ $value->image_url }}" alt="Image">
|
<img src="{{ $value->image_url }}" alt="Image">
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -91,7 +91,7 @@
|
||||||
<div class="h6 mb-2">{{ $value->display_price_currency }}</div>
|
<div class="h6 mb-2">{{ $value->display_price_currency }}</div>
|
||||||
<h3 class="fs-sm lh-base mb-0">
|
<h3 class="fs-sm lh-base mb-0">
|
||||||
<a class="hover-effect-underline fw-normal"
|
<a class="hover-effect-underline fw-normal"
|
||||||
href="{{ route('product.detail', $value->id) }}">{{ $value->name }}</a>
|
href="{{ route('product.detail', $value->slug) }}">{{ $value->name }}</a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
@if ($value->variants->count() > 1)
|
@if ($value->variants->count() > 1)
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Delivery options toggle visible on screens > 1200px wide (xl breakpoint) -->
|
<!-- Delivery options toggle visible on screens > 1200px wide (xl breakpoint) -->
|
||||||
<div class="nav me-4 me-xxl-5 d-none d-xl-block">
|
{{-- <div class="nav me-4 me-xxl-5 d-none d-xl-block">
|
||||||
<a class="nav-link flex-column align-items-start animate-underline p-0" href="#deliveryOptions"
|
<a class="nav-link flex-column align-items-start animate-underline p-0" href="#deliveryOptions"
|
||||||
data-bs-toggle="offcanvas" aria-controls="deliveryOptions">
|
data-bs-toggle="offcanvas" aria-controls="deliveryOptions">
|
||||||
<div class="h6 fs-sm mb-0">Delivery</div>
|
<div class="h6 fs-sm mb-0">Delivery</div>
|
||||||
|
|
@ -43,6 +43,17 @@
|
||||||
<i class="ci-chevron-down fs-base ms-1"></i>
|
<i class="ci-chevron-down fs-base ms-1"></i>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
</div> --}}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="nav me-4 me-xxl-5 d-none d-xl-block">
|
||||||
|
<a class="nav-link flex-column align-items-start animate-underline p-0" href="{{ route('addresses') }}">
|
||||||
|
<div class="h6 fs-sm mb-0">Delivery</div>
|
||||||
|
<div class="d-flex align-items-center fs-sm fw-normal text-body">
|
||||||
|
<span class="animate-target text-nowrap">{{ auth()->user()->primary_address->label ?? 'Set your address' }}</span>
|
||||||
|
<i class="ci-chevron-down fs-base ms-1"></i>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Button group -->
|
<!-- Button group -->
|
||||||
|
|
@ -109,20 +120,35 @@
|
||||||
|
|
||||||
<!-- Account button visible on screens > 768px wide (md breakpoint) -->
|
<!-- Account button visible on screens > 768px wide (md breakpoint) -->
|
||||||
<a class="btn btn-icon fs-lg btn-outline-secondary border-0 rounded-circle animate-shake d-none d-md-inline-flex"
|
<a class="btn btn-icon fs-lg btn-outline-secondary border-0 rounded-circle animate-shake d-none d-md-inline-flex"
|
||||||
href="{{ route('second', ['account', 'signin']) }}">
|
href="{{ auth()->check() ? route('profile') : route('login') }}">
|
||||||
<i class="ci-user animate-target"></i>
|
<i class="ci-user animate-target"></i>
|
||||||
<span class="visually-hidden">Account</span>
|
<span class="visually-hidden">{{ __('header.account') }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Cart button -->
|
<!-- Cart button -->
|
||||||
<button type="button"
|
{{-- <button type="button"
|
||||||
class="btn btn-icon fs-xl btn-outline-secondary position-relative border-0 rounded-circle animate-scale"
|
class="btn btn-icon fs-xl btn-outline-secondary position-relative border-0 rounded-circle animate-scale"
|
||||||
data-bs-toggle="offcanvas" data-bs-target="#shoppingCart" aria-controls="shoppingCart"
|
data-bs-toggle="offcanvas" data-bs-target="#shoppingCart" aria-controls="shoppingCart"
|
||||||
aria-label="Shopping cart">
|
aria-label="Shopping cart">
|
||||||
<span class="position-absolute top-0 start-100 badge fs-xs text-bg-primary rounded-pill ms-n3 z-2"
|
<span class="position-absolute top-0 start-100 badge fs-xs text-bg-primary rounded-pill ms-n3 z-2"
|
||||||
style="--cz-badge-padding-y: .25em; --cz-badge-padding-x: .42em">8</span>
|
style="--cz-badge-padding-y: .25em; --cz-badge-padding-x: .42em">8</span>
|
||||||
<i class="ci-shopping-cart animate-target"></i>
|
<i class="ci-shopping-cart animate-target"></i>
|
||||||
</button>
|
</button> --}}
|
||||||
|
|
||||||
|
<a type="button" href="{{ route('cart.index') }}"
|
||||||
|
class="btn btn-icon btn-lg fs-xl btn-outline-secondary position-relative border-0 rounded-circle animate-scale"
|
||||||
|
aria-label="Shopping cart">
|
||||||
|
@if (auth()->check() && \App\Repositories\Member\Cart\MemberCartRepository::getCount() > 0)
|
||||||
|
<span
|
||||||
|
class="position-absolute top-0 start-100 badge fs-xs text-bg-primary rounded-pill mt-1 ms-n4 z-2 cart-count"
|
||||||
|
style="--cz-badge-padding-y: .25em; --cz-badge-padding-x: .42em">{{ auth()->check() ? \App\Repositories\Member\Cart\MemberCartRepository::getCount() : 0 }}</span>
|
||||||
|
@endif
|
||||||
|
<i class="ci-shopping-cart animate-target me-1"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@
|
||||||
<h2 class="h4 mb-4">Make online shop easier with our AsiaGolf App</h2>
|
<h2 class="h4 mb-4">Make online shop easier with our AsiaGolf App</h2>
|
||||||
<div
|
<div
|
||||||
class="d-flex flex-sm-wrap justify-content-center justify-content-sm-start gap-2 gap-sm-3">
|
class="d-flex flex-sm-wrap justify-content-center justify-content-sm-start gap-2 gap-sm-3">
|
||||||
<a class="btn btn-market btn-lg btn-light rounded-pill flex-shrink-0" href="#!"
|
<a class="btn btn-market btn-lg btn-light rounded-pill flex-shrink-0" href="https://play.google.com/store/apps/details?id=id.asiagolf.app&hl=id"
|
||||||
aria-label="Download on Google Play">
|
aria-label="Download on Google Play">
|
||||||
<svg class="flex-shrink-0 ms-n1 me-2" xmlns="http://www.w3.org/2000/svg"
|
<svg class="flex-shrink-0 ms-n1 me-2" xmlns="http://www.w3.org/2000/svg"
|
||||||
width="24" height="24" viewBox="0 0 24 24" fill="none">
|
width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||||
|
|
@ -191,7 +191,7 @@
|
||||||
d="M24.575 9.45c-2.184 0-3.914 1.704-3.914 4.071 0 2.272 1.729 4.071 3.914 4.071s3.914-1.704 3.914-4.071c0-2.461-1.729-4.071-3.914-4.071zm0 6.438c-1.183 0-2.184-1.041-2.184-2.462s1.001-2.462 2.184-2.462 2.184.947 2.184 2.462c0 1.42-1.001 2.462-2.184 2.462zM16.11 9.45c-2.184 0-3.914 1.704-3.914 4.071 0 2.272 1.729 4.071 3.914 4.071s3.914-1.704 3.914-4.071c0-2.461-1.729-4.071-3.914-4.071zm0 6.438c-1.183 0-2.184-1.041-2.184-2.462s1.001-2.462 2.184-2.462 2.184.947 2.184 2.462c0 1.42-1.001 2.462-2.184 2.462zM6.007 10.681v1.704h3.914c-.091.947-.455 1.704-.91 2.177-.546.568-1.456 1.231-3.004 1.231-2.457 0-4.278-1.988-4.278-4.544s1.911-4.544 4.278-4.544c1.274 0 2.275.568 3.004 1.231l1.183-1.231C9.193 5.757 7.918 5 6.098 5 2.822 5 0 7.84 0 11.249s2.822 6.249 6.098 6.249c1.82 0 3.095-.568 4.187-1.799 1.092-1.136 1.456-2.745 1.456-3.976 0-.379 0-.757-.091-1.041H6.007zm41.322 1.325c-.364-.947-1.274-2.556-3.277-2.556s-3.641 1.61-3.641 4.071c0 2.272 1.638 4.071 3.823 4.071 1.729 0 2.822-1.136 3.186-1.799l-1.274-.947c-.455.663-1.001 1.136-1.911 1.136s-1.456-.379-1.911-1.231l5.188-2.272-.182-.473zm-5.279 1.326c0-1.515 1.183-2.367 2.002-2.367.637 0 1.274.379 1.456.852l-3.459 1.515zm-4.278 3.882h1.729V5.379h-1.729v11.834zm-2.73-6.911c-.455-.473-1.183-.947-2.093-.947-1.911 0-3.732 1.799-3.732 4.071s1.729 3.976 3.732 3.976c.91 0 1.638-.473 2.002-.947h.091v.568c0 1.515-.819 2.367-2.093 2.367-1.001 0-1.729-.757-1.911-1.42l-1.456.663C30.036 19.675 31.128 21 33.039 21c2.002 0 3.641-1.231 3.641-4.166V9.639h-1.638v.663zm-2.002 5.586c-1.183 0-2.184-1.041-2.184-2.462s1.001-2.462 2.184-2.462 2.093 1.041 2.093 2.462-.91 2.462-2.093 2.462zM55.247 5.379h-4.096v11.834h1.729v-4.45h2.367c1.911 0 3.732-1.42 3.732-3.692s-1.82-3.692-3.732-3.692zm.091 5.681h-2.457V6.988h2.457c1.274 0 2.002 1.136 2.002 1.988-.091 1.041-.819 2.083-2.002 2.083zm10.467-1.704c-1.274 0-2.549.568-3.004 1.799l1.547.663c.364-.663.91-.852 1.547-.852.91 0 1.729.568 1.82 1.515v.095c-.273-.189-1.001-.473-1.729-.473-1.638 0-3.277.947-3.277 2.651 0 1.609 1.365 2.651 2.821 2.651 1.183 0 1.729-.568 2.184-1.136h.091v.947h1.638v-4.544c-.182-2.083-1.729-3.314-3.641-3.314zm-.182 6.533c-.546 0-1.365-.284-1.365-1.041 0-.947 1.001-1.231 1.82-1.231.728 0 1.092.189 1.547.379-.182 1.136-1.092 1.894-2.002 1.894zm9.557-6.249l-1.911 5.112h-.091l-2.002-5.112h-1.82l3.004 7.195-1.729 3.976h1.729L77 9.639h-1.82zm-15.291 7.574h1.729V5.379h-1.729v11.834z" />
|
d="M24.575 9.45c-2.184 0-3.914 1.704-3.914 4.071 0 2.272 1.729 4.071 3.914 4.071s3.914-1.704 3.914-4.071c0-2.461-1.729-4.071-3.914-4.071zm0 6.438c-1.183 0-2.184-1.041-2.184-2.462s1.001-2.462 2.184-2.462 2.184.947 2.184 2.462c0 1.42-1.001 2.462-2.184 2.462zM16.11 9.45c-2.184 0-3.914 1.704-3.914 4.071 0 2.272 1.729 4.071 3.914 4.071s3.914-1.704 3.914-4.071c0-2.461-1.729-4.071-3.914-4.071zm0 6.438c-1.183 0-2.184-1.041-2.184-2.462s1.001-2.462 2.184-2.462 2.184.947 2.184 2.462c0 1.42-1.001 2.462-2.184 2.462zM6.007 10.681v1.704h3.914c-.091.947-.455 1.704-.91 2.177-.546.568-1.456 1.231-3.004 1.231-2.457 0-4.278-1.988-4.278-4.544s1.911-4.544 4.278-4.544c1.274 0 2.275.568 3.004 1.231l1.183-1.231C9.193 5.757 7.918 5 6.098 5 2.822 5 0 7.84 0 11.249s2.822 6.249 6.098 6.249c1.82 0 3.095-.568 4.187-1.799 1.092-1.136 1.456-2.745 1.456-3.976 0-.379 0-.757-.091-1.041H6.007zm41.322 1.325c-.364-.947-1.274-2.556-3.277-2.556s-3.641 1.61-3.641 4.071c0 2.272 1.638 4.071 3.823 4.071 1.729 0 2.822-1.136 3.186-1.799l-1.274-.947c-.455.663-1.001 1.136-1.911 1.136s-1.456-.379-1.911-1.231l5.188-2.272-.182-.473zm-5.279 1.326c0-1.515 1.183-2.367 2.002-2.367.637 0 1.274.379 1.456.852l-3.459 1.515zm-4.278 3.882h1.729V5.379h-1.729v11.834zm-2.73-6.911c-.455-.473-1.183-.947-2.093-.947-1.911 0-3.732 1.799-3.732 4.071s1.729 3.976 3.732 3.976c.91 0 1.638-.473 2.002-.947h.091v.568c0 1.515-.819 2.367-2.093 2.367-1.001 0-1.729-.757-1.911-1.42l-1.456.663C30.036 19.675 31.128 21 33.039 21c2.002 0 3.641-1.231 3.641-4.166V9.639h-1.638v.663zm-2.002 5.586c-1.183 0-2.184-1.041-2.184-2.462s1.001-2.462 2.184-2.462 2.093 1.041 2.093 2.462-.91 2.462-2.093 2.462zM55.247 5.379h-4.096v11.834h1.729v-4.45h2.367c1.911 0 3.732-1.42 3.732-3.692s-1.82-3.692-3.732-3.692zm.091 5.681h-2.457V6.988h2.457c1.274 0 2.002 1.136 2.002 1.988-.091 1.041-.819 2.083-2.002 2.083zm10.467-1.704c-1.274 0-2.549.568-3.004 1.799l1.547.663c.364-.663.91-.852 1.547-.852.91 0 1.729.568 1.82 1.515v.095c-.273-.189-1.001-.473-1.729-.473-1.638 0-3.277.947-3.277 2.651 0 1.609 1.365 2.651 2.821 2.651 1.183 0 1.729-.568 2.184-1.136h.091v.947h1.638v-4.544c-.182-2.083-1.729-3.314-3.641-3.314zm-.182 6.533c-.546 0-1.365-.284-1.365-1.041 0-.947 1.001-1.231 1.82-1.231.728 0 1.092.189 1.547.379-.182 1.136-1.092 1.894-2.002 1.894zm9.557-6.249l-1.911 5.112h-.091l-2.002-5.112h-1.82l3.004 7.195-1.729 3.976h1.729L77 9.639h-1.82zm-15.291 7.574h1.729V5.379h-1.729v11.834z" />
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-market btn-lg btn-light rounded-pill flex-shrink-0" href="#!"
|
<a class="btn btn-market btn-lg btn-light rounded-pill flex-shrink-0" href="https://apps.apple.com/us/app/asiagolf-points/id6633417013"
|
||||||
aria-label="Download on App Store">
|
aria-label="Download on App Store">
|
||||||
<i class="ci-apple lead ms-n1 me-2"></i>
|
<i class="ci-apple lead ms-n1 me-2"></i>
|
||||||
<svg class="flex-shrink-0" xmlns="http://www.w3.org/2000/svg" width="77"
|
<svg class="flex-shrink-0" xmlns="http://www.w3.org/2000/svg" width="77"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue