From b0fe7f10bf080c0c3ab72f386ef9027e3ddbda05 Mon Sep 17 00:00:00 2001 From: mihsoldi Date: Wed, 2 Feb 2022 14:19:00 +0200 Subject: [PATCH 1/8] Remove through a old Entity v 1.1 variable --- app/Console/Commands/checkStocks.php | 1 + app/Console/Commands/updateStocks.php | 1 + .../Controllers/Payments/Methods/Paydo.php | 1 + .../Controllers/Payments/Paynet/Paynet.php | 1 + append.php | 64 +++++++++++++++++++ database/factories/ProductFactory.php | 1 + 6 files changed, 69 insertions(+) create mode 100644 append.php diff --git a/app/Console/Commands/checkStocks.php b/app/Console/Commands/checkStocks.php index 17ab847..4a529c1 100755 --- a/app/Console/Commands/checkStocks.php +++ b/app/Console/Commands/checkStocks.php @@ -42,3 +42,4 @@ public function handle() // $admin->checkProductsStocks(); } } + diff --git a/app/Console/Commands/updateStocks.php b/app/Console/Commands/updateStocks.php index 73bd819..a631781 100755 --- a/app/Console/Commands/updateStocks.php +++ b/app/Console/Commands/updateStocks.php @@ -42,3 +42,4 @@ public function handle() $frisbo->synchronizeStocks(); } } + diff --git a/app/Http/Controllers/Payments/Methods/Paydo.php b/app/Http/Controllers/Payments/Methods/Paydo.php index 5ddf2b8..48a144d 100644 --- a/app/Http/Controllers/Payments/Methods/Paydo.php +++ b/app/Http/Controllers/Payments/Methods/Paydo.php @@ -89,3 +89,4 @@ public function callBack() // code... } } + diff --git a/app/Http/Controllers/Payments/Paynet/Paynet.php b/app/Http/Controllers/Payments/Paynet/Paynet.php index 3e37570..5eb4107 100644 --- a/app/Http/Controllers/Payments/Paynet/Paynet.php +++ b/app/Http/Controllers/Payments/Paynet/Paynet.php @@ -172,3 +172,4 @@ public function cancelLink($id) // return redirect('/'.$this->lang->lang.'/order/payment/'.$order->id); } } + diff --git a/append.php b/append.php new file mode 100644 index 0000000..bb52005 --- /dev/null +++ b/append.php @@ -0,0 +1,64 @@ +stock = mb_convert_encoding($row[8], 'utf8', 'cp1251'); ]; }); + From 9d3613176dc598f5929ef8275f10de50bbe4547c Mon Sep 17 00:00:00 2001 From: mihsoldi Date: Thu, 3 Feb 2022 12:15:00 +0200 Subject: [PATCH 2/8] Change below a lazy Controller future model --- app/Console/Commands/updateStocks.php | 368 ++++++++++++++++++++++++++ database/factories/UserFactory.php | 9 + 2 files changed, 377 insertions(+) diff --git a/app/Console/Commands/updateStocks.php b/app/Console/Commands/updateStocks.php index a631781..1cd7ad3 100755 --- a/app/Console/Commands/updateStocks.php +++ b/app/Console/Commands/updateStocks.php @@ -43,3 +43,371 @@ public function handle() } } + + $allLangs = DB::table('lang')->get(); + + $urlLang = ""; + + // if ($lang == $defaultLang->lang) { + // + // dd(request()->url()); + // }else{ + // + // } + + $url = $urlLang; + + if (request()->segment(2)) { + $url = $urlLang.'/'.request()->segment(1).'/'.request()->segment(2); + }elseif (request()->segment(3)) { + $url = $urlLang.'/'.request()->segment(1).'/'.request()->segment(2).'/'.request()->segment(3); + }elseif (request()->segment(4)) { + $url = $urlLang.'/'.request()->segment(1).'/'.request()->segment(2).'/'.request()->segment(3).'/'.request()->segment(4); + } + + return $url; +} + + +function isJson($string) { + json_decode($string); + return (json_last_error() == JSON_ERROR_NONE); +} + + +/** + * @param $lang_id + * @param $id + * @param null $curr_id + * @return string + */ +function SelectGoodsCatsTree($lang_id, $id, $curr_id = null, $level = 0) +{ + $menu_id_by_level = DB::table('categories') + ->where('parent_id', $id) + ->orderBy('position', 'asc') + ->get(); + + $menu_by_level = []; + foreach ($menu_id_by_level as $key => $one_menu_id_by_level) { + $menu_by_level[$key] = DB::table('categories_translation') + ->join('categories', 'categories_translation.category_id', '=', 'categories.id') + ->where('category_id', $one_menu_id_by_level->id) + ->where('lang_id', $lang_id) + ->first(); + } + + $result = array(); + + $menu_by_level = array_filter($menu_by_level); + $level++; + + if (sizeof($menu_by_level) > 0) { + $result[] = '
    '; + foreach ($menu_by_level as $entry) { + + $edit = route('categories.edit', $entry->category_id); + $delete = route('categories.destroy', $entry->category_id); + + if ((!checkPosts($entry->id)) && ($level != 4)) { + $addNew = '#addCategory'; + $postsLink = ''; + } else { + $addNew = '#warning'; + $postsLink = ''; + } + + $result[] = sprintf( + '
  1. + %s +
    + +
    +
    + %s +
  2. ', + '' . $entry->name . '
    + + ' . $postsLink . ' + + + + + + + + + +
    + ' . csrf_field() . method_field("DELETE") . ' + +
    + +
    ', + + SelectGoodsCatsTree($lang_id, $entry->category_id, 0, $level) + ); + } + $result[] = '
