Results 1 to 3 of 3

Thread: Using user data insted of ad data in displaying contact info

  1. #1
    Thread Starter
    thomman's Avatar
    Join Date
    Apr 2009
    Location
    Cochin, Kerala, India
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using user data insted of ad data in displaying contact info

    I have been running a classifieds site for about 10 years now. I am in the process of shifting the site to classipress from a mysql database. I have a user table with users data like phone, address etc and each time for the ad it is this address that gets used. So while placing an ad he doesn't have to fill in too many details over and over again.

    I notice that the post ad form get the phone no and name each time. I would like to change this so that in the form. The phone field and others like address is fetched from user meta and is presented as default value in the form. And if updated it gets updated in the user meta table in wordpress thus actually updating the profile.

    I would then like the user data from the profile to be shown as the contact information instead of the contact information from the ad.

    I think this would be more straight forward way to go in the future and you can consider it for your coming releases.

  2. #2
    Founder dcowgill's Avatar
    Join Date
    Mar 2009
    Location
    San Francisco, CA
    Posts
    1,939
    Thanks
    66
    Thanked 135 Times in 99 Posts

    Re: Using user data insted of ad data in displaying contact info

    Agreed. Ideally the user doesn't have to keep filling in the same common info over and over. CP does auto populate name and email address right now though.

  3. #3
    Thread Starter
    thomman's Avatar
    Join Date
    Apr 2009
    Location
    Cochin, Kerala, India
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using user data insted of ad data in displaying contact info

    I think you didn't get what I wanted. In the ad placement and edit ad form I want to include the First name, Last name , nickname, phone no (additional field meta I plan to create in user profile just like user photo) the default values on the form to be fetched using get_userdata or something and when the form is submitted it should also update these user fields. And while displaying the owner information it should display from the user database and not from the post meta field as it is now. Now the owner and phone are post meta fields and gets updated in the post data. I want this to be updated in the user meta for the particular user. This way once the ad is submitted. He can go directly to edit any ad or profile and modify the details and all ads for the user will then by default show common user information. Or else for old ads it would be different from new ads. Ex if you update the name or phone now in post it can be different, If I have a lot of ads and my phone no changes its going to be difficult going to all my ads to modify the phone information. And if I dont do so Im going to loose a lot of leads when my phone no changes and I don't update. Using what I have proposed the moment you modify the profile for a user all user data for all ads for the user gets updated.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)