Aworewards - How to create more dynamic tags


  • Default avatar
    benjamin2    
     10 years ago
    0

    Hello,

    I want to put in my invitation email the username (login) of the sponsor.
    Actually I put the tag {user_name} and it display the name of the sponsor.

    Do you know where I can change this or create more dynamic tags.

    Thanks
  • Your avatar
    seyi    
     10 years ago
    0

    hello,

    In www/components/com_aworewards/models/invitation.php, line 199
    <?php
            $body    
    str_replace(array('{user_name}','{customer_note}','{customer_link}'),array($user->name,nl2br($custommessage),$customer_link),$param_message);
    ?>


    you can alter it for username also

    <?php
            $body    
    str_replace(array('{user_name}','{username}','{customer_note}','{customer_link}'),array($user->name,$user->username,nl2br($custommessage),$customer_link),$param_message);
    ?>
  • Default avatar
    benjamin2    
     10 years ago
    0

    Hello,

    I tried your code and I don't think it works.
    I put {username} in the email and it display {username} in frontend.
    Do you have another solution please.
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    The code above is for the email, not the front end display. In the same file, search for user_name, I believe there is one close to the top. There you can add the code for {username}
  • Default avatar
    benjamin2    
     10 years ago
    0

    Thank's a lot, you're great