Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
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
hf
9 years ago
Commit
0c9272ccdd657e981d92652ff073e2b75f5b19a3
1 parent
887ffd2f
code review by fei.hong: do fixes bug to product brand shops show images
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
16 deletions
template/www.yohobuy.com/actions/product/item/index.phtml
yohobuy/www.yohobuy.com/application/models/Product/Item.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Item.php
template/www.yohobuy.com/actions/product/item/index.phtml
View file @
0c9272c
...
...
@@ -341,15 +341,15 @@
</div>
<div
class=
"material-content"
>
{
{#
material
}
}
{
{#if
d
etail
}
}
{
{#if
materialD
etail
}
}
<ul
class=
"material-detail"
>
{
{#
d
etail
}
}
{
{#
materialD
etail
}
}
<li
class=
"clearfix"
>
<img
src=
"{{img}}"
>
<p
class=
"name"
>
{
{name
}
}<br>
{
{enName
}
}</p>
<p
class=
"text"
>
{
{text
}
}</p>
</li>
{
{/
d
etail
}
}
{
{/
materialD
etail
}
}
</ul>
{
{/if
}
}
...
...
yohobuy/www.yohobuy.com/application/models/Product/Item.php
View file @
0c9272c
...
...
@@ -34,6 +34,7 @@ class ItemModel
$statGoodsInfo
=
array
();
$banner
=
array
();
$baseInfo
=
ItemData
::
baseInfo
(
$productId
,
$uid
,
$productSkn
);
if
(
empty
(
$baseInfo
[
'productName'
])
&&
empty
(
$baseInfo
[
'erpProductId'
])
&&
empty
(
$baseInfo
[
'productPriceBo'
]))
{
return
array
();
}
...
...
@@ -108,7 +109,6 @@ class ItemModel
// 是否收藏
$goodsInfo
[
'isCollect'
]
=
$favoriteData
[
'product'
];
// 限购商品
if
(
$baseInfo
[
'isLimitBuy'
]
===
'Y'
)
{
// 是否开售
...
...
@@ -118,6 +118,7 @@ class ItemModel
if
(
isset
(
$baseInfo
[
'showStatus'
]))
{
$showStatus
=
intval
(
$baseInfo
[
'showStatus'
]);
}
$fashTopGoods
=
self
::
getFashionTopGoodsStatus
(
$uid
,
$showStatus
,
$isBeginSale
);
//潮流尖货状态
$goodsInfo
[
'fashionTopGoods'
]
=
array
(
...
...
@@ -134,8 +135,7 @@ class ItemModel
$goodsInfo
[
'dis'
]
=
$fashTopGoods
[
'dis'
];
//是否失效
$goodsInfo
[
'buyNow'
]
=
$fashTopGoods
[
'buyNow'
];
//是否立即购买
}
}
}
$soldOut
=
$baseInfo
[
'status'
]
==
0
||
$totalStorageNum
===
0
;
$notForSale
=
$baseInfo
[
'attribute'
]
==
2
;
//非卖品
$virtualGoods
=
$baseInfo
[
'attribute'
]
==
3
;
//虚拟商品
...
...
@@ -783,9 +783,9 @@ class ItemModel
if
(
!
empty
(
$sizeInfo
[
'productMaterialList'
]))
{
//商品材质[洗涤说明]
$material
[
'
d
etail'
]
=
array
();
$material
[
'
materialD
etail'
]
=
array
();
foreach
(
$sizeInfo
[
'productMaterialList'
]
as
$value
)
{
$material
[
'
d
etail'
][]
=
array
(
$material
[
'
materialD
etail'
][]
=
array
(
'img'
=>
$value
[
'imageUrl'
],
'name'
=>
$value
[
'caption'
],
'enName'
=>
$value
[
'encaption'
],
...
...
@@ -870,7 +870,7 @@ class ItemModel
foreach
(
$baseInfo
[
'goodsList'
]
as
$pos
=>
$value
)
{
// 如果status为0,即skc下架时就跳过该商品
if
(
$value
[
'status'
]
===
0
)
{
if
(
$value
[
'status'
]
===
0
||
empty
(
$value
[
'colorImage'
])
)
{
continue
;
}
if
(
isset
(
$value
[
'goodsImagesList'
]))
{
...
...
@@ -1177,6 +1177,7 @@ class ItemModel
$result
[
'hasLimitedCode'
]
=
true
;
$result
[
'limitedCodeSoldOut'
]
=
true
;
$result
[
'getLimitedCode'
]
=
false
;
break
;
case
6
:
// 开售前,即将开售(用户已领取限购码)
$result
[
'openSoon'
]
=
true
;
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
0c9272c
...
...
@@ -88,7 +88,7 @@ class IndexController extends WebAction
$nodeContent
=
BrandData
::
getByNodeContent
(
$node
);
if
(
isset
(
$nodeContent
[
'code'
])
&&
$nodeContent
[
'code'
]
==
200
)
{
echo
$nodeContent
[
'data'
];
echo
'<br>'
,
$nodeContent
[
'data'
];
}
}
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Item.php
View file @
0c9272c
...
...
@@ -20,6 +20,7 @@ class ItemController extends WebAction
}
$uid
=
$this
->
getUid
();
$vipLevel
=
-
1
;
$sortNames
=
array
();
if
(
!
empty
(
$this
->
_vip
))
{
$vipLevel
=
Helpers
::
getVipLevel
(
$this
->
_vip
);
}
...
...
@@ -28,10 +29,11 @@ class ItemController extends WebAction
if
(
empty
(
$productInfo
))
{
$this
->
error
();
}
$sortNames
=
array
();
$navs
=
ItemModel
::
getSortNav
(
$productInfo
[
'goodsInfo'
][
'smallSortId'
]);
foreach
(
$navs
as
$nav
)
{
$sortNames
[]
=
$nav
[
'name'
];
if
(
!
empty
(
$navs
))
{
foreach
(
$navs
as
$nav
)
{
$sortNames
[]
=
$nav
[
'name'
];
}
}
$seo
=
$this
->
getSeoByGoodsInfo
(
$productInfo
[
'goodsInfo'
],
$navs
);
$this
->
setTitle
(
$seo
[
'title'
],
true
,
'|'
);
...
...
@@ -83,10 +85,11 @@ class ItemController extends WebAction
if
(
empty
(
$productInfo
))
{
$this
->
error
();
}
$navs
=
ItemModel
::
getSortNav
(
$productInfo
[
'goodsInfo'
][
'smallSortId'
]);
foreach
(
$navs
as
$nav
)
{
$sortNames
[]
=
$nav
[
'name'
];
if
(
!
empty
(
$navs
))
{
foreach
(
$navs
as
$nav
)
{
$sortNames
[]
=
$nav
[
'name'
];
}
}
$seo
=
$this
->
getSeoByGoodsInfo
(
$productInfo
[
'goodsInfo'
],
$navs
);
$this
->
setTitle
(
$seo
[
'title'
],
true
,
'|'
);
...
...
Please
register
or
login
to post a comment