View Single Post
  #2  
Old 05-22-2004, 05:27 AM
 
mikebo mikebo is offline
 

Advanced Member
  
Join Date: Feb 2004
Location: Ohio
Posts: 72
 

Default

Hi Boomer

Thanks again for all the help you provide to the users of this forum. You have helped me out numerous times.

I tried many different ways to get the checkout process to carry thru the information typed in during step one of the checkout. Using the anonymous process, which is the only process I use in my store, I was not able to get the first and last names for shipping and billing info to do exactly what I needed.

I applied your mod, which you so nicely posted above, to my store. For the first time the first and last name info for shipping and billing info started to carry thru from step 1 to step 3 of the checkout. With some further adjustment to the include\func.php file, I was able to get it to do exactly what I needed.

Here is the revision you posted to the func.php file:

$userinfo["b_title"] = $userinfo["s_title"] ? $userinfo["s_title"] : $userinfo{"title"];
$userinfo["b_firstname"] = $userinfo["s_firstname"] ? $userinfo["s_firstname"] : $userinfo["firstname"];
$userinfo["b_lastname"] = $userinfo["s_lastname"] ? $userinfo["s_lastname"] : $userinfo["lastname"];

Here is the revision I made:

empty($userinfo["s_title"])? $userinfo["s_title"] = $userinfo["b_title"] : $userinfo["s_title"] = $userinfo["s_title"];
empty($userinfo["s_firstname"])? $userinfo["s_firstname"] = $userinfo["b_firstname"] : $userinfo["s_firstname"] = $userinfo["s_firstname"];
empty($userinfo["s_lastname"]) ? $userinfo["s_lastname"] = $userinfo["b_lastname"] : $userinfo["s_lastname"] = $userinfo["b_lastname"];

Now in my 3.5.7 store,

If the user leaves the shipping info empty at step 1 of checkout, the shipping info (including first and last name) will be filled in automatically with the billing info and carried thru to step 3 of checkout.

If the user fills in the shipping info at step 1 of checkout, the shipping info (including first and last names) will be filled in with the shipping info they entered, and carried thru to step 3 of checkout.

I've not tested this with all the payment methods in my store yet, but I don't see any problems with the moderate testing I've done.

Thank you for helping me streamline the checkout process.

Mike
__________________
Mike
X-Cart Gold
Version 4.6.0 PHP 5.2.17
Reply With Quote