Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
郝肖肖
9 years ago
Commit
8ce59aac162fee2eea2ba17ee47b9ea77f175c1f
1 parent
fa42107e
多品店 搜索
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
library/WebPlugin/HelperSearch.php
yohobuy/www.yohobuy.com/application/models/Product/Search.php
library/WebPlugin/HelperSearch.php
View file @
8ce59aa
...
...
@@ -180,7 +180,6 @@ class HelperSearch
if
(
isset
(
$data
[
'shopData'
])
&&
!
empty
(
$data
[
'shopData'
]))
{
$result
[
'shopEntry'
]
=
array
();
foreach
(
$data
[
'shopData'
]
as
$val
)
{
$val
[
'shop'
][
'shop_id'
]
=
empty
(
$val
[
'shop'
][
'shop_id'
])
?
''
:
$val
[
'shop'
][
'shop_id'
];
$shopSort
=
self
::
shop
(
$val
[
'shop'
],
$val
[
'shopSort'
]);
if
(
empty
(
$shopSort
))
{
continue
;
...
...
@@ -1450,6 +1449,8 @@ class HelperSearch
if (self::
$total
== 0 || empty(
$shopSort
)) {
return
$shopEntry
;
}
$shop['shop_id']
= empty(
$shop['shop_id']
) ? '' :
$shop['shop_id']
;
$url
= Helpers::url('', array('shopId' =>
$shop['shop_id']
),
$shop['brand_domain']
);
$sort
= array();
$sortInfo
= array();
...
...
@@ -1462,7 +1463,7 @@ class HelperSearch
break 2;
}
$sortInfo
= array();
$sortInfo['href']
= "
{
$url
}
/?msort=
{
$msort
[
'sort_id'
]}
&
misort
=
{
$misort
[
'sort_id'
]}
&
shopId
=
{
$shop
[
'shop
_id'
]}
";
$sortInfo['href']
= "
{
$url
}
&msort=
{
$msort
[
'sort_id'
]}
&
misort
=
{
$misort
[
'sort
_id'
]}
";
$sortInfo['name']
=
$misort['sort_name']
;
$sort
[] =
$sortInfo
;
}
...
...
yohobuy/www.yohobuy.com/application/models/Product/Search.php
View file @
8ce59aa
...
...
@@ -239,12 +239,19 @@ class SearchModel
$data
[
'shopData'
]
=
array
();
$shopsByBrands
=
SearchData
::
getQueryShopsByBrandId
(
$data
[
'shop'
][
'id'
]);
if
(
!
empty
(
$shopsByBrands
[
'data'
])
&&
is_array
(
$shopsByBrands
[
'data'
]))
{
//多品店 店铺入口
foreach
(
$shopsByBrands
[
'data'
]
as
$val
)
{
$shopSort
=
SearchData
::
getClassesData
(
array
(
'brand'
=>
$val
[
'brand_id'
]));
if
(
isset
(
$shopSort
[
'code'
])
&&
$shopSort
[
'code'
]
==
200
)
{
$data
[
'shopData'
][]
=
array
(
'shop'
=>
$val
,
'shopSort'
=>
$shopSort
[
'data'
][
'sort'
]);
}
}
}
else
{
//品牌入口
$shopSort
=
SearchData
::
getClassesData
(
array
(
'brand'
=>
$data
[
'shop'
][
'id'
]));
if
(
isset
(
$shopSort
[
'code'
])
&&
$shopSort
[
'code'
]
==
200
)
{
$data
[
'shopData'
][]
=
array
(
'shop'
=>
$data
[
'shop'
],
'shopSort'
=>
$shopSort
[
'data'
][
'sort'
]);
}
}
}
// 组织模板数据
...
...
Please
register
or
login
to post a comment