diff --git a/app/Models/User.php b/app/Models/User.php index c8dd1a8..872cdf2 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -62,6 +62,10 @@ class User extends Authenticatable { return $this->hasMany(Address::class); } + public function primary_address() + { + return $this->hasOne(Address::class)->where('is_primary', true); + } public function getPhotoUrlAttribute() { diff --git a/resources/views/components/grocery/popular-products.blade.php b/resources/views/components/grocery/popular-products.blade.php index 9351f88..fd7ee72 100644 --- a/resources/views/components/grocery/popular-products.blade.php +++ b/resources/views/components/grocery/popular-products.blade.php @@ -53,7 +53,7 @@ aria-label="Add to Wishlist"> - +
Image
@@ -82,8 +82,8 @@
{{ $value->display_price_currency }}

- {{ $value->name }} + {{ $value->name }}

{{ $value->unit }}
diff --git a/resources/views/components/grocery/special-products.blade.php b/resources/views/components/grocery/special-products.blade.php index 090302c..923915a 100644 --- a/resources/views/components/grocery/special-products.blade.php +++ b/resources/views/components/grocery/special-products.blade.php @@ -61,7 +61,7 @@ aria-label="Add to Wishlist"> - +
Image
@@ -91,7 +91,7 @@
{{ $value->display_price_currency }}

{{ $value->name }} + href="{{ route('product.detail', $value->slug) }}">{{ $value->name }}

@if ($value->variants->count() > 1) diff --git a/resources/views/components/layout/header-grocery.blade.php b/resources/views/components/layout/header-grocery.blade.php index f1dfb2c..28a346a 100644 --- a/resources/views/components/layout/header-grocery.blade.php +++ b/resources/views/components/layout/header-grocery.blade.php @@ -34,7 +34,7 @@ - --}} + + + @@ -109,20 +120,35 @@ + href="{{ auth()->check() ? route('profile') : route('login') }}"> - Account + {{ __('header.account') }} + + + - + --}} + + + @if (auth()->check() && \App\Repositories\Member\Cart\MemberCartRepository::getCount() > 0) + {{ auth()->check() ? \App\Repositories\Member\Cart\MemberCartRepository::getCount() : 0 }} + @endif + + + diff --git a/resources/views/home/grocery.blade.php b/resources/views/home/grocery.blade.php index 50b594a..d16ebc9 100644 --- a/resources/views/home/grocery.blade.php +++ b/resources/views/home/grocery.blade.php @@ -168,7 +168,7 @@

Make online shop easier with our AsiaGolf App

- @@ -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" /> -