Catalog.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. *
  7. * @copyright Copyright (c) 2016 FecShop Software LLC
  8. * @license http://www.fecshop.com/license/
  9. */
  10. return [
  11. 'catalog' => [
  12. /**
  13. * Yii2 controllerMap 重写机制。
  14. */
  15. //'controllerMap' => [
  16. // 'category' => 'appfront\local\local_modules\Catalog\controllers\CategoryController',
  17. //],
  18. 'params'=> [
  19. //##############################
  20. //# category部分设置 ##
  21. //##############################
  22. //'category_breadcrumbs' => true, // 分类页面:是否显示分类的面包屑导航。
  23. //'product_breadcrumbs' => true, // 产品页面:是否显示产品的面包屑导航。
  24. /*
  25. * 注意:做侧栏分类产品过滤的属性,必须是select类型的,其他的类型请不要用,
  26. * 对于select类型,目前不支持多语言数据库存储,select类型的各个值是通过前端翻译文件来实现翻译的、
  27. * 对于color size 对应的保存值,只可以使用 '数字','字符','空格','&','-','_' 这6类字符
  28. */
  29. 'category_filter_attr' => [
  30. 'color', 'size',
  31. ],
  32. 'category_filter_category' => true,
  33. 'category_filter_price' => true,
  34. 'category_query' => [
  35. // 放到第一个的就是默认值,譬如下面的30
  36. 'numPerPage' => [12, 30, 60, 90], // 产品显示个数的列举
  37. // 放到第一个的就是默认值,譬如下面的hot
  38. 'sort' => [ // 所有排序方式
  39. // 下面的譬如hot new low-to-high 只能用 字母,数组,-,_ 这4种字符。
  40. 'hot' => [
  41. 'label' => 'Hot', // 显示的字符
  42. 'db_columns' => 'score', // 对应数据库的字段
  43. 'direction' => 'desc', // 排序方式
  44. ],
  45. 'review_count' => [
  46. 'label' => 'Review', // 显示的字符
  47. 'db_columns' => 'review_count', // 对应数据库的字段
  48. 'direction' => 'desc', // 排序方式
  49. ],
  50. 'favorite_count' => [
  51. 'label' => 'Favorite', // 显示的字符
  52. 'db_columns' => 'favorite_count', // 对应数据库的字段
  53. 'direction' => 'desc', // 排序方式
  54. ],
  55. 'new' => [
  56. 'label' => 'New',
  57. 'db_columns' => 'created_at',
  58. 'direction' => 'desc',
  59. ],
  60. 'stock' => [
  61. 'label' => 'Stock',
  62. 'db_columns' => 'qty',
  63. 'direction' => 'desc',
  64. ],
  65. 'low-to-high' => [
  66. 'label' => '$ Low to High',
  67. 'db_columns' => 'final_price',
  68. 'direction' => 'asc',
  69. ],
  70. 'high-to-low' => [
  71. 'label' => '$ High to Low',
  72. 'db_columns' => 'final_price',
  73. 'direction' => 'desc',
  74. ],
  75. ],
  76. 'price_range' => [
  77. '0-10',
  78. '10-20',
  79. '20-30',
  80. '30-50',
  81. '50-100',
  82. '100-150',
  83. '150-300',
  84. '300-500',
  85. '500-1000',
  86. '1000-',
  87. ],
  88. ],
  89. //##############################
  90. //# Product部分设置 ##
  91. //##############################
  92. // 产品页面图片的设置
  93. 'productImgSize' => [
  94. //'small_img_width' => 80, // 底部小图的宽度
  95. //'small_img_height' => 110, // 底部小图的高度
  96. //'middle_img_width' => 400, // 主图的宽度
  97. ],
  98. 'productImgMagnifier' => false, // 是否已放大镜的方式显示,如果否,则是内窥的方式查看
  99. //##############################
  100. //# Review部分设置 ##
  101. //##############################
  102. 'review' => [
  103. 'add_captcha' => true, // 增加review页面是否开启验证码验证。
  104. 'productPageReviewCount' => 10, // 在产品页面显示的review的个数。
  105. 'reviewPageReviewCount' => 20, // 在review列表页面,显示的review的个数
  106. 'addReviewOnlyLogin' => true, // 只有登录用户才有资格进行评论。
  107. 'ifShowCurrentUserNoAuditReview' => true, // 当前用户添加的评论,后台未审核的评论,是否显示?这个是通过ip来判断。
  108. 'filterByLang' => false, // 是否通过语言进行评论过滤?默认只显示当前的语言下的评论,也就是客户在添加评论的store的语言。
  109. ],
  110. 'favorite' => [
  111. 'addSuccessRedirectFavoriteList' => false, // 产品收藏成功后是否跳转到账户中心的收藏列表
  112. ],
  113. ],
  114. ],
  115. ];