From 92efc85e53ba7620122bd483774674b89c652dee Mon Sep 17 00:00:00 2001 From: root Date: Fri, 3 Mar 2017 15:44:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=AD=E6=96=87=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/appfront/languages/zh_CN/appfront.php | 251 ++++++++++++++++-- .../Customer/controllers/AjaxController.php | 3 + .../theme/base/front/assets/css/style.css | 7 +- app/appfront/theme/base/front/assets/js/js.js | 6 +- .../catalog/category/index/filter/attr.php | 4 +- .../catalog/category/index/filter/price.php | 2 +- .../category/index/filter/refineby.php | 4 +- .../front/catalog/category/index/toolbar.php | 4 +- .../theme/base/front/cms/home/index.php | 5 +- .../theme/base/front/widgets/breadcrumbs.php | 1 + .../theme/base/front/widgets/footer.php | 2 +- .../theme/base/front/widgets/header.php | 12 +- .../theme/base/front/widgets/topsearch.php | 2 +- services/page/Menu.php | 15 +- 14 files changed, 269 insertions(+), 49 deletions(-) diff --git a/app/appfront/languages/zh_CN/appfront.php b/app/appfront/languages/zh_CN/appfront.php index 3146234ff..cb50a66cc 100644 --- a/app/appfront/languages/zh_CN/appfront.php +++ b/app/appfront/languages/zh_CN/appfront.php @@ -7,28 +7,237 @@ * @license http://www.fecshop.com/license/ */ return [ - 'fecshop' => 'zh_CN app fecshop', - 'Follow Us'=> '关注我们', - 'Follow us in social media'=> '在社交平台关注我们', - 'Sign up for newsletter'=> '订阅邮件', - 'General Links'=> '文字条款', - 'Enter your email adress'=>'输入您的邮箱', + 'fecshop' => 'zh_CN app fecshop', + 'Follow Us' => '关注我们', + 'Follow us in social media' => '在社交平台关注我们', + 'Sign up for newsletter' => '订阅邮件', + 'General Links' => '文字条款', + 'Enter your email adress' =>'输入您的邮箱', - 'Contact Us'=> '联系我们', - 'FAQ'=> '常见问题', - 'Return Policy'=> '退款条约', - 'Privacy Policy'=> '隐私条约', - 'About Us'=> '关于我们', - 'My Favorite'=> '我的收藏', - 'My Reviews'=> '我的评论', - 'My Order'=> '我的订单', - 'My Account'=> '我的账户', - 'Site Map'=> '网站地图', - 'Follow'=> '关注我们', - 'Follow'=> '关注我们', - 'Follow'=> '关注我们', - 'Follow'=> '关注我们', - 'Follow'=> '关注我们', + 'Contact Us' => '联系我们', + 'FAQ' => '常见问题', + 'Return Policy' => '退款条约', + 'Privacy Policy' => '隐私条约', + 'About Us' => '关于我们', + 'My Favorite' => '我的收藏', + 'My Reviews' => '我的评论', + 'My Order' => '我的订单', + 'My Account' => '我的账户', + 'Site Map' => '网站地图', + 'Follow' => '关注我们', + 'Welcome!' => '欢迎您!', + 'Logout' => '退出', + 'Sign In / Join Free' => '登录账户', + 'My Account' => '我的账户', + 'My Orders' => '我的订单', + 'My Favorites' => '我的收藏', + 'Product Review' => '我的评论', + 'Products keyword' => '搜索产品', + 'custom menu' => '自定义菜单', + 'my custom menu 2' => '我的自定义菜单2', + 'my custom menu 3' => '我的自定义菜单3', + 'Home' => '首页', + 'best seller' => '热销产品', + 'featured products' => '特色产品', + 'more' => '更多', + 'Sort By' => '排序', + 'Hot' => '销量', + 'Review' => '评论', + 'Favorite' => '收藏', + 'New' => '上架时间', + '$ Low to High' => '¥ 价格由低到高', + '$ High to Low' => '¥ 价格由高到低', + 'Refine By' => '过滤选项', + 'clear all' => '清空所有过滤', + 'color' => '颜色', + 'size' => '尺码', + + 'one-color' => '单色', + 'red' => '红色', + 'white' => '白色', + 'black' => '黑色', + 'blue' => '蓝色', + 'green' => '绿色', + 'yellow' => '黄色', + 'gray' => '灰色', + 'khaki' => '黄褐色', + + 'ivory' => '象牙色', + 'beige' => '米色', + 'orange' => '橙色', + 'cyan' => '青色', + 'leopard' => '豹纹', + 'camouflage' => '伪装色', + 'silver' => '银白色', + 'pink' => '粉红色', + 'purple' => '紫色', + 'brown' => '棕色', + + 'golden' => '金色', + 'multicolor' => '彩色', + 'white & blue' => '白 & 蓝', + 'white & black' => '白 & 黑', + + + + 'price' => '产品价格', + 'Newsletter' => '订阅邮件', + 'All rights reserved' => '保留所有权利', + 'Copyright Notice' => '版权声明', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + 'Follow' => '关注我们', + ]; \ No newline at end of file diff --git a/app/appfront/modules/Customer/controllers/AjaxController.php b/app/appfront/modules/Customer/controllers/AjaxController.php index e3f7a6b6d..831541afb 100644 --- a/app/appfront/modules/Customer/controllers/AjaxController.php +++ b/app/appfront/modules/Customer/controllers/AjaxController.php @@ -30,8 +30,11 @@ public function actionIndex(){ $result_arr['favorite'] = false; $result_arr['favorite_product_count'] = 0; $product_id = Yii::$app->request->get('product_id'); + $customer_name = ''; if(!Yii::$app->user->isGuest){ $identity = Yii::$app->user->identity; + $customer_name = $identity['firstname'].' '.$identity['lastname']; + $result_arr['customer_name'] = $customer_name; $result_arr['favorite_product_count'] = $identity['favorite_product_count'] ? $identity['favorite_product_count'] : 0; $result_arr['loginStatus'] = true; if($product_id){ diff --git a/app/appfront/theme/base/front/assets/css/style.css b/app/appfront/theme/base/front/assets/css/style.css index 0e6fcb997..521321520 100644 --- a/app/appfront/theme/base/front/assets/css/style.css +++ b/app/appfront/theme/base/front/assets/css/style.css @@ -417,7 +417,6 @@ address, article, aside, audio, canvas, details, figcaption, figure, footer, hea .pro-content { - height: 496px; margin-top: 14px; width: 100%; } @@ -433,7 +432,7 @@ address, article, aside, audio, canvas, details, figcaption, figure, footer, hea .scrollBox { float: right; - height: 496px; + height: 572px; position: relative; width: 1200px; } @@ -2702,9 +2701,9 @@ color:#cc0000; font-size: 18px; } +.sectionBox_h{text-transform:Uppercase} - - +.sectionBox_h.featured{margin-top:20px 0 0 } diff --git a/app/appfront/theme/base/front/assets/js/js.js b/app/appfront/theme/base/front/assets/js/js.js index 091dae873..84d516e80 100644 --- a/app/appfront/theme/base/front/assets/js/js.js +++ b/app/appfront/theme/base/front/assets/js/js.js @@ -36,10 +36,12 @@ $(document).ready(function(){ url:loginInfoUrl, success:function(data, textStatus){ welcome = $('.welcome_str').val(); + logoutStr = $('.logoutStr').val(); if(data.loginStatus){ - str = ''+welcome+''; + customer_name = data.customer_name; + str = ''+welcome+' '+customer_name+','; str += ''; - str += 'Logout'; + str += ''+logoutStr+''; str += ''; $(".login-text").html(str); } diff --git a/app/appfront/theme/base/front/catalog/category/index/filter/attr.php b/app/appfront/theme/base/front/catalog/category/index/filter/attr.php index f1abee0c7..1783b2feb 100644 --- a/app/appfront/theme/base/front/catalog/category/index/filter/attr.php +++ b/app/appfront/theme/base/front/catalog/category/index/filter/attr.php @@ -17,7 +17,7 @@ $attrUrlStr = Yii::$service->url->category->attrValConvertUrlStr($attr); if(is_array($filter) && !empty($filter)){ echo '
'; - echo '
'.$attr.'
'; + echo '
'.Yii::$service->page->translate->__($attr).'
'; echo '
'; foreach($filter as $item){ $val = $item['_id']; @@ -26,7 +26,7 @@ $urlInfo = Yii::$service->url->category->getFilterChooseAttrUrl($attrUrlStr,$val,'p'); $url = $urlInfo['url']; $selected = $urlInfo['selected'] ? 'class="checked"' : ''; - echo ''.$val.'('.$count.')
'; + echo ''.Yii::$service->page->translate->__($val).'('.$count.')
'; } } echo '
'; diff --git a/app/appfront/theme/base/front/catalog/category/index/filter/price.php b/app/appfront/theme/base/front/catalog/category/index/filter/price.php index fb07f443e..c0ba33d63 100644 --- a/app/appfront/theme/base/front/catalog/category/index/filter/price.php +++ b/app/appfront/theme/base/front/catalog/category/index/filter/price.php @@ -18,7 +18,7 @@ $attrUrlStr = Yii::$service->url->category->attrValConvertUrlStr($attr); if(is_array($filter) && !empty($filter)){ echo '
'; - echo '
'.$attr.'
'; + echo '
'.Yii::$service->page->translate->__($attr).'
'; echo '
'; foreach($filter as $item){ $val = $item['val']; diff --git a/app/appfront/theme/base/front/catalog/category/index/filter/refineby.php b/app/appfront/theme/base/front/catalog/category/index/filter/refineby.php index 8dae9bd65..9125aba32 100644 --- a/app/appfront/theme/base/front/catalog/category/index/filter/refineby.php +++ b/app/appfront/theme/base/front/catalog/category/index/filter/refineby.php @@ -1,11 +1,11 @@
-
Refine By
+
page->translate->__('Refine By'); ?>
diff --git a/app/appfront/theme/base/front/catalog/category/index/toolbar.php b/app/appfront/theme/base/front/catalog/category/index/toolbar.php index a1c995341..f309ccb85 100644 --- a/app/appfront/theme/base/front/catalog/category/index/toolbar.php +++ b/app/appfront/theme/base/front/catalog/category/index/toolbar.php @@ -7,12 +7,12 @@ - Sort By: + page->translate->__('Sort By'); ?>: diff --git a/app/appfront/theme/base/front/cms/home/index.php b/app/appfront/theme/base/front/cms/home/index.php index 43f3d8c94..1e9d12135 100644 --- a/app/appfront/theme/base/front/cms/home/index.php +++ b/app/appfront/theme/base/front/cms/home/index.php @@ -10,7 +10,7 @@
cms->staticblock->getStoreContentByIdentify('home-big-img','appfront') ?>
-

