From f44fa687975ec0f997c3ac2d41e0f8668a6d4639 Mon Sep 17 00:00:00 2001
From: Frank John Begornia
Date: Fri, 5 Jan 2024 20:58:19 +0800
Subject: [PATCH] updated
---
.../teamstore/TeamStoreController.php | 67 +++
app/Http/routes.php | 2 +
public/assets/css/merchbay/styles-stores.css | 395 ++++++++++++++++++
resources/views/merchbay/index.blade.php | 4 +-
resources/views/merchbay/stores.blade.php | 162 +++++++
resources/views/merchbay_main.blade.php | 1 +
6 files changed, 629 insertions(+), 2 deletions(-)
create mode 100755 public/assets/css/merchbay/styles-stores.css
create mode 100755 resources/views/merchbay/stores.blade.php
diff --git a/app/Http/Controllers/teamstore/TeamStoreController.php b/app/Http/Controllers/teamstore/TeamStoreController.php
index 3d588ac..f337d1f 100755
--- a/app/Http/Controllers/teamstore/TeamStoreController.php
+++ b/app/Http/Controllers/teamstore/TeamStoreController.php
@@ -161,6 +161,73 @@ class TeamStoreController extends Controller
->with('thumbnails', $thumbnails);
}
+ public function storeIndex(Request $request)
+ {
+ // $analyticsData = Analytics::getMostVisitedPages(14, 50);
+
+ // foreach($analyticsData as $key => $val){
+ // if (strpos($val['url'], 'teamstore') !== false) {
+ // $teamstore[] = $val['url'];
+ // }
+ // }
+
+ // foreach($teamstore as $t){
+ // $sad = explode('/', $t);
+
+ // if(count($sad) == 4){
+ // $arr_teamstore[] = explode('?', $sad['3'])['0'];
+
+ // }
+ // }
+
+ // var_dump(array_unique($arr_teamstore));
+
+ $m = new TeamStoreModel;
+ $q = $request->input('q');
+ $sort = $request->input('s');
+
+ if (isset($q) && isset($sort)) {
+
+ if ($sort == "latest") {
+ $field = "Id";
+ $sort_value = "DESC";
+ } elseif ($sort == "al-desc") {
+ $field = "StoreName";
+ $sort_value = "DESC";
+ } elseif ($sort == "oldest") {
+ $field = "Id";
+ $sort_value = "ASC";
+ } else {
+ $field = "StoreName";
+ $sort_value = "ASC";
+ }
+
+ if ($q != "") {
+ // keyword and sort
+ $stores_array = $m->selectTeamstoreSearch($field, $sort_value, $q);
+ } else {
+ // sort only
+ $stores_array = $m->selectTeamstoreFilter($field, $sort_value);
+ }
+ } else {
+ $field = "StoreName";
+ $sort_value = "ASC";
+ $sort = "al-asc";
+ $stores_array = $m->selectTeamstoreFilter($field, $sort_value);
+ }
+
+ $getCarousel = $m->getCarousel();
+ // var_dump($getCarousel);
+
+ $featured_products = $m->selectFeaturedProducts();
+ return view('merchbay.stores')
+ ->with('stores_array', $stores_array)
+ ->with('keyword', $q)
+ ->with('filter', $sort)
+ ->with('carousel_images', $getCarousel)
+ ->with('featured_products', $featured_products);
+ }
+
public function storelist(Request $request)
{
// $analyticsData = Analytics::getMostVisitedPages(14, 50);
diff --git a/app/Http/routes.php b/app/Http/routes.php
index 5d1a5d9..b05809f 100755
--- a/app/Http/routes.php
+++ b/app/Http/routes.php
@@ -81,6 +81,8 @@ Route::get('/', 'teamstore\TeamStoreController@storelist'); // old
// Route::group(['middleware' => 'teamstoresession'], function () {
+Route::get('/stores', 'teamstore\TeamStoreController@storeIndex');
+
Route::get('/store/{storename}', 'teamstore\TeamStoreController@index');
Route::get('/store/{storename}/product/{producurl}', 'teamstore\TeamStoreController@productDetails');
// Route::post('/teamstore/q/addnewrow', 'teamstore\TeamStoreController@addNewRow');
diff --git a/public/assets/css/merchbay/styles-stores.css b/public/assets/css/merchbay/styles-stores.css
new file mode 100755
index 0000000..0daff55
--- /dev/null
+++ b/public/assets/css/merchbay/styles-stores.css
@@ -0,0 +1,395 @@
+html,
+body {
+ width: 100%;
+ height: 100%;
+ font-family: "Montserrat", sans-serif !important;
+ background-color: #f5f5f6;
+ font-size: 0.9rem;
+}
+
+a {
+ text-decoration: none;
+ color:#000000;
+}
+
+.bg-black {
+ background-color: #000;
+}
+
+.navbar-brand span {
+ font-weight: 900;
+}
+
+.navbar-brand > img {
+ height: 28px !important;
+}
+
+.btn-white-outline {
+ color: #ffffff;
+ border-color: #ffffff;
+ font-size: 0.7rem !important;
+}
+
+.btn-white-outline:hover {
+ color: #000000;
+ border-color: #ffffff;
+ background-color: #ffffff;
+ font-size: 0.7rem !important;
+}
+
+.btn-black-outline {
+ color: #ffffff;
+ border-color: #ffffff;
+ font-size: 0.7rem !important;
+}
+
+.btn-navbar-cart {
+ color: #fff;
+ background-color: transparent;
+ border-color: transparent;
+}
+
+.btn-navbar-cart:hover {
+ color: #fff;
+ background-color: transparent;
+ border-color: transparent;
+}
+
+/* .container {
+ padding-right: 0px !important;
+ padding-left: 0px !important;
+} */
+
+.btn-green {
+ color: #fff;
+ background-color: #28a745;
+ border-color: #28a745;
+}
+
+.btn-green:hover {
+ color: #28a745;
+ background-color: #fff;
+ border-color: #28a745;
+}
+
+.btn-black {
+ color: #fff;
+ background-color: #000000;
+ border-color: #000000;
+}
+
+.btn-black:hover {
+ color: rgb(0, 0, 0);
+ background-color: transparent;
+ border-color: #000000;
+}
+
+.added-or {
+ position: relative;
+}
+
+.added-or::before {
+ content: "or";
+ position: absolute;
+ display: inline-block;
+ padding: 5px;
+ margin-right: 48px;
+ left: -15px;
+ font-size: 1rem;
+}
+
+.navbar-auth-buttons a {
+ line-height: 1.9;
+}
+
+.wrapper {
+ min-height: 100vh;
+}
+
+.copyright {
+ margin-bottom: -5px;
+ font-size: 0.7rem;
+}
+
+
+.main__banner {
+ padding-top: 66px;
+}
+
+.store-logo {
+ height: 165px;
+ display: inline-block;
+ /* border: 1px solid #e2e2e2; */
+ position: relative;
+}
+
+.store-locked{
+ background-color: rgb(0 0 0 / 60%);
+ height: 100%;
+ width: 100%;
+ top: 0;
+ left: 0;
+ position: absolute;
+ padding: 67px;
+ text-align: center;
+}
+
+.store-locked > i {
+ font-size: 2rem;
+ color: #ffffff;
+}
+
+.store-logo img {
+ object-fit: contain;
+ width: 100%;
+ max-height: 250px;
+ height: 165px;
+ top: 0;
+ bottom: 0;
+ margin: auto;
+ /* padding: 5px; */
+ box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
+}
+
+.product-image img {
+ object-fit: contain;
+ width: 100%;
+ max-height: 250px;
+ padding: 5px;
+}
+
+.store-name,
+.product-name {
+ font-size: 0.8rem;
+ font-weight: 600;
+ padding: 5px;
+ color: #000000;
+}
+
+.product-name-display h3 {
+ font-weight: 600;
+}
+
+.product-price {
+ font-size: 1rem;
+ font-weight: 700;
+ padding: 0px 5px;
+ margin: -5px 0px;
+}
+
+.product-price-display div {
+ font-size: 1.5rem;
+ font-weight: 600;
+ color: #9a9a9a;
+ margin-right: 5px;
+ margin-top: -5px;
+}
+
+.store a {
+ text-decoration: none;
+ color: #2c2c2c;
+}
+
+.product a {
+ text-decoration: none;
+}
+
+.store-banner {
+ /* background-color: #000000; */
+ height: auto;
+ object-fit: contain;
+}
+
+.please-read-title,
+.disclaimer, .announcement {
+ font-size: 0.8rem;
+ color: #000000;
+ font-weight: bold;
+ padding: 0px;
+ margin: 0px;
+ padding-left: 1.3rem;
+}
+
+.disclaimer-message {
+ font-size: 0.7rem;
+ color: #ffffff;
+ padding: 0px;
+ margin: 0px;
+ padding-left: 1.3rem;
+}
+
+.announcement-message {
+ font-size: 0.7rem;
+ color: #ffffff;
+ padding: 0px;
+ margin: 0px;
+ padding-left: 1.3rem;
+}
+.please-read li {
+ font-size: 0.7rem;
+ color: #858585;
+}
+
+.bg-black {
+ background-color: #000000;
+}
+
+.bg-announcement {
+ background-color: #000000;
+}
+
+.navbar-toggler {
+ border: 1px solid #fff !important;
+}
+
+.nav-link {
+ padding: 0.25rem 0.5rem !important;
+ line-height: 1rem;
+}
+
+.sort-by {
+ text-align: right;
+}
+
+.custom-hr {
+ background-color: #e3e3e3 !important;
+ height: 2px !important;
+}
+
+a.btn-white-outline.nuxt-link-exact-active {
+ background-color: #fff;
+ color: #000;
+}
+
+.product-price > .previous-price {
+ margin-right: 10px;
+}
+
+.product-price > .current-price {
+ color: #e01414;
+ font-size: 1.1rem;
+}
+
+.breadcrumb-item a {
+ color: #9a9a9a !important;
+ text-decoration: none;
+ font-weight: 500;
+}
+
+.breadcrumb-item.active {
+ color: #9a9a9a !important;
+}
+
+.breadcrumb-item + .breadcrumb-item::before {
+ color: #9a9a9a !important;
+}
+
+.adbg {
+ background-color: #bdc6c5;
+}
+
+span.designer-text {
+ color: #b90a0c;
+}
+
+.product-active-thumbnail {
+ height: 400px;
+}
+
+@media (max-width: 992px) {
+ .footer-menu {
+ text-align: center;
+ }
+
+ .copyright {
+ text-align: center;
+ }
+
+ .added-or::before {
+ display: none;
+ }
+
+ .navbar-collapse.collapsing .navbar-nav {
+ display: block;
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: -45%;
+ transition: all 0.2s ease;
+ }
+
+ .navbar-nav {
+ background-color: #fff;
+ }
+
+ .navbar-collapse.show .navbar-nav {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ flex-direction: column;
+ height: 100vh;
+ width: 65%;
+ transition: left 0.35s ease;
+ box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
+ z-index: 9999;
+ }
+
+ .navbar-nav .nav-link {
+ padding-right: 1rem;
+ padding-left: 1rem;
+ }
+
+ .nav-item {
+ padding-left: 1rem;
+ padding-right: 1rem;
+ padding-top: 0.8rem;
+ }
+ .store-logo img {
+ /* max-height: 100%; */
+ height: 150px;
+ object-fit: contain;
+ box-shadow: unset;
+ /* width: 1; */
+ }
+
+ .store-name {
+ text-align: center;
+ }
+
+ .product-image img {
+ max-height: 100%;
+ }
+
+ .sort-by {
+ text-align: left;
+ }
+
+ .product-active-thumbnail {
+ height: 345px;
+ }
+
+ .btn-white-outline {
+ color: #000000;
+ border-color: #000000;
+ }
+
+ .btn-white-outline:hover {
+ color: #ffffff;
+ border-color: #000000;
+ background-color: #000000;
+ }
+
+ .bi.bi-cart-fill {
+ color: #000000;
+ }
+
+ /* footer {
+ height: inherit;
+ }
+
+ .footer-socials-icons{
+ text-align: center;
+ margin-top: 5px;
+ } */
+}
diff --git a/resources/views/merchbay/index.blade.php b/resources/views/merchbay/index.blade.php
index 4cb735d..c888e74 100755
--- a/resources/views/merchbay/index.blade.php
+++ b/resources/views/merchbay/index.blade.php
@@ -15,10 +15,10 @@