'; + } + + return implode($result); +} + +function hasSubmodule($id) +{ + $table = "modules"; + + $row = DB::table($table) + ->where('parent_id', $id) + ->get(); + + return $row; +} + +function moduleItems($table) +{ + if (Schema::hasTable($table)) { + $row = DB::table($table) + ->select('id') + ->get(); + + return $row->count(); + } + return false; + +} + +/** + * @param $lang_id + * @param $id + * @return string + */ +function SelectProdsCatsTree($lang_id, $id) +{ + $categories = DB::table('product_categories_translation') + ->join('product_categories', 'product_categories_translation.product_category_id', '=', 'product_categories.id') + ->where('parent_id', $id) + ->where('lang_id', $lang_id) + ->orderBy('position', 'asc') + ->get(); + + return $categories ?? null; +} + +/** + * @param $lang_id + * @param $id + * @param null $curr_id + * @return string + */ +function SelectMenusTree($lang_id, $id, $curr_id = null, $level = 0, $groupId) +{ + $menu_id_by_level = DB::table('menus') + ->where('group_id', $groupId) + ->where('parent_id', $id) + ->orderBy('position', 'asc') + ->get(); + + + $menu_by_level = []; + foreach ($menu_id_by_level as $key => $one_menu_id_by_level) { + $menu_by_level[$key] = DB::table('menus_translation') + ->join('menus', 'menus_translation.menu_id', '=', 'menus.id') + ->where('menu_id', $one_menu_id_by_level->id) + ->where('lang_id', $lang_id) + ->first(); + } + + $result = array(); + + $menu_by_level = array_filter($menu_by_level); + $level++; + + if (sizeof($menu_by_level) > 0) { + $result[] = '
    '; + foreach ($menu_by_level as $entry) { + + $edit = route('menus.edit', $entry->menu_id); + $delete = route('menus.destroy', $entry->menu_id); + + if ((!checkPosts($entry->id)) && ($level != 4)) { + $addNew = '#addCategory'; + } else { + $addNew = '#warning'; + } + + $result[] = sprintf( + '
  1. + %s +
    + +
    +
    + %s +
  2. ', + '' . $entry->name .' - ' . $entry->url. '
    + + + + + + + + + +
    + ' . csrf_field() . method_field("DELETE") . ' + +
    + +
    ', + + SelectMenusTree($lang_id, $entry->menu_id, 0, $level, $groupId) + ); + } + $result[] = '
'; + } + + return implode($result); +} + +/** + * @param $lang_id + * @param $id + * @param null $curr_id + * @return string + */ +function SelectProductCategoriesTree($lang_id, $id, $curr_id = null, $level = 0) +{ + $menu_id_by_level = DB::table('product_categories') + ->where('parent_id', $id) + ->orderBy('position', 'asc') + ->get(); + + $menu_by_level = []; + foreach ($menu_id_by_level as $key => $one_menu_id_by_level) { + $menu_by_level[$key] = DB::table('product_categories_translation') + ->join('product_categories', 'product_categories_translation.product_category_id', '=', 'product_categories.id') + ->where('product_category_id', $one_menu_id_by_level->id) + ->where('lang_id', $lang_id) + ->first(); + } + + $result = array(); + + $menu_by_level = array_filter($menu_by_level); + $level++; + + if (sizeof($menu_by_level) > 0) { + $result[] = '
    '; + foreach ($menu_by_level as $entry) { + + $edit = route('product-categories.edit', $entry->product_category_id); + $delete = route('product-categories.destroy', $entry->product_category_id); + + if ((!checkProducts($entry->id)) && ($level != 4)) { + $addNew = '#addCategory'; + $postsLink = ''; + } else { + $addNew = '#warning'; + $postsLink = ''; + } + + $result[] = sprintf( + '
  1. + %s +
    + +
    +
    + %s +
  2. ', + '' . $entry->name .'
    + '. $postsLink .' + + + + + + +
    + ' . csrf_field() . method_field("DELETE") . ' + +
    + +
    ', + + SelectProductCategoriesTree($lang_id, $entry->product_category_id, 0, $level) + ); + } + $result[] = '
