Order rule - is it safe to leave the "User group" setting empty?


  • Default avatar
    peter10    
     7 months ago
    0

    Hi seyi, hope all is well!


    I'm using Virtumart 3.8.8 & Joomla 3.10.12, and AwoRewards 3.6.0.2.

    I have a "5% cashback" order rule setup, and I recently noticed it did not always assign points to buyers, and I realized it had to do with VM shopper groups, a subject where I had to do some digging.

    By default. VM has two important shopper groups, one for guest checkouts (ID 1), and one for registered users (ID 2). These two groups are vital for VM to function.

    It seems like VM does not automatically assign shopper group ID 2 when users register though, it's just assumed internally (by VM) that the users belong in that group if the user has an account. I can, however, if I want to, edit the user and add them to that group if need be. I've never had to do that though.

    However, I had the order rule set so that points were only assigned to users belonging to the "registered users group", because I never want guests to be able to collect points. Here's where the inconsistency happened, because some of my users (probably old accounts imported during a migration or something), did have the VM shopper group "registered users" assigned to them. New registered users does not have this though, and this is the default behavior of VM I believe.

    So, in my use case, I want *all* registered users to receive points, regardless of which group they belong to, is it safe to leave the order rule "User group" setting empty? Because points won't ever be collected by guest shoppers regardless?

    I've done some testing and this seems to be the case, which makes sense, an account is needed for the points data to be stored I assume :).

    I don't know why this setup worked before but does not work anymore, but my guess is that it happened during an update of either VM, AwoRewards or perhaps even rupostel opc which I also use, which has its own settings for shopper groups. I may have been fiddling around with the settings too much, and messed something up :).

    Grateful if you could confirm that it's fine to leave the "User group" setting empty in my case.

    All my best

    Peter

  • Your avatar
    seyi    
     7 months ago
    0

    Hello,

    You are right, Virtuemart does not always set the registered group, but this is taken into account within AwoRewards, as long as it finds a guest usergroup.  A guest usergroup is determined from table #__virtuemart_shoppergroups, where column "default" is set to 2.  If you do not have this, this is probably why that part stopped working.

    But to answer your specific questions, yes, you cannot collect points as a guess, and yes, if you leave it blank then it just applies to everyone eligible.