BEST SELLERMORE

+

page->translate->__('best seller'); ?>page->translate->__('more'); ?>

+
-

FEATURED PRODUCTSMORE

+
') ?> + page->translate->__($name); ?> diff --git a/app/appfront/theme/base/front/widgets/footer.php b/app/appfront/theme/base/front/widgets/footer.php index 8e30fc763..a47a6fc2c 100644 --- a/app/appfront/theme/base/front/widgets/footer.php +++ b/app/appfront/theme/base/front/widgets/footer.php @@ -83,7 +83,7 @@
-
Copyright Notice ©2016 FecShop.com All rights reserved .
+
page->translate->__('Copyright Notice') ?> ©2016 FecShop.com page->translate->__('All rights reserved') ?> .
diff --git a/app/appfront/theme/base/front/widgets/header.php b/app/appfront/theme/base/front/widgets/header.php index 02e078677..0cbad6b09 100644 --- a/app/appfront/theme/base/front/widgets/header.php +++ b/app/appfront/theme/base/front/widgets/header.php @@ -10,6 +10,8 @@
+ +
@@ -41,7 +43,7 @@
@@ -51,10 +53,10 @@
diff --git a/app/appfront/theme/base/front/widgets/topsearch.php b/app/appfront/theme/base/front/widgets/topsearch.php index 5ec1374e1..cf1466bba 100644 --- a/app/appfront/theme/base/front/widgets/topsearch.php +++ b/app/appfront/theme/base/front/widgets/topsearch.php @@ -1,7 +1,7 @@
- +
diff --git a/services/page/Menu.php b/services/page/Menu.php index 80ac9d438..ee7ba29ec 100644 --- a/services/page/Menu.php +++ b/services/page/Menu.php @@ -64,7 +64,7 @@ protected function actionGetMenuData(){ $display = isset($displayHome['display']) ?$displayHome['display'] : ''; if($enable && $display){ $arr[] = [ - 'name' => $display, + 'name' => Yii::$service->page->translate->__($display), 'url' => Yii::$service->url->homeUrl(), ]; } @@ -98,11 +98,14 @@ protected function customMenuInit($customMenu){ $cMenu = []; if(is_array($customMenu) && !empty($customMenu)){ foreach($customMenu as $k=>$menu){ - $name = $menu['name']; - if(is_array($name)){ - $name = Yii::$service->store->getStoreAttrVal($name,'name'); - $menu['name'] = $name; - } + //echo $menu['name']; + $name = Yii::$service->page->translate->__($menu['name']); + $menu['name'] = $name; + //echo $name; + //if(is_array($name)){ + //$name = Yii::$service->store->getStoreAttrVal($name,'name'); + + //} $urlPath = $menu['urlPath']; $menu['url'] = Yii::$service->url->getUrl($urlPath); $cMenu[$k] = $menu;