fecyo 属性组 属性排序有误,重量等属性如何隐藏?

bug问题 · winintel · 于 3年前 发布 · 1186 次阅读

一、 fecyo 属性组 属性排序有误, 选了 1 2 3 数字排序, 但没起作用 二、 默认设置的 属性值,保存后没有自动显示,还需要输入一遍

一、重量等属性如何隐藏?

共收到 9 条回复
Fecmall#13年前 0 个赞

去学习点东西吧,去看看代码,开源的意义在于分享。

winintel#23年前 0 个赞

@Fecmall #1楼 不是你让大家给你提bug吗?有bug以后我们都不提了?

Fecmall#33年前 0 个赞

@yyyy #2楼

1.我说的#1,我的意思说清楚了,本人的意思和对你的印象,不辩论,你感觉你自己的行为没有问题,继续发类似的帖子也是你的自由,不干涉,但是开源的意义不在于此。

2.后台的产品编辑,默认都没有值,保存也都可以保存成功,这个没有问题

3.属性组的排序,对应的是前台商城产品属性排序,后台这里没有做排序,不过这个倒是一个可以小调整一下的地方。

4.weight属性怎么隐藏?自己看码自己改。

winintel#43年前 0 个赞

@Fecmall #3楼 首先,fecmall是个好产品,我支持, 但是不能指望每个人都有精力研究代码呀,会java的也不一定能搞定php, 我提出来这里有bug, 希望有人踩过坑的说一下怎么改,如果没有人遇到过,也能留个底

Fecmall#53年前 0 个赞

@yyyy #4楼 嗯,没问题的。本人也没有指望太多,但还是希望各位多看看代码结构,多分享,本人精力也有限。

Fecmall#63年前 0 个赞

@yyyy #4楼 你自己的问题解决了,是否也应该分享一下,帮助其他的人?你的这个帖子: http://www.fecmall.com/topic/4267

winintel#73年前 0 个赞

@Fecmall #6楼 这个问题还没有解决啊,解决了我会分享的

winintel#83年前 0 个赞

找到了,

C:...\vendor\fancyecommerce\fecshop\services\Product.php 里

    public function initCustomAttrGroup()
    {
        $attrPrimaryKey =$this->attr->getPrimaryKey();
        $attrGroupPrimaryKey = $this->attrGroup->getPrimaryKey();
        $allGroupColl = $this->attrGroup->getActiveAllColl();
        // attr
        $allAttrColl = $this->attr->getActiveAllColl();
        $attrTypeColl = [];
        if ($allAttrColl) {
            foreach ($allAttrColl as $one) {
                $attrTypeColl[$one[$attrPrimaryKey]] = $one;
            }
        }
        $customAttrGroupArr = [];
        if ($allGroupColl) {
            foreach ($allGroupColl as $one) {
                $groupName = $one['name'];
                $attr_ids = $one['attr_ids'];
                if (!is_array($attr_ids) || empty($attr_ids)) {
                    
                    continue;
                }
                $attr_ids = \fec\helpers\CFunc::array_sort($attr_ids, 'sort_order', 'desc');    //这里应该是 asc
                //var_dump($attr_ids);exit;
                foreach ($attr_ids as $attr_id_one) {
                    if (!is_array($attr_id_one)) {
                        
                        continue;
                    }


$attr_ids = \fec\helpers\CFunc::array_sort($attr_ids, 'sort_order', 'desc');
//这里应该是 asc 升序

Fecmall#93年前 0 个赞

这个没有问题,数字越大,位置越上面

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics