New Account Details - Remove

Posts: 364
Joined: 10/16/2007

Would like to remove the "New Account Details" block under customer information in cart checkout.

"New account details
Optional. New customers may supply custom account details.
We will create these for you if no values are entered.
Username:
Password:
Confirm Password:"

These are not needed as no registration or logins are required for product purchases. Located the code in uc_cart_checkout_pane.inc but not sure what to comment out that will not break something.

Jim

AttachmentSize
new_account.png2.69 KB
Posts: 50
Joined: 08/17/2007
Getting busy with the Ubercode.Spreading the word - Ubercart for president.

Pretty sure you should be able to go to:

http://www.yoursite.com/admin/store/settings/checkout/edit/panes

Then expand the Customer Information Settings and uncheck both "Allow anonymous customers to specify a new user acount name." and "Allow anonymous customers to specify a new user acount password."

Then at: http://www.yoursite.com/admin/store/settings/checkout/edit Under "Checkout completion settings" uncheck "Send new customers a separate e-mail with their account details" if you do not want customers to receive an email about an account that has been created for them.

-Aaron

Posts: 364
Joined: 10/16/2007

Aaron:

Thanks for the suggestion. Checked the site and all is as you have suggested. Looks like that panel is hard coded into the uc_cart_checkout_pane.inc. Did comment out some of the code and did get it to go away as follows:

if ($user->uid == 0) {
        if (variable_get('uc_cart_new_account_name', TRUE)) {
          $contents['new_account']['name'] = array(
            //'#type' => 'textfield',
            //'#title' => t('Username'),
            //'#maxlength' => 60,
            //'#size' => 32,
          );
        }
        if (variable_get('uc_cart_new_account_password', TRUE)) {
          $contents['new_account']['pass'] = array(
           // '#type' => 'password',
           // '#title' => t('Password'),
           // '#default_value' => $_SESSION['new_user']['pass'],
           // '#maxlength' => 32,
           // '#size' => 32,
          );
          $contents['new_account']['pass_confirm'] = array(
           // '#type' => 'password',
           // '#title' => t('Confirm password'),
           // '#description' => t('Passwords must match to proceed.'),
           // '#default_value' => $_SESSION['new_user']['pass_confirm'],
           // '#maxlength' => 32,
           // '#size' => 32,
          );
        }

        if (!empty($contents['new_account'])) {
          $array = array(
            '#type' => 'fieldset',
            //'#title' => t('<b>Skip This Section</b> - Use the <b>Next</b> button to continue'),
            '#description' => variable_get('uc_cart_new_account_details', t('Use the <b>Next</b> button to continue.')),
            '#collapsible' => FALSE,
          );
          $contents['new_account'] = array_merge($array, $contents['new_account']);
        }

Changed some text and tested on local host and it seems to play so far. It may not be the most PHP savvy way but so far so good.

Jim

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Jim, using the form aswalla pointed out you can disable these elements without commenting out any code at all.

Posts: 364
Joined: 10/16/2007

Ryan:

Looked over Uber and as Arron pointed out they are correctly unchecked. Can go back and load in the unmodified file and re save his suggested fields and see what occurs.

The point is that even when not checked, that field will not go away. Interesting!

Jim

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Interesting... working fine on the Livetest. Maybe it was just a variable naming mismatch in a previous version. Puzzled

Posts: 167
Joined: 10/08/2007
Bug FinderGetting busy with the Ubercode.PayPal Hero

After you do all of this, the checkout screen will still display a description message about users being able to login in (right above email address field) which you can get rid of with this css snippet (pasting from memory, so test it first) ...

fieldset#customer-pane .description { display:none; }

Hope this helps.

--

Christopher Schaub
LuteGrass, LLC
http://www.lutegrass.com

Posts: 364
Joined: 10/16/2007

The problem is that the boxes and text still remain even though there is no requirement to fill in that part of the form. Will give your CSS snippet a try and see if all of that goes away.

Getting this out of the view of the customer is a "good thing". One less thing to do or to be confused by.

Jim

Posts: 167
Joined: 10/08/2007
Bug FinderGetting busy with the Ubercode.PayPal Hero

Hmmm, I don't see the boxes for username and password, just the email prompt. There must be an admin setting you've missed? Double check those. I'm using a pretty recent release of bazaar though alpha8 worked fine in this area as well.

--

Christopher Schaub
LuteGrass, LLC
http://www.lutegrass.com

Posts: 16
Joined: 11/19/2007
Bug Finder

I think the answer may be a mismatch in the defaults. I had exactly the same behaviour with Beta 3 - it showed the fields in the checkout form, but the settings page showed the checkboxes unchecked. On a whim, I submitted the checkout settings form, and the fields went away on the checkout form for anonymous users.

I think the underlying problem is that the checkout form defaults to showing them, but the setting page defaults to having the boxes unchecked. As soon as you submit the form at least once, they match up, but until then there's a disconnect.

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Right-o. Good call. I've updated the checkout pane so the defaults are FALSE across the board.