Convert AUP points to AwoCoupon "Customer balance"


  • Default avatar
    peter10    
     6 years ago
    0

    Hi seyi! I hope all is well :).


    I'm a long time fan of AwoCoupon and today I finally bought AwoRewards too - and I'm truly excited to set this whole thing up :).


    I'm wondering if there's any chance you could help me build a sql query to convert all user's current AlphaUserPoints points balance into AwoCoupon's "Customer Balance" instead. Same ratio, so I basically just need to copy the numbers over to the new tables :).


    With AwoRewards in place, I have no need for AUP anymore. But my customers have already collected store credit (as AlphaUserPoints) and I kind of feel that it wouldn't be fair to reset everything and start fresh :).


    I know that I technically could keep AUP and automatically pay out AwoRewards points to AUP points, but the benefits of using Awo all the way are enormous, especially during checkout with the help of your fantastic "customer balance" module.

  • Your avatar
    seyi    
     6 years ago
    0

    It is much easier to convert to AwoRewards points than AwoCoupon balance.  Converting to a balance includes creating a coupon within AwoCoupon, that cannot be done within a coupon query.  Here is the query to copy points from aup to AwoRewards:

    INSERT INTO #__aworewards ( estore, user_id, credit_type, entry_type, points )
        SELECT "virtuemart", userid, "points", "admin", points FROM #__alpha_userpoints WHERE points > 0

    The above code assumes you are using Virtuemart and you will have to update #__ to your actual table prefix.

    Make sure you backup your db, or at least the #__aworewards table before running the query, so if anything goes wrong, you can always go back.

    Once you are happy that the points have come over correctly, you can then turn on the automatic feature to move aworewards points to awocoupon balance.

  • Default avatar
    peter10    
     6 years ago
    0

    Fantastic, thank you, gonna try this during the weekend :).

    Once I enable automatic payout of aworewards points to awocoupon customer balance, will this take place once the cron job is run next time?

    Super excited to give this a try.

    Thanks again!

    Best regards


    Peter

  • Your avatar
    seyi    
     6 years ago
    0

    No, it will not work on cron.  But the latest version 2.4.1 has the ability for you to manually trigger it on the user screen.
  • Default avatar
    peter10    
     6 years ago
    0

    Hi again seyi,


    I ran the query and everything looks good, I'm ready to pay out the points as awocoupon balance - but when doing it manually - I can only do 20 at a time? I have almost 10.000 users ;). Is there another option?

    Best

    Peter

  • Your avatar
    seyi    
     6 years ago
    0

    Ok, to make it easier, go to global configuration and set default list limit to 500.  Then on the user list, order by 'unclaimed points' in descending order, im assuming not all 10000 users have points.  Check all and run, until that column is 0.