Show next rulesID in the list


  • Default avatar
    Minion Interactive    
     4 months ago
    0

    Hi, I used group rules (with etc 200 rules) after 10th step points, but for setup next rules in rules detail I need open every rule and check.

    Is very slow and frustrating.

    Can I add new collumn (Next Rule ID) in the list?

    I trying search in the code in

    - administrator/components/com_aworewards/aworewards/admin/class/class-aworewards-admin-class-rule.php

    - administrator/components/com_aworewards/aworewards/library/class-aworewards-library-class.php

    but I don't know how add new collumn

    JJt6mwY.png


  • Your avatar
    seyi    
     4 months ago
    0

    Hello

    In the first file class-aworewards-admin-class-rule.php, there is the function get_columns, which you can a new row to the array there.  Then whatever you call your key, example "newkey", you can then create a function in that same class with the key prefixing it with column_, as such:
    <?php
        
    public function column_newkey$row ) {
    ?>

  • Default avatar
    Minion Interactive    
     4 months ago
    0

    Thanks,

    we created it (by custom function in model)


    So after this is this right idea with rules in group for points?

    - ID1 is rule for grouping

    - Next ID is rule with the higher value of points (etc 500 points for order 5000 CZK) - ID2 and in dropdown for ordering in rule detail I see rule ID1

    - Next ID is rule with lower value then rule ID2 (etc. 490 points for order 4900 CZK) - ID3 and in dropdown for ordering in rule detail I see rule ID2

    - again and again

    - The last ID is rule with the smallest value from all (etc. 100 points for order 100 CZK)


    Is the right function?


    Thanks

    Rudolf