diff --git a/template/m.yohobuy.com/actions/index/shoppingCart/order-ensure.phtml b/template/m.yohobuy.com/actions/index/shoppingCart/order-ensure.phtml index cb3ae1b..1de94db 100644 --- a/template/m.yohobuy.com/actions/index/shoppingCart/order-ensure.phtml +++ b/template/m.yohobuy.com/actions/index/shoppingCart/order-ensure.phtml @@ -41,7 +41,7 @@ <section class="block"> <ul class="sale-invoice"> - {{# coupon}} + {{#if coupon}} <li class="coupon"> <a href="/shoppingCart/selectCoupon"> <!-- <a href="{{url}}"> --> @@ -65,7 +65,7 @@ {{/if}} </a> </li> - {{/ coupon}} + {{/if}} {{# yohoCoin}} <li class="coin" data-yoho-coin="{{.}}"> @@ -79,16 +79,16 @@ {{/ yohoCoin}} {{#if invoice}} - <li class="invoice"> + <li class="invoice {{#if needInvoice}}focus{{/if}}"> <span class="title">发票</span> - <span class="iconfont checkbox icon-checkbox"></span> + <span class="iconfont checkbox {{#if needInvoice}}icon-cb-checkbox{{else}}icon-checkbox{{/if}}"></span> <form id="invoice"> - <input type="text" name="invoice-title" value="" placeholder="发票抬头"> + <input type="text" name="invoice-title" value="{{invoiceText}}" placeholder="发票抬头"> <label> 发票类型 <select class="invoice-type" name="invoice-type"> {{# invoice}} - <option value="{{id}}">{{name}}</option> + <option value="{{id}}" {{#if isSelected}}select{{/if}}>{{name}}</option> {{/ invoice}} </select> </label> @@ -98,7 +98,7 @@ </ul> <form id="msg" action="" method="post"> - <input type="text" name="msg" value="" placeholder="留言"> + <input type="text" name="msg" value="{{msg}}" placeholder="留言"> </form> </section> diff --git a/yohobuy/m.yohobuy.com/application/models/Index/Cart.php b/yohobuy/m.yohobuy.com/application/models/Index/Cart.php index 94d1316..c2128d0 100644 --- a/yohobuy/m.yohobuy.com/application/models/Index/Cart.php +++ b/yohobuy/m.yohobuy.com/application/models/Index/Cart.php @@ -428,10 +428,17 @@ class CartModel $result['invoice'][] = $one; } + + // 发票信息需要记录 + // $one['id'] === $orderInfo['invoiceType'] && $one['isSelected'] = true; + // $one['needInvoice'] = $orderInfo['invoiceType']; } + // 留言 + $result['msg'] = $orderInfo['msg']; + // 优惠券数据 - $coupons = array('notUsed' => true); + $coupons = array(); !empty($orderCompute['coupon_amount']) && $coupons['value'] = $orderInfo['couponValue']; $coupons += self::getCouponList($uid, 0, 1, true); $result['coupon'] = $coupons;