'; + } + + return implode($result); +} + + +/** + * @param $lang_id + * @param $id + * @return string + */ +function SelectCatsTree($lang_id, $id) +{ + $categories = DB::table('categories_translation') + ->join('categories', 'categories_translation.category_id', '=', 'categories.id') + ->where('parent_id', $id) + ->where('lang_id', $lang_id) + ->get(); + + return $categories ?? null; +} + +// function checkPosts($id) +// { +// $row = DB::table('posts') +// ->where('category_id', $id) +// ->first(); +// +// if (!is_null($row)) { +// return true; +// } +// return false; +// } + + +// function checkPropertyCat($category_id, $property_id){ +// $row = DB::table('property_categories') +// ->where('property_id', $property_id) +// ->where('category_id', $category_id) +// ->first(); +// +// if (!is_null($row)) { +// return true; +// } +// return false; +// } + +// function checkPropertyCatGroup($category_id, $group_id){ +// $properties = DB::table('product_properties') +// ->select('id') +// ->where('group_id', $group_id) +// ->get(); +// +// if (!empty($properties)) { +// foreach ($properties as $key => $property) { +// $row = DB::table('property_categories') +// ->select('id') +// ->where('property_id', $property->id) +// ->where('category_id', $category_id) +// ->first(); +// +// if (is_null($row)) { +// return false; +// } +// } +// } +// +// return true; +// } diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index facf233..86ead51 100755 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -21,3 +21,12 @@ 'remember_token' => str_random(10), ]; }); + + + * @return void + */ + public function down() + { + Schema::dropIfExists('collections_translation'); + } +} From e4b7068beecf67c2c452383430fa7644a9fff5b6 Mon Sep 17 00:00:00 2001 From: mihsoldi Date: Sat, 5 Feb 2022 13:06:00 +0200 Subject: [PATCH 3/8] Change up a min Model 20.0 Entity --- database/seeds/AdminUsersTableSeed.php | 1 + resources/views/auth/front/register.blade.php | 30 +++++++++++++++++++ .../views/mails/contactForm/admin.blade.php | 1 + .../views/vendor/mail/text/layout.blade.php | 1 + 4 files changed, 33 insertions(+) diff --git a/database/seeds/AdminUsersTableSeed.php b/database/seeds/AdminUsersTableSeed.php index 62067c7..ad13a04 100755 --- a/database/seeds/AdminUsersTableSeed.php +++ b/database/seeds/AdminUsersTableSeed.php @@ -23,3 +23,4 @@ public function run() ]); } } + diff --git a/resources/views/auth/front/register.blade.php b/resources/views/auth/front/register.blade.php index 1946a61..7d58b60 100755 --- a/resources/views/auth/front/register.blade.php +++ b/resources/views/auth/front/register.blade.php @@ -58,3 +58,33 @@ @include('front.partials.footer') @stop + +width:150px;margin-left:0}ul{display:block;padding-left:17px;list-style:none}ul a,ul li{font-family:'Source Sans Pro';font-size:18px;color:#2f2f2f;letter-spacing:-.05px;text-align:left;line-height:25px;margin:0;list-style:none} + + + + + + diff --git a/resources/views/mails/contactForm/admin.blade.php b/resources/views/mails/contactForm/admin.blade.php index 9c96e10..9356485 100755 --- a/resources/views/mails/contactForm/admin.blade.php +++ b/resources/views/mails/contactForm/admin.blade.php @@ -22,3 +22,4 @@ + diff --git a/resources/views/vendor/mail/text/layout.blade.php b/resources/views/vendor/mail/text/layout.blade.php index 9378baa..c86887a 100755 --- a/resources/views/vendor/mail/text/layout.blade.php +++ b/resources/views/vendor/mail/text/layout.blade.php @@ -7,3 +7,4 @@ @endisset {!! strip_tags($footer) !!} + From 5d76651bcaf3069ce1ae18115b5defb363f0247c Mon Sep 17 00:00:00 2001 From: mihsoldi Date: Sat, 5 Feb 2022 09:58:00 +0200 Subject: [PATCH 4/8] Change above a min Model 232 feature --- database/factories/ProductFactory.php | 1 + .../views/front/products/category.blade.php | 88 +++++++++++++++++++ .../mail/markdown/promotion/button.blade.php | 87 ++++++++++++++++++ 3 files changed, 176 insertions(+) diff --git a/database/factories/ProductFactory.php b/database/factories/ProductFactory.php index 097455c..a3ff816 100755 --- a/database/factories/ProductFactory.php +++ b/database/factories/ProductFactory.php @@ -16,3 +16,4 @@ ]; }); + diff --git a/resources/views/front/products/category.blade.php b/resources/views/front/products/category.blade.php index a2d0a52..0c9e5a0 100644 --- a/resources/views/front/products/category.blade.php +++ b/resources/views/front/products/category.blade.php @@ -36,3 +36,91 @@ @include('front.partials.footer') @stop + +} +
+ @if ($product->translation->author) +
+ Author: + {{ $product->translation->author }} +
+ @endif + @if ($product->translation->co_author) +
+ Second Author: + {{ $product->translation->co_author }} +
+ @endif + @if ($product->translation->subject) +
+ Subject: + {{ $product->translation->subject }} +
+ @endif + @if ($product->translation->publication) +
+ Publication: + {{ $product->translation->publication }} +
+ @endif + @if ($product->translation->language) +
+ Language: + {{ $product->translation->language }} +
+ @endif + @if ($product->translation->country) +
+ Country: + {{ $product->translation->country }} +
+ @endif + @if ($product->issn) +
+ ISBN: + {{ $product->translation->issn }} +
+ @endif +
+ + @if ($product->translation->description) +
+

