Copy Contact to Billing Info

Hi All



There’s nothing worse that having to type in the same information more than once and I find that this is something that you have to do in the checkout of CSCART and I can see this leading to people getting fed up and going else where.



When you sign up as a new customer you have to type your (on my set up)



Title

First Name

Last Name

Company

Phone



Into the Contact Information, You then have to REPEAT the same info for the Billing Information. Something that really bugs me and I’m sure bugs others.



I’ve noticed a lot of other carts (prestashop being one) automatically fill out these fields as soon as you click away from them. Can this be done with CS CART

Mark,



You can checkout this mod at:



[url]http://forum.cs-cart.com/showthread.php?t=15236[/url]



It will do what you want.



Brandon

Hi Brandon



I played with that mod before, but I thought that was for shipping and billing info, not sign up and billing info.



If you go to the [url]http://www.prestashop.com/demo[/url]



add an item to the cart then enter an email address to register you will see what I mean when you type your name in.

[quote name=‘mdj101’]Hi Brandon



I played with that mod before, but I thought that was for shipping and billing info, not sign up and billing info.



If you go to the [url]http://www.prestashop.com/demo[/url]



add an item to the cart then enter an email address to register you will see what I mean when you type your name in.[/QUOTE]



Probably have to use Smarty to copy the field data when it is entered into the Contact information. I have not looked into it but it would be a nice fix to prevent some redundant information that the customer is required to enter. I know if I were checking out on a site, it would annoy me…just another “checkout” issue to ding cs-cart for. We really need to preach simplification around here and this is just another thing. May want to add it to bug tracker as a feature request.

[quote name=‘Ion_Cannon’]…just another “checkout” issue to ding cs-cart for.[/QUOTE]



Sadly, many companies fall into this same problem, Walmart and Target to name a couple of big ones. When designing the checkout CS Cart probably looked around at what others were doing too. I’ve never been a fan of entering my name for the account info and then again for my shipping/billing address.

This is what happens on Prestashop



I just need a way to copy it to CS now



Please make your thoughts known to cs-cart so checkout can be fixed. I have been searching the forums and found the same problems persisting since version 1. Vote and ADD YOUR COMMENTS at the link below…



[url]http://cscart.uservoice.com/forums/40782-general/suggestions/539155-simplify-and-improve-checkout[/url]

I’ve had a go with my limited “copy and paste” knowledge LOL, but it seems that because the fields are auto generated, (not like presta) then there’s going to be a bit more involved here.

Please add your comments to the specification thread in the Roadmap forum:

[url]http://forum.cs-cart.com/showthread.php?t=16846[/url]



Bob

We think we are going to do this a little differently and if anyone has any comments, I’d appreciate them. We’ll implement this on both register and checkout.



I understand the need for all the fields in the “Contact information” section for some businesses. For ours however, all we need is First Name, Last Name, and Phone. We use the email address as our username, so we get that in the “User account info” section.



We will uncheck all “show/required” fields from the “Contact information” section in Admin->Profile fields the Contact information section doesn’t even show when a customers registers/checks out. Then we’ll add a required Phone field to the billing/shipping section. So the register/checkout page now shows only the “User account info”, “Billing Address” and “Shipping Address” sections.



When a customer registers or checks out, the required Billing Address->First Name, Last Name, and Phone will need to be copied to the cscart_users table in the firstname, lastname, and phone columns. These columns are populated by the three fields in the “Contact Information” section that we unchecked, however they are not populated by the same three fields in the Billing Address section.



If we can get this work, it should make our register and check out pages shorter and thus quicker for the customer as the First name and Last name do not have to be entered twice.



Like I mentioned, any comments, good or bad, on this approach would be appreciated.



Chris

I like the idea of unchecking most contact info fields, but decided against that because (a) I thought it looked strange to have just the email address “all alone” under the “contact” section on invoices and (b) we have mostly business clients in which the contact could actually be different from billing and shipping name.



So, I made a short piece of code that I stored in the “My Changes” addon folder, which works. It’s a bit of a hack, but perhaps we won’t need it after version 2.1. Note that it only copies first/last names - if you need other fields copied, you’ll have to augment the code for those fields.



To do this:


  1. Go to Administration → Addons and make sure the My Changes addon is installed and Active


  2. Create an empty text file called “checkout.post.php” and paste the following code into that file:


if ( !defined('AREA') ) { die('Access denied'); }

if ($_SESSION['cart']['user_data']['firstname']) {
if (empty($_SESSION['cart']['user_data']['b_firstname'])) { //assume first and last name have not been entered
$_SESSION['cart']['user_data']['b_firstname'] = $_SESSION['cart']['user_data']['firstname'];
$_SESSION['cart']['user_data']['b_lastname'] = $_SESSION['cart']['user_data']['lastname'];
}
if (empty($_SESSION['cart']['user_data']['s_firstname'])) { //assume first and last name have not been entered
$_SESSION['cart']['user_data']['s_firstname'] = $_SESSION['cart']['user_data']['firstname'];
$_SESSION['cart']['user_data']['s_lastname'] = $_SESSION['cart']['user_data']['lastname'];
}
} ?>




3. Create a directory within /addons/my_changes called controllers, and then another inside of that called customer, and move the checkout.post.php file into that. The full path should look like this:

/your_store_directory/addons/my_changes/controllers/customer/checkout.post.php

Thanks for this! Still works great in 2.2.3 !

[quote name='Flow' timestamp='1320831191' post='125611']

Thanks for this! Still works great in 2.2.3 !

[/quote]



I thought 2.2.3 did this as std anyway Flow?



John

Is it, John? Honestly I don't think so?