Catalog.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. /*
  39. 'sort' => [ // 所有排序方式
  40. // 下面的譬如hot new low-to-high 只能用 字母,数组,-,_ 这4种字符。
  41. 'hot' => [
  42. 'label' => 'Hot', // 显示的字符
  43. 'db_columns' => 'score', // 对应数据库的字段
  44. 'direction' => 'desc', // 排序方式
  45. ],
  46. 'review_count' => [
  47. 'label' => 'Review', // 显示的字符
  48. 'db_columns' => 'review_count', // 对应数据库的字段
  49. 'direction' => 'desc', // 排序方式
  50. ],
  51. 'favorite_count' => [
  52. 'label' => 'Favorite', // 显示的字符
  53. 'db_columns' => 'favorite_count', // 对应数据库的字段
  54. 'direction' => 'desc', // 排序方式
  55. ],
  56. 'new' => [
  57. 'label' => 'New',
  58. 'db_columns' => 'created_at',
  59. 'direction' => 'desc',
  60. ],
  61. 'stock' => [
  62. 'label' => 'Stock',
  63. 'db_columns' => 'qty',
  64. 'direction' => 'desc',
  65. ],
  66. 'low-to-high' => [
  67. 'label' => '$ Low to High',
  68. 'db_columns' => 'final_price',
  69. 'direction' => 'asc',
  70. ],
  71. 'high-to-low' => [
  72. 'label' => '$ High to Low',
  73. 'db_columns' => 'final_price',
  74. 'direction' => 'desc',
  75. ],
  76. ],
  77. */
  78. /*
  79. 'price_range' => [
  80. '0-10',
  81. '10-20',
  82. '20-30',
  83. '30-50',
  84. '50-100',
  85. '100-150',
  86. '150-300',
  87. '300-500',
  88. '500-1000',
  89. '1000-',
  90. ],
  91. ],
  92. */
  93. //##############################
  94. //# Product部分设置 ##
  95. //##############################
  96. // 产品页面图片的设置
  97. //'productImgSize' => [
  98. //'small_img_width' => 80, // 底部小图的宽度
  99. //'small_img_height' => 110, // 底部小图的高度
  100. //'middle_img_width' => 400, // 主图的宽度
  101. // ],
  102. //'productImgMagnifier' => false, // 是否已放大镜的方式显示,如果否,则是内窥的方式查看
  103. //##############################
  104. //# Review部分设置 ##
  105. //##############################
  106. /*
  107. 'review' => [
  108. 'add_captcha' => true, // 增加review页面是否开启验证码验证。
  109. 'productPageReviewCount' => 10, // 在产品页面显示的review的个数。
  110. 'reviewPageReviewCount' => 20, // 在review列表页面,显示的review的个数
  111. 'addReviewOnlyLogin' => true, // 只有登录用户才有资格进行评论。
  112. 'ifShowCurrentUserNoAuditReview' => true, // 当前用户添加的评论,后台未审核的评论,是否显示?这个是通过ip来判断。
  113. 'filterByLang' => false, // 是否通过语言进行评论过滤?默认只显示当前的语言下的评论,也就是客户在添加评论的store的语言。
  114. ],
  115. 'favorite' => [
  116. 'addSuccessRedirectFavoriteList' => false, // 产品收藏成功后是否跳转到账户中心的收藏列表
  117. ],
  118. */
  119. ],
  120. ],
  121. ];