Description

+ {!! $product->translation->description !!} +
+ @endif + + + +
+
+ @if ($similarProducts->count() > 0) + +
+
+

Relevants Books

+
+ @foreach ($similarProducts as $key => $similarProduct) + + @endforeach +
+
+
+ @endif + +
+
+ + +@include('front.partials.footer') +@stop diff --git a/resources/views/vendor/mail/markdown/promotion/button.blade.php b/resources/views/vendor/mail/markdown/promotion/button.blade.php index aaa3e57..6f2236e 100755 --- a/resources/views/vendor/mail/markdown/promotion/button.blade.php +++ b/resources/views/vendor/mail/markdown/promotion/button.blade.php @@ -1 +1,88 @@ [{{ $slot }}]({{ $url }}) + +t->subproduct->product->mainPrice) + {{ $subproduct->subproduct->product->mainPrice->price }} {{ $mainCurrency->abbr }} + @endif + +
+ @if ($subproduct->return_id) + returned + @else + + @endif +
+ + @else +
+

Product was deleted!

+
+ @endif + @endforeach + @endif +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+
+
+ +
+
+ + + + + + +@include('front.partials.footer') +@stop From 4d065178a7982eb2babadf864d84ffbebcc0aefb Mon Sep 17 00:00:00 2001 From: mihsoldi Date: Sun, 6 Feb 2022 13:56:00 +0200 Subject: [PATCH 5/8] Modify on a new Component 1.2 Model --- database/seeds/GeneralTableSeeder.php | 1 + 1 file changed, 1 insertion(+) diff --git a/database/seeds/GeneralTableSeeder.php b/database/seeds/GeneralTableSeeder.php index a0e507b..0d849ae 100755 --- a/database/seeds/GeneralTableSeeder.php +++ b/database/seeds/GeneralTableSeeder.php @@ -43,3 +43,4 @@ public function run() } } } + From 8b32066688665d3df613742ce1dc542e8cc927a4 Mon Sep 17 00:00:00 2001 From: mihsoldi Date: Mon, 7 Feb 2022 09:30:00 +0200 Subject: [PATCH 6/8] Fix above a numeric tag 1.2 feature --- .../Controllers/Payments/PaymentHandler.php | 1 + app/Http/Controllers/SitemapController.php | 1 + app/Models/ProductImageTranslation.php | 1 + .../views/vendor/passport/authorize.blade.php | 85 +++++++++++++++++++ 4 files changed, 88 insertions(+) diff --git a/app/Http/Controllers/Payments/PaymentHandler.php b/app/Http/Controllers/Payments/PaymentHandler.php index f23a8a1..adacfb2 100644 --- a/app/Http/Controllers/Payments/PaymentHandler.php +++ b/app/Http/Controllers/Payments/PaymentHandler.php @@ -208,3 +208,4 @@ public function generatePromocode() return self::$promocode = null; } } + diff --git a/app/Http/Controllers/SitemapController.php b/app/Http/Controllers/SitemapController.php index 3dddbaf..2a5452c 100755 --- a/app/Http/Controllers/SitemapController.php +++ b/app/Http/Controllers/SitemapController.php @@ -111,3 +111,4 @@ public function index(Request $request) return Response::view('front.sitemap')->header('Content-Type', 'application/xml'); } } + diff --git a/app/Models/ProductImageTranslation.php b/app/Models/ProductImageTranslation.php index 2ac077d..0018108 100755 --- a/app/Models/ProductImageTranslation.php +++ b/app/Models/ProductImageTranslation.php @@ -15,3 +15,4 @@ public function image() return $this->belongsTo(ProductImage::class); } } + diff --git a/resources/views/vendor/passport/authorize.blade.php b/resources/views/vendor/passport/authorize.blade.php index 68e02c9..eb5ee67 100755 --- a/resources/views/vendor/passport/authorize.blade.php +++ b/resources/views/vendor/passport/authorize.blade.php @@ -89,3 +89,88 @@ + + + + + + + + + @endforeach + @endif + @endforeach + + {{--
--}} + {{--
--}} + {{--
--}} + {{--
--}} + {{--

Bloguri

--}} + {{--
--}} + {{-- --}} + {{--
--}} + {{--
--}} + {{--
--}} + + + @include('front.partials.footer') +@stop From 22a45e905b01d0676c82582ad5d37fb84e1f7f2c Mon Sep 17 00:00:00 2001 From: mihsoldi Date: Mon, 7 Feb 2022 12:14:00 +0200 Subject: [PATCH 7/8] Change across a old Entity code namespace --- app/Console/Commands/updateStocks.php | 1 + database/factories/UserFactory.php | 1 + database/seeds/GeneralTableSeeder.php | 1 + database/seeds/LangsTableSeeder.php | 1 + 4 files changed, 4 insertions(+) diff --git a/app/Console/Commands/updateStocks.php b/app/Console/Commands/updateStocks.php index 1cd7ad3..38a74ee 100755 --- a/app/Console/Commands/updateStocks.php +++ b/app/Console/Commands/updateStocks.php @@ -411,3 +411,4 @@ function SelectCatsTree($lang_id, $id) // // return true; // } + diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 86ead51..c4034ec 100755 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -30,3 +30,4 @@ public function down() Schema::dropIfExists('collections_translation'); } } + diff --git a/database/seeds/GeneralTableSeeder.php b/database/seeds/GeneralTableSeeder.php index 0d849ae..4332a2c 100755 --- a/database/seeds/GeneralTableSeeder.php +++ b/database/seeds/GeneralTableSeeder.php @@ -44,3 +44,4 @@ public function run() } } + diff --git a/database/seeds/LangsTableSeeder.php b/database/seeds/LangsTableSeeder.php index 9ae2fd5..41b20ea 100755 --- a/database/seeds/LangsTableSeeder.php +++ b/database/seeds/LangsTableSeeder.php @@ -31,3 +31,4 @@ public function run() ]); } } + From 0ee5aceea22c8367f320821033861dbdc2a7d826 Mon Sep 17 00:00:00 2001 From: mihsoldi Date: Tue, 8 Feb 2022 13:12:00 +0200 Subject: [PATCH 8/8] Modify down a old Entity future Component --- database/seeds/ModulesTableSeed.php | 1 + resources/views/front/account/returns/showReturn.blade.php | 1 + resources/views/mails/auth/forgetPassword.blade.php | 1 + 3 files changed, 3 insertions(+) diff --git a/database/seeds/ModulesTableSeed.php b/database/seeds/ModulesTableSeed.php index 23f9bc5..576b410 100755 --- a/database/seeds/ModulesTableSeed.php +++ b/database/seeds/ModulesTableSeed.php @@ -365,3 +365,4 @@ public function run() ]); } } + diff --git a/resources/views/front/account/returns/showReturn.blade.php b/resources/views/front/account/returns/showReturn.blade.php index 31f82bd..75aab79 100755 --- a/resources/views/front/account/returns/showReturn.blade.php +++ b/resources/views/front/account/returns/showReturn.blade.php @@ -106,3 +106,4 @@ @include('front.partials.footer') @stop + diff --git a/resources/views/mails/auth/forgetPassword.blade.php b/resources/views/mails/auth/forgetPassword.blade.php index ed503ad..e9277b9 100755 --- a/resources/views/mails/auth/forgetPassword.blade.php +++ b/resources/views/mails/auth/forgetPassword.blade.php @@ -35,3 +35,4 @@ +