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
afcbea37b45f8cf865c2dad5203f9b5726db0366
1 parent
c8a34a6b
shopping-cart -> cart
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
28 deletions
template/m.yohobuy.com/actions/cart/index/gift-advance.phtml
template/m.yohobuy.com/actions/cart/index/index.phtml
template/m.yohobuy.com/partials/shopping-cart/cart-content.phtml → template/m.yohobuy.com/partials/cart/cart-content.phtml
template/m.yohobuy.com/partials/shopping-cart/chose-panel.phtml → template/m.yohobuy.com/partials/cart/chose-panel.phtml
template/m.yohobuy.com/partials/shopping-cart/gift-advance-good.phtml → template/m.yohobuy.com/partials/cart/gift-advance-good.phtml
template/m.yohobuy.com/partials/shopping-cart/good.phtml → template/m.yohobuy.com/partials/cart/good.phtml
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
template/m.yohobuy.com/actions/cart/index/gift-advance.phtml
View file @
afcbea3
...
...
@@ -3,18 +3,18 @@
{
{#
shoppingCart
}
}
{
{#if
gift
}
}
{
{#
gift
}
}
{
{>
shopping-
cart/gift-advance-good
}
}
{
{>
cart/gift-advance-good
}
}
{
{/
gift
}
}
{
{^
}
}
{
{#
advance
}
}
<div
class=
"advance-block"
>
<p
class=
"title"
>
{
{title
}
}</p>
{
{#
goods
}
}
{
{>
shopping-
cart/gift-advance-good
}
}
{
{>
cart/gift-advance-good
}
}
{
{/
goods
}
}
</div>
{
{/
advance
}
}
{
{/if
}
}
{
{/
shoppingCart
}
}
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
{
{>
layout/footer
}
}
...
...
template/m.yohobuy.com/actions/cart/index/index.phtml
View file @
afcbea3
...
...
@@ -27,7 +27,7 @@
{
{#
commonCart
}
}
<div
class=
"cart-content common"
>
{
{>
shopping-
cart/cart-content
}
}
{
{>
cart/cart-content
}
}
</div>
{
{/
commonCart
}
}
...
...
@@ -38,26 +38,12 @@
<span
class=
"txt"
>预售商品全场包邮,到货后立即发货</span>
<span
class=
"txt"
>预售商品不参加活动,不可使用优惠券</span>
</p>
{
{>
shopping-
cart/cart-content
}
}
{
{>
cart/cart-content
}
}
</div>
{
{/
preSellCart
}
}
{
{/
shoppingCart
}
}
</div>
<div
id=
"advanceBuy"
class=
"shopping-cart-page yoho-page hide"
>
{
{#
shoppingCart
}
}
{
{#
commonCart
}
}
{
{#
advanceBuy
}
}
<span>
{
{promotionTitle
}
}
</span>
{
{#
goods
}
}
{
{>
shopping-cart/gift-advance-good
}
}
{
{/
goods
}
}
{
{/
advanceBuy
}
}
{
{/
commonCart
}
}
{
{/
shoppingCart
}
}
</div>
<div
class=
"shopping-cart-zero yoho-page hide"
>
<div
class=
"cart-zero"
>
...
...
@@ -68,5 +54,5 @@
{
{>
product/recommend-for-you
}
}
</div>
{
{>
shopping-cart/chose-panel
}
}
{
{>
layout/footer
}
}
\ No newline at end of file
{
{>
cart/chose-panel
}
}
{
{>
layout/footer
}
}
...
...
template/m.yohobuy.com/partials/
shopping-
cart/cart-content.phtml → template/m.yohobuy.com/partials/cart/cart-content.phtml
View file @
afcbea3
<div class="cart-goods">
{{# goods}}
{{>
shopping-
cart/good}}
{{> cart/good}}
{{/ goods}}
{{# $notValidGoods}}
{{>
shopping-
cart/good}}
{{> cart/good}}
{{/ $notValidGoods}}
</div>
...
...
template/m.yohobuy.com/partials/
shopping-
cart/chose-panel.phtml → template/m.yohobuy.com/partials/cart/chose-panel.phtml
View file @
afcbea3
template/m.yohobuy.com/partials/
shopping-
cart/gift-advance-good.phtml → template/m.yohobuy.com/partials/cart/gift-advance-good.phtml
View file @
afcbea3
template/m.yohobuy.com/partials/
shopping-
cart/good.phtml → template/m.yohobuy.com/partials/cart/good.phtml
View file @
afcbea3
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
afcbea3
...
...
@@ -674,12 +674,12 @@ class CartModel
break
;
}
if
(
$only
AdvanceBuy
)
{
if
(
$only
Gift
)
{
// 赠品
$result
[
'freebie'
]
=
Helpers
::
formatAdvanceGoods
(
$data
[
'gift_list'
]);
break
;
}
if
(
$only
Gift
)
{
if
(
$only
AdvanceBuy
)
{
// 加价购
$result
[
'advanceBuy'
]
=
Helpers
::
formatAdvanceGoods
(
$data
[
'price_gift'
]);
break
;
...
...
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
View file @
afcbea3
...
...
@@ -165,6 +165,7 @@ class IndexController extends AbstractAction
$data
+=
CartModel
::
getCartData
(
$uid
,
$shoppingKey
,
$cartType
,
false
,
true
);
// 渲染模板
var_dump
(
$data
);
$this
->
_view
->
display
(
'gift-advance-good'
,
$data
);
}
...
...
@@ -425,10 +426,10 @@ class IndexController extends AbstractAction
$this
->
echoJson
(
$result
);
}
}
/**
* 加入购物车
*
*
* @param string productSku 商品的SKU
* @param int buyNumber 购买数量
* @param int promotionId 促销ID, 加价购有关
...
...
@@ -460,5 +461,5 @@ class IndexController extends AbstractAction
$this
->
echoJson
(
$result
);
}
}
...
...
Please
register
or
login
to post a comment