Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
周少峰
9 years ago
Commit
621079b7725bb24c1d60605091cdbd881cdeb2ab
1 parent
200bfb3a
列表页左侧默认不展示分类,模板文件BK修改
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
8 deletions
library/Plugin/HelperSearch.php
template/www.yohobuy.com/partials/product/filter-box.phtml
yohobuy/www.yohobuy.com/application/models/Product/Search.php
library/Plugin/HelperSearch.php
View file @
621079b
...
...
@@ -89,6 +89,8 @@ class HelperSearch
$result
[
'shopEntry'
]
=
isset
(
$data
[
'shop'
])
&&
!
empty
(
$data
[
'shop'
])
?
self
::
shop
(
$data
[
'shop'
],
$data
[
'sort'
][
'sort'
])
:
array
();
//分页
$result
[
'pager'
]
=
self
::
pager
(
$result
[
'totalCount'
],
$options
[
'viewNum'
]
-
1
);
//浏览记录
$result
[
'latestWalk'
]
=
array
();
//选中条件
$result
[
'filters'
][
'checkedConditions'
]
=
self
::
getSelected
();
if
(
isset
(
$options
[
'controller'
])
&&
$options
[
'controller'
]
==
'Search'
)
{
...
...
@@ -134,7 +136,7 @@ class HelperSearch
if
(
!
empty
(
$val
[
'default_images'
]))
{
$val
[
'default_images'
]
=
Images
::
getImageUrl
(
$val
[
'default_images'
],
$imgSize
[
0
],
$imgSize
[
1
]);
}
$good
s
[]
=
array
(
$good
=
array
(
'tags'
=>
array
(
'isNew'
=>
$isNew
,
'isLimit'
=>
$isLimit
...
...
@@ -143,12 +145,16 @@ class HelperSearch
'thumb'
=>
$val
[
'default_images'
],
'name'
=>
$val
[
'product_name'
],
'salePrice'
=>
$val
[
'sales_price'
],
'marketPrice'
=>
$val
[
'market_price'
],
'isFew'
=>
$isFew
,
'skn'
=>
$val
[
'product_skn'
],
'showColBtn'
=>
true
,
'coled'
=>
true
);
//市场价不等于售价时显示
if
(
$val
[
'market_price'
]
!=
$val
[
'sales_price'
])
{
$good
[
'marketPrice'
]
=
$val
[
'market_price'
];
}
$goods
[]
=
$good
;
}
return
$goods
;
}
...
...
@@ -459,14 +465,14 @@ class HelperSearch
{
$params
=
self
::
$params
;
$paramsValue
=
array_filter
(
$params
);
if
(
!
$isAjax
&&
empty
(
$paramsValue
))
{
return
array
();
}
$sizeId
=
isset
(
$params
[
'size'
])
&&
!
empty
(
$params
[
'size'
])
?
$params
[
'size'
]
:
''
;
if
(
isset
(
$params
[
'size'
]))
{
unset
(
$params
[
'size'
]);
}
$result
=
array
();
if
(
!
$isAjax
&&
empty
(
$paramsValue
))
{
return
array
();
}
if
(
isset
(
$filter
[
'size'
])
&&
!
empty
(
$filter
[
'size'
]))
{
$size
=
$filter
[
'size'
];
foreach
(
$size
as
$k
=>
$v
)
{
...
...
@@ -485,7 +491,7 @@ class HelperSearch
'checked'
=>
isset
(
self
::
$params
[
'size'
])
&&
self
::
$params
[
'size'
]
==
$v
[
'size_id'
]
?
true
:
false
);
}
if
(
self
::
checkSearch
(
'size'
))
{
if
(
self
::
checkSearch
(
'size'
))
{
return
array
();
}
}
...
...
@@ -940,8 +946,8 @@ class HelperSearch
}
if (
$data
) {
$result['conditions']
=
$data
;
$result['clearUrl']
= self::current();
}
$result['clearUrl']
= self::current();
return
$result
;
}
...
...
template/www.yohobuy.com/partials/product/filter-box.phtml
View file @
621079b
...
...
@@ -179,7 +179,7 @@
</div>
{{/if}}
<div class="size section
hide
">
<div class="size section
{{#unless size}}hide{{/unless}}
">
<span class="title">尺码:</span>
<div class="attr-content clearfix">
...
...
yohobuy/www.yohobuy.com/application/models/Product/Search.php
View file @
621079b
...
...
@@ -154,6 +154,7 @@ class SearchModel
//$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']);
$result
=
Yohobuy
::
getMulti
(
$urlList
,
array
(),
true
);
// 组织模板数据
$data
=
HelperSearch
::
getList
(
$result
,
$searchCondition
[
'options'
]);
return
$data
;
...
...
Please
register
or
login
to post a comment