Viewing 14 replies - 16 through 29 (of 29 total)
  • ladober

    (@ladober)

    Olive…….. you are legend

    ladober

    (@ladober)

    Sorry I meant Oliver ??

    Plugin Author ollybach

    (@ollybach)

    right then

    2.7 now allows to add the order form fields to be prefilled as well as adding them when registering

    any enabled fields will also be view/edit-able in the profile page

    and added to the user meta data

    Thread Starter nostahl

    (@nostahl)

    one step closer to showing users their own order history I like it! ??

    Plugin Author ollybach

    (@ollybach)

    yeah, that’s kind of where i’m – slowly admittedly – trying to get to (and a few other things..as always)

    Thread Starter nostahl

    (@nostahl)

    That and editing a product already added to the shopping cart will be the best features at this time I think ??

    ladober

    (@ladober)

    I tried the plugin on multisite on my localhost it works perfectly but it isn’t storing the user data like the normal site.
    Any solution for this?
    Thanks

    Plugin Author ollybach

    (@ollybach)

    you really have to be more specific. saying: “it isn’t storing the user data like the normal site.” really isn’t very helpful ……

    Plugin Author ollybach

    (@ollybach)

    also, please start a new topic, this has long since been merked as resolved and kind of has not much to do with the original topic anymore

    ladober

    (@ladober)

    Really Sorry for my broken English. I will start new topic if needed.
    Thanks

    Plugin Author ollybach

    (@ollybach)

    >Really Sorry for my broken English.
    your english is fine. i just need you to be more specific

    > I will start new topic if needed.
    probably a good idea (i.e yes, please do )

    I have to say, I love this plugin and I been playing with it for a little now… I was also wondering about putting a user system on it also.. I found https://www.ads-software.com/plugins/profile-builder/ … Started to look around in the source code. Been playing around, currently in the process of getting the front end user system to work with wppizza so people can store their address and such, without going into WordPress admin. If you like when I have finished, I can post what I made from it, and you can also use this as an front facing user base. Because that is what it will be doing very soon :D.. I am looking for a front facing login system that works with wppizza so users can log in and update their profile information without even knowing there is a wordpress admin panel.. Well that will shut off complete soon as the site is finished ??

    Okay for this I am going to show you how to make wppizza use profile builders signup features to record the information you want in the additional information section of your profile.
    when members register.. While giving you a full front facing user system also, so members will never see the WP admin panel.

    front-end/wppb.register.php
    Search for “First Name”, “Last Name” and all the form field names on registration that you have activated in the admin panel of profile builder
    They start at around line 1047
    example : <label for=”nickname”>’. __(‘Street Name’, ‘profilebuilder’) .$errorMark.'</label>
    Replace these with your desired input fields.. ** Important do not change the email, user and pass fields, just change the ones you can. I changed these..
    So you can search and replace these with your desired names.. First Name, Last Name, Nickname, Website and AIM
    I changed them 2, Name, House Number, Street Name, Postcode, Telephone. I disabled any others in the admin panel for profile builder so It shown only the fields I wanted to display.
    This enables members to register their address on signup.
    In the same file search for
    wppb_signup_user( $userdata[‘user_login’], $userdata[‘user_email’], $meta );

    Just above this you will see
    $meta = array(
    ‘user_pass’ => base64_encode($userdata[‘user_pass’]),
    ‘first_name’ => $userdata[‘first_name’],
    ‘last_name’ => $userdata[‘last_name’],
    ‘nickname’ => $userdata[‘nickname’],
    ‘user_url’ => $userdata[‘user_url’],
    ‘aim’ => $userdata[‘aim’],
    ‘yim’ => $userdata[‘yim’],
    ‘jabber’ => $userdata[‘jabber’],
    ‘description’ => $userdata[‘description’],
    ‘role’ => $userdata[‘role’]
    );
    What you need to do is go into your database in wp_usermeta, and look at the meta_key row for the wppizza inputs.
    Store these names, you will need them later cause we are going to be inserting the details of the registration into here, which enables us to capture the address and everything else.
    Mine looked like this,
    wppizza_cname
    wppizza_caddress
    wppizza_ctel
    wppizza_ccomments
    wppizza_ccustom1

    Okay now determine which of them rows leads to the wppizza additional information, in your profile on WP.
    The code above would then be changed using the meta_key wppizza fields like so

    $meta = array(
    ‘user_pass’ => base64_encode($userdata[‘user_pass’]),
    // Edited. //
    ‘wppizza_cname’ => $userdata[‘first_name’],
    ‘wppizza_caddress’ => $userdata[‘last_name’],
    ‘wppizza_ctel’ => $userdata[‘nickname’],
    ‘wppizza_ccomments’ => $userdata[‘user_url’],
    ‘wppizza_ccustom1’ => $userdata[‘aim’],
    // End edit. //
    ‘yim’ => $userdata[‘yim’],
    ‘jabber’ => $userdata[‘jabber’],
    ‘description’ => $userdata[‘description’],
    ‘role’ => $userdata[‘role’]
    );
    I put my meta_key rows in here instead.
    Now we need to open functions/email.confirmation.php
    Search for “update_user_meta( $user_id, ‘description’, $meta[‘description’] );”
    It is at around line 151, what you need to do is copy and paste this underneath the search.
    if( !empty($meta[‘wppizza_cname’] ) )
    update_user_meta( $user_id, ‘wppizza_cname’, $meta[‘wppizza_cname’] );
    if( !empty($meta[‘wppizza_caddress’] ) )
    update_user_meta( $user_id, ‘wppizza_caddress’, $meta[‘wppizza_caddress’] );
    if( !empty($meta[‘wppizza_ctel’] ) )
    update_user_meta( $user_id, ‘wppizza_ctel’, $meta[‘wppizza_ctel’] );
    if( !empty($meta[‘wppizza_ccomments’] ) )
    update_user_meta( $user_id, ‘wppizza_ccomments’, $meta[‘wppizza_ccomments’] );
    if( !empty($meta[‘wppizza_ccustom1’] ) )
    update_user_meta( $user_id, ‘wppizza_ccustom1’, $meta[‘wppizza_ccustom1’] );

    Replace the wppizza_ with the same wppizza_ rows you replaced above

    Open front-end/wppb.edit.profile.php
    Like we did with the front-end/wppb.register.php file, search again for the Last Name, First Name input fields and change them to the same ones you did on register.
    Once we have replaced all those we then need to do a search for wp_update_user and update_user_meta they will look something like this.
    “wp_update_user( array( ‘ID’ => $current_user->ID, ‘last_name’ => esc_attr( $_POST[‘last_name’] )));”
    What we do here is replace the last_name, first_name and so on with your wppizza_ rows. when you are searching for update_user_meta
    When you are searching for wp_update_user, replace the whole line.. “wp_update_user( array( ‘ID’ => $current_user->ID, ‘last_name’ => esc_attr( $_POST[‘last_name’] )));”

    with this

    “update_user_meta( $current_user->ID, ‘wppizza_caddress’, esc_attr( $_POST[‘last_name’] ) );”
    while also changing the wppizza_caddress with your own rows!

    Remember do not replace email, username and password. These are needed in the registration process, destroy these and you have a massive problem!

    Now I have a perfect registration page and user system. I capture the details I want in the tables I want on registration and allow users to edit their details without having to go into wordpress admin.
    I know its very sloppy, but I only did this to basically do the job. Maybe someone can turn this into something better ??
    I’m a noob to wordpress, so forgive my bad details.
    Hope you find this useful or maybe even integrate them both for the perfect user panel :).

    Here is a table of the information I replaced
    Name – first_name – wppizza_cname
    House Number – last_name – wppizza_caddress
    Street Name nickname – wppizza_ctel
    Postcode – user_url – wppizza_ccomments
    Telephone – aim – wppizza_ccustom1

    Plugin Author ollybach

    (@ollybach)

    just saw this…..

    anyway, you could make your life a hell of a lot easier by just using the theme my login plugin instead as it will automatically use/recognise all the enabled / added fields….(you were replying to a 6 months old thread btw)

    just saying….

Viewing 14 replies - 16 through 29 (of 29 total)
  • The topic ‘Does WP-PIZZA use wordpress users?’ is closed to new replies.