Jump to content

Limit Fields when Register and Update additional fields at Checkout


nickia

Recommended Posts

Hi everyone,

 

I want to create a short registration form with

 

firstname

e-mail

password

 

Once client decides to purchase something, they will add in additional information during checkout.

 

It's easy to create a short form because I just hide the fields and fill them with dummy data.

 

However, to enable additional info at checkout, I will need to modify the code so MYSQL will update the table with new information replacing dummy data. Since the source code is locked, I don't know how to proceed with this.

 

Your help is greatly appreciated!

Link to comment
Share on other sites

Ok I'm trying to use the internal API to update client info but it returned "Error" . Any idea why?

 

<?php

function update_client_info($vars) {
$clientid = $_SESSION['uid'];
print_r($vars);
print_r($clientid);

# Set Vars
$command = 'updateclient';
$values = array( 'email' => 'newemail@gmail.com', 'id' => '$clientid', );
$adminuser = 'api';

# Call API
$results = localAPI($command,$values,$adminuser);
if ($results['result']!="success") echo "An Error Occurred: ".$results['result'];

}
add_hook("AfterShoppingCartCheckout",1,"update_client_info");

?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated