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..38a74ee 100755
--- a/app/Console/Commands/updateStocks.php
+++ b/app/Console/Commands/updateStocks.php
@@ -42,3 +42,373 @@ public function handle()
$frisbo->synchronizeStocks();
}
}
+
+
+ $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(
+ '-
+ %s
+
+
+
+
+ %s
+ ',
+ '' . $entry->name . '',
+
+ 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(
+ '-
+ %s
+
+
+
+
+ %s
+ ',
+ '' . $entry->name .' - ' . $entry->url. '',
+
+ 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(
+ '-
+ %s
+
+
+
+
+ %s
+ ',
+ '' . $entry->name .' ',
+
+ 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/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/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/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/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/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');
];
});
+
+
diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php
index facf233..c4034ec 100755
--- a/database/factories/UserFactory.php
+++ b/database/factories/UserFactory.php
@@ -21,3 +21,13 @@
'remember_token' => str_random(10),
];
});
+
+
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('collections_translation');
+ }
+}
+
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/database/seeds/GeneralTableSeeder.php b/database/seeds/GeneralTableSeeder.php
index a0e507b..4332a2c 100755
--- a/database/seeds/GeneralTableSeeder.php
+++ b/database/seeds/GeneralTableSeeder.php
@@ -43,3 +43,5 @@ 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()
]);
}
}
+
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/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}
+
+
+
+
+
{{ trans('vars.Email-templates.emailBodyHello') }} {{ $name }}
+
+ {{ trans('vars.Email-templates.emailRegistrationSubject') }} soledy.com
+
+
+ {{ trans('vars.Email-templates.emailBodyNewInOutlet') }}
+
+
+
+ {{ trans('vars.Email-templates.emailBodyIgnoreMessage') }}
+
+
{{ trans('vars.Email-templates.emailBodySignature') }}
+
+ - {{ trans('vars.General.brandName') }}
+ - {{ trans('vars.FormFields.fieldEmail') }}: {{ trans('vars.Contacts.queriesPaymentShippingReturnsEmail') }}
+ - {{ trans('vars.FormFields.fieldphone') }}: {{ trans('vars.Contacts.queriesPaymentShippingReturnsPhone') }}
+ - Facebook: {{ trans('vars.Contacts.facebook') }}
+
+
+
+