From 841250f3c999694dabcdd97f38daac2c318f4fd4 Mon Sep 17 00:00:00 2001 From: A1Gard Date: Sun, 4 Jun 2023 06:33:51 +0330 Subject: [PATCH 1/2] fix fast buy card --- app/Http/Controllers/WebsiteController.php | 6 ++++-- resources/views/component/card-quantity.blade.php | 4 ++-- resources/views/website/card.blade.php | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/WebsiteController.php b/app/Http/Controllers/WebsiteController.php index 17a066a..dcc85bf 100755 --- a/app/Http/Controllers/WebsiteController.php +++ b/app/Http/Controllers/WebsiteController.php @@ -663,8 +663,10 @@ class WebsiteController extends Controller ->get(); foreach ($qs as $q){ $p = Product::whereId($q->product_id)->first(); - $p->stock_quantity = $q->count; - $p->save(); + if ($p != null){ + $p->stock_quantity = $q->count; + $p->save(); + } } return 'Done!'; } diff --git a/resources/views/component/card-quantity.blade.php b/resources/views/component/card-quantity.blade.php index fef9395..11a0d00 100755 --- a/resources/views/component/card-quantity.blade.php +++ b/resources/views/component/card-quantity.blade.php @@ -1,7 +1,7 @@ -
- getPurePriceDef($q->price) == $pro->getPurePrice()) checked @endif> + @foreach(\App\Helpers\jsonOrder( $q->data ) as $k => $meta) @if($k != 'color' && $k != 'count' && $k != 'price') diff --git a/resources/views/website/card.blade.php b/resources/views/website/card.blade.php index 819c9a2..cbf272d 100755 --- a/resources/views/website/card.blade.php +++ b/resources/views/website/card.blade.php @@ -68,9 +68,9 @@ @if($pro->quantities()->sum('count') > 0) - @foreach($pro->quantities as $q) + @foreach($pro->quantities as $index => $q) @if($q->count > 0) - @include('component.card-quantity',compact('q','pro')) + @include('component.card-quantity',compact('q','pro','$index')) @endif @endforeach @else From 50829fff920bc41a5704792fe208cdb349c5aef1 Mon Sep 17 00:00:00 2001 From: A1Gard Date: Sun, 4 Jun 2023 06:34:16 +0330 Subject: [PATCH 2/2] added logo and composer --- README.md | 8 +- composer.json | 9 +- media/xstack-shop-logo.svg | 675 +++++++++++++++++++++++++++++++++++++ 3 files changed, 690 insertions(+), 2 deletions(-) create mode 100644 media/xstack-shop-logo.svg diff --git a/README.md b/README.md index 558d535..afb576f 100755 --- a/README.md +++ b/README.md @@ -1 +1,7 @@ -## Xshop +
+ xshop logo +
+ +#xShop + +x-shop is an open source shop developed in laravel, very customizable! diff --git a/composer.json b/composer.json index b04202b..ff7a66f 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,14 @@ "name": "laravel/laravel", "type": "project", "description": "The Laravel Framework.", - "keywords": ["framework", "laravel"], + "keywords": [ + "shop", + "persian shop", + "open soruce shop", + "xshop", + "framework", + "laravel" + ], "license": "GPL-3.0-or-later", "require": { "php": "^8.0.2", diff --git a/media/xstack-shop-logo.svg b/media/xstack-shop-logo.svg new file mode 100644 index 0000000..5dd15b1 --- /dev/null +++ b/media/xstack-shop-logo.svg @@ -0,0 +1,675 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + +