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
OF1706
8 years ago
Commit
f0540fbfedda70155068c6e7edf1c0327f576f96
1 parent
137c3cb6
厂家颜色接口
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
13 deletions
library/WebPlugin/HelperSearch.php
library/WebPlugin/Helpers.php
template/www.yohobuy.com/actions/cart/index/cart.phtml
template/www.yohobuy.com/actions/home/returns/returns-apply.phtml
web-static/sass/me/_order-block.css
yohobuy/www.yohobuy.com/application/models/Home/Order.php
yohobuy/www.yohobuy.com/application/models/Home/Returns.php
library/WebPlugin/HelperSearch.php
View file @
f0540fb
...
...
@@ -822,7 +822,7 @@ class HelperSearch
$color
[
'color_value'
]
=
empty
(
$color
[
'color_value'
])
?
''
:
Helpers
::
getUrlSafe
(
$color
[
'color_value'
]);
$result
[]
=
array
(
'name'
=>
$color
[
'color_name'
],
'name'
=>
$color
[
'
factory_
color_name'
],
'rgb'
=>
empty
(
$color
[
'color_value'
])
?
'#'
.
$color
[
'color_code'
]
:
"url(
{
$color
[
'color_value'
]})
",
'href' => self::buildUrl(array_merge(
$params
, array(
'color' =>
$color['color_id']
...
...
@@ -845,7 +845,7 @@ class HelperSearch
$checked
= true;
}
$result
[] = array(
'name' =>
$v['color_name']
,
'name' =>
$v['
factory_
color_name']
,
'rgb' => empty(
$v['color_value']
) ? '#' .
$v['color_code']
: "
url
({
$v
[
'color_value'
]})
",
'href' => self::buildUrl(array_merge(
$params
, array(
'color' =>
$v['color_id']
...
...
library/WebPlugin/Helpers.php
View file @
f0540fb
...
...
@@ -707,7 +707,8 @@ class Helpers
$oneGoods
[
'isChecked'
]
=
$value
[
'selected'
]
===
'Y'
;
$oneGoods
[
'productTitle'
]
=
$value
[
'product_name'
];
$oneGoods
[
'imgCover'
]
=
!
empty
(
$value
[
'goods_images'
])
?
Images
::
getImageUrl
(
$value
[
'goods_images'
],
60
,
60
)
:
''
;
$oneGoods
[
'productColor'
]
=
$value
[
'color_name'
];
$oneGoods
[
'productColor'
]
=
$value
[
'factory_goods_name'
];
$oneGoods
[
'productSize'
]
=
$value
[
'size_name'
];
$oneGoods
[
'productPrice'
]
=
self
::
transPrice
(
$value
[
'last_vip_price'
]);
//self::transPrice($value['real_price']);
$oneGoods
[
'productNum'
]
=
$value
[
'buy_number'
];
...
...
template/www.yohobuy.com/actions/cart/index/cart.phtml
View file @
f0540fb
...
...
@@ -102,7 +102,7 @@
</a>
<p
class=
"pay-pro-info"
>
<a
href=
"{{link}}"
target=
"_blank"
>
{
{productTitle
}
}</a>
<span>
颜色:
{
{productColor
}
}
尺码:
{
{productSize
}
}</span>
<span>
<b
title=
"{{productColor}}"
>颜色:
{
{productColor
}
}<b>
尺码:
{
{productSize
}
}</span>
<span
class=
"presell"
>上市期:
{
{preSellDate
}
}</span>
</p>
</div>
...
...
template/www.yohobuy.com/actions/home/returns/returns-apply.phtml
View file @
f0540fb
...
...
@@ -45,7 +45,7 @@
</td>
<td
class=
"return-goods-info"
>
<a
href=
"{{href}}"
>
{
{name
}
}</a>
<span>
颜色:
{
{color
}
}
尺码:
{
{size
}
}</span>
<span>
<b
title=
"{{color}}"
>颜色:
{
{color
}
}</b>
尺码:
{
{size
}
}</span>
{
{#if
specialNoticeBo
}
}
<div
class=
"special-tip"
>
<span>
{
{specialNoticeBo.title
}
}
<i
class=
"doubt"
></i></span>
...
...
@@ -178,7 +178,7 @@
</td>
<td
class=
"return-goods-info"
>
<a
href=
"{{href}}"
>
{
{name
}
}</a>
<span>
颜色:
{
{color
}
}
尺码:
{
{size
}
}</span>
<span>
<b
title=
"{{color}}"
>颜色:
{
{color
}
}</b>
尺码:
{
{size
}
}</span>
{
{#if
specialNoticeBo
}
}
<div
class=
"special-tip"
>
<span>
{
{specialNoticeBo.title
}
}
<i
class=
"doubt"
></i></span>
...
...
web-static/sass/me/_order-block.css
View file @
f0540fb
...
...
@@ -77,7 +77,7 @@
display
:
inline-block
;
vertical-align
:
bottom
;
font-weight
:
400
;
max-width
:
1
3
0px
;
max-width
:
1
1
0px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
...
...
yohobuy/www.yohobuy.com/application/models/Home/Order.php
View file @
f0540fb
...
...
@@ -59,7 +59,7 @@ class OrderModel
$goods
[
$gokey
][
'href'
]
=
Helpers
::
getUrlBySkc
(
$goval
[
'product_id'
],
$goval
[
'goods_id'
],
$goval
[
'cn_alphabet'
]);
$goods
[
$gokey
][
'thumb'
]
=
(
isset
(
$goval
[
'goods_image'
])
&&
$goval
[
'goods_image'
])
?
str_replace
(
'quality/80'
,
'quality/90'
,
Images
::
getImageUrl
(
$goval
[
'goods_image'
],
100
,
100
))
:
''
;
$goods
[
$gokey
][
'name'
]
=
$goval
[
'product_name'
];
$goods
[
$gokey
][
'color'
]
=
$goval
[
'color_name'
];
$goods
[
$gokey
][
'color'
]
=
$goval
[
'
factory_
color_name'
];
$goods
[
$gokey
][
'size'
]
=
(
$goval
[
'product_skn'
]
*
1
===
EXHIBITION_TICKET
)
?
''
:
$goval
[
'size_name'
];
$goods
[
$gokey
][
'price'
]
=
$goval
[
'goods_price'
];
$buyNum
=
intval
(
$goval
[
'buy_number'
]);
...
...
@@ -226,7 +226,7 @@ class OrderModel
$detail
[
'goods'
][
$gok
][
'url'
]
=
Helpers
::
getUrlBySkc
(
$gov
[
'product_id'
],
$gov
[
'goods_id'
],
$gov
[
'cn_alphabet'
]);
$detail
[
'goods'
][
$gok
][
'img'
]
=
Images
::
getImageUrl
(
$gov
[
'goods_image'
],
60
,
60
);
$detail
[
'goods'
][
$gok
][
'name'
]
=
$gov
[
'product_name'
];
$detail
[
'goods'
][
$gok
][
'color'
]
=
$gov
[
'color_name'
];
$detail
[
'goods'
][
$gok
][
'color'
]
=
$gov
[
'
factory_
color_name'
];
$detail
[
'goods'
][
$gok
][
'size'
]
=
$gov
[
'size_name'
];
$detail
[
'goods'
][
$gok
][
'price'
]
=
$gov
[
'goods_price'
];
$detail
[
'goods'
][
$gok
][
'coin'
]
=
$gov
[
'yoho_give_coin'
];
...
...
yohobuy/www.yohobuy.com/application/models/Home/Returns.php
View file @
f0540fb
...
...
@@ -201,7 +201,7 @@ class ReturnsModel
$result
[
$key
][
'href'
]
=
Helpers
::
getUrlBySkc
(
$value
[
'product_id'
],
$value
[
'goods_id'
],
$cnAlphabet
);
$result
[
$key
][
'thumb'
]
=
Helpers
::
getImageUrl
(
$value
[
'goods_image'
],
60
,
60
);
$result
[
$key
][
'name'
]
=
$value
[
'product_name'
];
$result
[
$key
][
'color'
]
=
$value
[
'color_name'
];
$result
[
$key
][
'color'
]
=
$value
[
'
factory_
color_name'
];
$result
[
$key
][
'size'
]
=
$value
[
'size_name'
];
}
...
...
@@ -305,7 +305,7 @@ class ReturnsModel
$result
[
'goods'
][
$key
][
'href'
]
=
Helpers
::
getUrlBySkc
(
$value
[
'product_id'
],
$value
[
'goods_id'
],
$cnAlphabet
);
$result
[
'goods'
][
$key
][
'thumb'
]
=
Helpers
::
getImageUrl
(
$value
[
'goods_image'
],
60
,
60
);
$result
[
'goods'
][
$key
][
'name'
]
=
$value
[
'product_name'
];
$result
[
'goods'
][
$key
][
'color'
]
=
$value
[
'color_name'
];
$result
[
'goods'
][
$key
][
'color'
]
=
$value
[
'
factory_
color_name'
];
$result
[
'goods'
][
$key
][
'size'
]
=
$value
[
'size_name'
];
$result
[
'goods'
][
$key
][
'price'
]
=
$value
[
'last_price'
];
$result
[
'goods'
][
$key
][
'skn'
]
=
$value
[
'product_skn'
];
...
...
@@ -399,7 +399,7 @@ class ReturnsModel
$result
[
'goods'
][
$key
][
'href'
]
=
Helpers
::
getUrlBySkc
(
$value
[
'product_id'
],
$value
[
'goods_id'
],
$cnAlphabet
);
$result
[
'goods'
][
$key
][
'thumb'
]
=
Helpers
::
getImageUrl
(
$value
[
'goods_image'
],
60
,
60
);
$result
[
'goods'
][
$key
][
'name'
]
=
$value
[
'product_name'
];
$result
[
'goods'
][
$key
][
'color'
]
=
$value
[
'color_name'
];
$result
[
'goods'
][
$key
][
'color'
]
=
$value
[
'
factory_
color_name'
];
$result
[
'goods'
][
$key
][
'size'
]
=
$value
[
'size_name'
];
$result
[
'goods'
][
$key
][
'price'
]
=
$value
[
'last_price'
];
$result
[
'goods'
][
$key
][
'skn'
]
=
$value
[
'product_skn'
];
...
...
@@ -463,10 +463,14 @@ class ReturnsModel
foreach
(
$v
[
'size_list'
]
as
$k1
=>
$v1
)
{
//遍历颜色得到每个尺码
$num
+=
$v1
[
'storage_number'
];
//将商品颜色对应尺码下的每个商品的库存相加
if
(
$v1
[
'storage_number'
]
>
0
)
{
//当某个尺码下有库存时,将该颜色及其对应的尺码加入该商品选项下
$result
[
'goods'
][
$key
][
'colorSize'
][
$k
][
'color'
]
=
$v
[
'
color
_name'
];
$result
[
'goods'
][
$key
][
'colorSize'
][
$k
][
'color'
]
=
$v
[
'
factory_goods
_name'
];
$result
[
'goods'
][
$key
][
'colorSize'
][
$k
][
'colorId'
]
=
$v
[
'color_id'
];
$result
[
'goods'
][
$key
][
'colorSize'
][
$k
][
'goodsId'
]
=
$v
[
'goods_id'
];
$result
[
'goods'
][
$key
][
'colorSize'
][
$k
][
'sizeList'
][]
=
$v1
;
if
(
$result
[
'goods'
][
$key
][
'colorSize'
][
$k
][
'color'
]
.
length
>
10
){
$result
[
'goods'
][
$key
][
'colorSize'
][
$k
][
'color'
]
=
substr
(
$result
[
'goods'
][
$key
][
'colorSize'
][
$k
][
'color'
],
0
,
10
)
+
'...'
;
}
}
}
}
...
...
Please
register
or
login
to post a comment