Where do the Customers get populated from?


  • Default avatar
    turntex    
     13 years ago
    0

    I am new to AWO coupon and am wondering where AWO coupon gets the names to populate the customers section in the add new coupon tab? The reason I ask is that I am seeing a number of names that were created by spambots (before I added captcha) that I have deleted. They do not show up in the Virtuemart users or in my Joomla users. Is there some database somewhere that needs to be purged? I really don't want to have to wade through all of the non-existant users everytime and would like to get it cleaned up. Thanks in advance!
  • Your avatar
    seyi    
     13 years ago
    0

    The customers are populated from the virtuemart table that holds the customer information. I just ran some tests and there are 2 ways to delete a user that I can see.
    1) From admin-.virtuemart->admin->users
    2) From admin->user manager

    If you use 1), everything works out fine and the customer is deleted from both virtuemart customer table and joomla user table. If you use 2), the customer is deleted from just the joomla user table. Im guessing you used 2).

    Ok, so the quick fix is to sync up the tables. You will need modification access to the database. Before doing anything below, BACKUP your database, just in case. I make 2 assumptions: you are using mysql and your joomla table prefix begins with jos_.

    First run this query on your database:
    SELECT v.* FROM jos_vm_user_info v
      LEFT JOIN jos_users u ON u.id=v.user_id
     WHERE u.id is NULL AND v.user_id>=62;


    This should give you a list of all the users deleted in Joomla but still exist in Virtuemart. Go through the list and make sure these are the users you definitely want removed. The truth is these users do not exist anymore, but its nice to see what you are deleting. When satisfied, run the query below.
    DELETE v.* FROM jos_vm_user_info v
      LEFT JOIN jos_users u ON u.id=v.user_id
     WHERE u.id IS NULL AND v.user_id>=62;


    This query deletes the users in the select statement above. Now you should only see true customers in awocoupon.

    I will update the code to make sure this fix is not needed in the next release, but for now this should suffice.
  • Default avatar
    turntex    
     13 years ago
    0

    seyi ,

    Thank you for the information but I am somewhat of a dummy when it comes to database stuff. I have logged into my host cpanel and have found the database section but con not find anywhere to run a query. My host is Bluehost.com and they use cpanel Pro 1.0 RC1. I see 3 different options for mySql but all thres of them just take me to a section to create new databases, delete databases, or add new users. If it is not too much trouble, could you give me a short tutorial on how to run a query? Thanks a bunch!
  • Default avatar
    turntex    
     13 years ago
    0

    seyl,

    I got it figured out! I did a search on my host cpanel on running queries and found out I needed to use phpMyAdmin. I did a copy and paste of your queries and they worked flawlessly! Wow, outstanding service for a free app! Going to send a donation your way so you can keep up the great work! Thanks again!
  • Your avatar
    seyi    
     13 years ago
    0

    thanks, im glad i could help. I appreciate the donation too, its great knowing people value my work. :) Also, feel free to rate this module in joomla extensions. it helps get the word out there.
  • Default avatar
    sixeyeco    
     13 years ago
    0

    See if you find a program called php MyAdmin in your cPanel. This a sql database editing tool. If you have that, open it.

    Select the Jooma DB on the left, probably "jo151"

    Click on the second tab named "SQL"

    Find the box titled: Run SQL query/queries on server "localhost":

    Paste in the code from above and click "GO"

    The first bit of code shows you a list of the out of sync users (this step is unnecessary. As the publishers states, these users do not exist any longer. So feel free to skip this step). Paste in the code from the second part and click "GO". This will delete the non-existent users from the VM database.