Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
store-locator
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ajay Barthwal
store-locator
Commits
2773a6df
Commit
2773a6df
authored
Aug 20, 2019
by
Arpit Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added feeds in index page
parent
c19f1980
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
24 deletions
+57
-24
SearchController.php
application/app/Http/Controllers/SearchController.php
+7
-2
AppServiceProvider.php
application/app/Providers/AppServiceProvider.php
+4
-0
custom.css
application/public/vendor/frontend/css/custom.css
+2
-1
edit.blade.php
application/resources/views/admin/homepages/edit.blade.php
+7
-6
index.blade.php
application/resources/views/frontend/searchs/index.blade.php
+37
-15
No files found.
application/app/Http/Controllers/SearchController.php
View file @
2773a6df
...
...
@@ -83,14 +83,19 @@ class SearchController extends Controller
}
$getState
=
City
::
where
(
'type'
,
'='
,
'2'
)
->
get
()
->
toarray
();
return
view
(
'frontend.searchs.index'
,
compact
(
'finalData'
,
'links'
,
'meta'
,
'getState'
));
$feedDetail
=
LocaterFeed
::
where
(
'locater_feeds.status'
,
'='
,
'1'
)
->
where
(
'locater_feeds.show_feed'
,
'='
,
'1'
)
->
get
();
return
view
(
'frontend.searchs.index'
,
compact
(
'finalData'
,
'links'
,
'meta'
,
'getState'
,
'feedDetail'
));
}
public
function
searchLocater
(
Request
$request
)
{
$final
=
$this
->
getApiData
(
$request
[
'locality'
],
$request
[
'state'
],
$request
[
'city'
],
$request
[
'location'
],
$request
[
'ratingOrder'
],
$request
[
'page'
]);
if
(
$final
[
'status'
]
==
'success'
){
$finalData
=
$final
[
'data'
][
'finalData'
];
...
...
application/app/Providers/AppServiceProvider.php
View file @
2773a6df
...
...
@@ -31,6 +31,10 @@ class AppServiceProvider extends ServiceProvider
$view
->
with
(
'homepage'
,
\App\Homepage
::
homepage
());
});
view
()
->
composer
(
'frontend.searchs.index'
,
function
(
$view
)
{
$view
->
with
(
'homepage'
,
\App\Homepage
::
homepage
());
});
view
()
->
composer
(
'frontend.searchs.detail'
,
function
(
$view
)
{
$view
->
with
(
'homepage'
,
\App\Homepage
::
homepage
());
});
...
...
application/public/vendor/frontend/css/custom.css
View file @
2773a6df
...
...
@@ -160,5 +160,5 @@ div#localitylist {
opacity: 1;
}*/
.promotion-wrapper
.promotion-wrapper-items
.item
{
min-height
:
329px
!important
;}
\ No newline at end of file
application/resources/views/admin/homepages/edit.blade.php
View file @
2773a6df
...
...
@@ -5,12 +5,12 @@
<
div
class
="
container
-
fluid
">
<div class="">
<div class="
col
-
sm
-
6
">
<h2>
Homepage
Settings</h2>
<h2>Settings</h2>
</div>
<div class="
col
-
sm
-
6
">
<ol class="
breadcrumb
float
-
sm
-
right
">
<li class="
breadcrumb
-
item
"><a href="
#">Home</a></li>
<
li
class
="
breadcrumb
-
item
active
">
Homepage
Settings</li>
<
li
class
="
breadcrumb
-
item
active
">Settings</li>
</ol>
</div>
</div>
...
...
@@ -41,12 +41,13 @@
<!-- Custom Tabs -->
<div class="
nav
-
tabs
-
custom
">
<ul class="
nav
nav
-
tabs
">
<li class="
active
"><a href="
#other" data-toggle="tab" aria-expanded="true">Feed</a></li>
<
li
><
a
href
=
"#tab_1"
data
-
toggle
=
"tab"
aria
-
expanded
=
"false"
>
MAIN
</
a
></
li
>
<li
class="
active
"
><a href="
#tab_1" data-toggle="tab" aria-expanded="false">MAIN</a></li>
<
li
class
=""><
a
href
=
"#tab_2"
data
-
toggle
=
"tab"
aria
-
expanded
=
"false"
>
SEO
</
a
></
li
>
<
li
><
a
href
=
"#other"
data
-
toggle
=
"tab"
aria
-
expanded
=
"true"
>
Feed
</
a
></
li
>
</
ul
>
<
div
class
="
tab
-
content
">
<div class="
tab
-
pane
active
" id="
other
">
<div class="
tab
-
pane
" id="
other
">
<div class="
form
-
group
">
<div class="
form
-
line
">
<?php
...
...
@@ -68,7 +69,7 @@
</div>
</div>
</div>
<div class="
tab
-
pane
" id="
tab_1
">
<div class="
tab
-
pane
active
" id="
tab_1
">
<div class="
form
-
group
@
if
(
$errors
->
first
(
'header_image_normal'
))
{{
' has-error has-feedback'
}}
@
endif
">
<label for="
inputError
" class="
col
-
sm
-
2
control
-
label
">header_image_normal</label>
...
...
application/resources/views/frontend/searchs/index.blade.php
View file @
2773a6df
...
...
@@ -61,6 +61,28 @@
frameborder=
"0"
style=
"border:0"
allowfullscreen
></iframe></div>
</div>
</section>
<?php
if
(
$homepage
->
show_feed
==
1
){
?>
<section
class=
"container promotion-wrapper"
>
<div
class=
"row"
>
<div
class=
"col-12"
>
<section
class=
"promotion-wrapper-items"
>
<?php
foreach
(
$feedDetail
as
$feed
){
?>
<div
class=
"item"
>
<figure><a
href=
"{{ $feed->link }}"
target=
"_blank"
><img
src=
"{{ $feed->image_link }}"
>
</a></figure>
<p
class=
"name"
>
{{ $feed->title }}
</p>
<p
class=
"currency bold"
>
{{ $feed->price }}
</p>
<p
class=
"publisher"
>
{{ $feed->brand }}
</p>
<p
class=
"grey-txt"
>
Sale Price: {{ $feed->sale_price }}
</p>
</div>
<?php
}
?>
</section>
</div>
</div>
</section>
<?php
}
?>
<script
type=
"text/javascript"
>
...
...
@@ -105,11 +127,15 @@
type
:
'post'
,
url
:
"{{route('searchLocater')}}"
,
data
:
{
"_token"
:
"{{ csrf_token() }}"
,
locality
:
locality
,
location
:
location
,
state
:
state
,
city
:
city
,
ratingOrder
:
ratingOrder
},
success
:
function
(
datanew
)
{
loader
();
$
(
'#searchlocaterid'
).
html
(
datanew
.
data
);
$
(
".locality"
).
val
(
locality
);
$
(
".ratingDropDown"
).
val
(
ratingOrder
).
attr
(
"selected"
,
"selected"
);
beforeSend
:
function
()
{
$
(
'.loader-outer-box'
).
show
();
},
success
:
function
(
datanew
)
{
$
(
'.loader-outer-box'
).
hide
();
$
(
'#searchlocaterid'
).
html
(
datanew
.
data
);
$
(
".locality"
).
val
(
locality
);
$
(
".ratingDropDown"
).
val
(
ratingOrder
).
attr
(
"selected"
,
"selected"
);
}
});
});
...
...
@@ -141,9 +167,13 @@
$
.
ajax
({
type
:
'post'
,
url
:
"{{route('searchLocater')}}"
,
data
:
{
"_token"
:
"{{ csrf_token() }}"
,
page
:
page
,
locality
:
locality
,
state
:
state
,
city
:
city
,
location
:
location
,
ratingOrder
:
ratingOrder
},
data
:
{
"_token"
:
"{{ csrf_token() }}"
,
page
:
page
,
locality
:
locality
,
state
:
state
,
city
:
city
,
location
:
location
,
ratingOrder
:
ratingOrder
},
beforeSend
:
function
()
{
$
(
'.loader-outer-box'
).
show
();
},
success
:
function
(
datanew
)
{
loader
();
$
(
'.loader-outer-box'
).
hide
();
$
(
'#searchlocaterid'
).
html
(
datanew
.
data
);
$
(
".locality"
).
val
(
locality
);
$
(
".ratingDropDown"
).
val
(
ratingOrder
).
attr
(
"selected"
,
"selected"
);
...
...
@@ -167,14 +197,6 @@
});
});
function
loader
(){
if
(
$
(
'.loader-outer-box'
).
length
)
{
$
(
'.loader-outer-box'
).
fadeIn
(
'slow'
,
function
()
{
setTimeout
(
function
(){
$
(
'.loader-outer-box'
).
fadeOut
(
'slow'
);
});
});
}
}
</script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment