Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

fast easy checkout


nana

Recommended Posts

Warning: Cannot modify header information - headers already sent by (output started at /webiste home path/includes/classes/order.php:2) in /website home path/includes/functions/general.php on line 33

 

 

 

Anyone got any ideas about this. I am really stuck

Link to comment
Share on other sites

  • Replies 1.7k
  • Created
  • Last Reply

Top Posters In This Topic

Well I finally got it working by basically restarting from scratch and reinstalling everything.

 

 

The new problem I have is the order that the address details are in.

 

addresspk4.gif

 

As you can see, they are wrong

 

I am currently using the checkout_shipping3 option

 

I would like the info to be

 

First Name

Last Name

Street Address

Address Line 2

City

County/State

Post code

Country

 

For the billing AND Shippipng details.

 

 

What do I need to change in the checkout_shipping3.php file?

 

 

 

Also

 

IS it possible to make the password option required ONLY if the create an account box is ticked?

 

 

 

Thanks

Link to comment
Share on other sites

I have managed to sort the following bit out.

 

 

Well I finally got it working by basically restarting from scratch and reinstalling everything.

The new problem I have is the order that the address details are in.

 

*IMAGE WAS HERE*

 

As you can see, they are wrong

 

I am currently using the checkout_shipping3 option

 

I would like the info to be

 

First Name

Last Name

Street Address

Address Line 2

City

County/State

Post code

Country

 

For the billing AND Shippipng details.

What do I need to change in the checkout_shipping3.php file?

 

But in the order Confirmation page, the postcode is ABOVE the county/state

 

I cant find where to change this.

 

Any ideas?

 

 

 

Still need help with this bit though

Also

 

IS it possible to make the password option required ONLY if the create an account box is ticked?

Thanks

Link to comment
Share on other sites

I managed to install this contribution but one problem in choosing the method of paying. When customer doesnt click any of the payment method and goes for next-buttin it doesnt give anymore popup-window to choose payment...

 

How can I modify so that there would not be anymore asking of country and fax number? I would also like to change the place of phone number to the first box under tha e-mail.

Link to comment
Share on other sites

I am thinkin about installing this contrib, I was wondering if it has the ability to have how did you hear about us added with it.

 

Has anyone done this or know if it works?

 

Thanks,

 

Eric

 

 

I used this one with it: How did you hear about us? http://www.oscommerce.com/community/contributions,2159

 

Philip

Link to comment
Share on other sites

I have this contrib installed and I have Login Box Secure

http://www.oscommerce.com/community/contributions,1469 installed.

 

It shows the login so people can login or if they are logged in, then it shows links for the account page.

 

The problem is - it thinks they are logged in if they fill out the create_account3.php and DO NOT create an account. This is the code:

} else {

 if (tep_session_is_registered('customer_id')) {

 

How can I make it show if they have an account instead of if they fill out the create_account3.php?

 

 

Thanks,

Philip

Link to comment
Share on other sites

Well - if anyone else is needing this same thing as I posted above - find this (it is in there twice - it is the 2nd place):

 

  if (tep_session_is_registered('customer_id')) {

 

replace with:

	if (!tep_session_is_registered('createaccount')) {

 

Philip

Edited by dwdonline
Link to comment
Share on other sites

Hi everyone.

After much bug fixing (I wish I could list them all as we would all like to see a more sensible checkout process) I've got this contrib functioning with both A.net and Paypal. The only (fingers crossed) problem is if a customer fails to select the correct radio button for payment type they get caught in a loop that only spits out errors, even if they go back and correct their chioce of payment. This happened on the first customer who came to the live install. He gave up and left.

 

One possible workaround would be to have the radio button for A.net "pre-selected" for the customer, as this is the method of payment for 90% of customers anyway. Not the best solution, but I'm willing to live with it untill someone comes up with a better way of handling the checkout process for all of us. This is turning into a much bigger project than any contrib install I've ever done. Has anybody done this before?

 

Also, does anybody know how to get rid of the checkbox in the password creation box? Again, I would just like to force customers to create a password. I would really appriciate any input. Thanks.

Edited by milkhouse
Link to comment
Share on other sites

One possible workaround would be to have the radio button for A.net "pre-selected" for the customer, as this is the method of payment for 90% of customers anyway. Not the best solution, but I'm willing to live with it untill someone comes up with a better way of handling the checkout process for all of us. This is turning into a much bigger project than any contrib install I've ever done. Has anybody done this before?

 

Hi, I was able to get it to work. Basically - you have to combine the rest of checkout_payment.php with checkout_shipping.php. I will PM you a copy of my checkout_shipping.php if you like. I do have SPPC, CCGV, and many other contribs installed - but it may give you some idea. I have been able to get past the error problems.

 

Thanks,

Philip

Link to comment
Share on other sites

Sorry I forgot to link to my checkout_shipping file:

 

http://txcrew.coldyron.com/checkout_shipping.phps

 

Perhaps this may help give some hints at where to go with this code. (also if you would, please ignore the static HTML themeing in this document, the theme was not done appropriately it will soon be done in a dynamic fashion)

 

Thanks in advance.

Edited by txcrew
Link to comment
Share on other sites

Using FEC(create_account2.php) and FedEX, and when a user typos their zipcode, they aren't able to go back and change it. They also can't go forward since they can't select a valid shipping method.

We also are using Authorize.net AIM for payment, and it is posible to get address verification errors, but I don't know if this has the same problem as FEC+FedEx blocking checkout on customer typo.

 

As a work around for now, have added the following code to includes/functions/validations.php

(based on http://www.oscommerce.com/community/contributions,2632)

 

Note: I've also made other alterations to the code for different reasons, so the new file line numbers may not match up correctly. Also our store is USA/English only, so I didn't include multilingual support in my modifications.

 

function tep_validstatezip($state, $zip5) {
  $allstates = array (
// US Addresses
 "AA" => array ("3400034099"),
 "AE" => array ("0900009999"),
 "AK" => array ("9950099929"),
 "AL" => array ("3500036999"),
 "AP" => array ("9620096699"),
 "AR" => array ("7160072999"),
 "AS" => array ("9679996799"),
 "AZ" => array ("8500086599"),
 "CA" => array ("9000096199"),
 "CO" => array ("8000081699"),
 "CT" => array ("0600006389", "0639106999"),
 "DC" => array ("2000020099", "2020020599"),
 "DE" => array ("1970019999"),
 "FL" => array ("3200033999", "3410034999"),
 "FM" => array ("9694196944"),
 "GA" => array ("3000031999", "3980039999"),
 "GU" => array ("9691096939"),
 "HI" => array ("9670096798", "9680096899"),
 "IA" => array ("5000052999"),
 "ID" => array ("8320083899"),
 "IL" => array ("6000062999"),
 "IN" => array ("4600047999"),
 "KS" => array ("6600067999"),
 "KY" => array ("4000042999"),
 "LA" => array ("7000071499"),
 "MA" => array ("0100002799"),
 "MD" => array ("2060021999"),
 "ME" => array ("0390004999"),
 "MH" => array ("9696096970"),
 "MI" => array ("4800049999"),
 "MN" => array ("5500056799"),
 "MO" => array ("6300065899"),
 "MP" => array ("9695096959"),
 "MS" => array ("3860039799"),
 "MT" => array ("5900059999"),
 "NC" => array ("2700028999"),
 "ND" => array ("5800058899"),
 "NE" => array ("6800069399"),
 "NH" => array ("0300003899"),
 "NJ" => array ("0700008999"),
 "NM" => array ("8700088499"),
 "NV" => array ("8900089899"),
 "NY" => array ("0040000599", "0639006390", "1000014999"),
 "OH" => array ("4300045999"),
 "OK" => array ("7300074999"),
 "OR" => array ("9700097999"),
 "PA" => array ("1500019699"),
 "PR" => array ("0060000799", "0090000999"),
 "PW" => array ("9694096940"),
 "RI" => array ("0280002999"),
 "SC" => array ("2900029999"),
 "SD" => array ("5700057799"),
 "TN" => array ("3700038599"),
 "TX" => array ("7500079999", "8850188599"),
 "UT" => array ("8400084799"),
 "VA" => array ("2010520199", "2200024699"),
 "VI" => array ("0080000899"),
 "VT" => array ("0500005999"),
 "WA" => array ("9800099499"),
 "WI" => array ("5300054999"),
 "WV" => array ("2470026999"),
 "WY" => array ("8200083199"));

// if you use a drop down list for state selection, ensuring valid data,
// isset is not needed.  (Warnings can not be turned off with: @foreach...)

  if (isset($allstates[$state])) {
 //just do the main part of code
 $zip5 = substr($zip5, 0,5);

 foreach($allstates[$state] as $ziprange) {
   if (($zip5 >= substr($ziprange, 0, 5)) && ($zip5 <= substr($ziprange,5))) {
	  return true;  // on match, return true
   }
 }
  }
  // on no match, return false
  return false;
}

 

and changed the code in create_account2.php lines

*** New files for fec/create_account2.php	2006-05-04 14:13:28.000000000 -0500
--- create_account2.php	2006-08-23 10:07:56.216682570 -0500
***************
*** 221,230 ****
	  $check = tep_db_fetch_array($check_query);
	  $entry_state_has_zones = ($check['total'] > 0);
	  if ($entry_state_has_zones == true) {
! 			$zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name like '" . tep_db_input($state) . "%' or zone_code like '%" . tep_db_input($state) . "%')");
		  if (tep_db_num_rows($zone_query) == 1) {
			  $zone = tep_db_fetch_array($zone_query);
			  $zone_id = $zone['zone_id'];
			  } else {
			  $error = true;
			  $messageStack->add('create_account', ENTRY_STATE_ERROR_SELECT);
--- 236,249 ----
	  $check = tep_db_fetch_array($check_query);
	  $entry_state_has_zones = ($check['total'] > 0);
	  if ($entry_state_has_zones == true) {
! 			$zone_query = tep_db_query("select distinct zone_id, zone_code from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name like '" . tep_db_input($state) . "%' or zone_code like '%" . tep_db_input($state) . "%')");
		  if (tep_db_num_rows($zone_query) == 1) {
			  $zone = tep_db_fetch_array($zone_query);
			  $zone_id = $zone['zone_id'];
+		   if (!tep_validstatezip($zone['zone_code'],$postcode)) {
+			 $error = true;
+			 $messageStack->add('create_account', 'Billing State selected does not match zipcode entered. ('.$zone['zone_code'].','.$postcode.')');
+		   }
			  } else {
			  $error = true;
			  $messageStack->add('create_account', ENTRY_STATE_ERROR_SELECT);
***************
*** 267,276 ****
		  $shipping_check = tep_db_fetch_array($shipping_check_query);
		  $entry_state_has_zones = ($shipping_check['total'] > 0);
		  if ($entry_state_has_zones == true) {
! 				$shipping_zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name like '" . tep_db_input($shipping_state) . "%' or zone_code like '%" . tep_db_input($shipping_state) . "%')");
			  if (tep_db_num_rows($shipping_zone_query) == 1) {
				  $shipping_zone = tep_db_fetch_array($shipping_zone_query);
				  $shipping_zone_id = $shipping_zone['zone_id'];
				  } else {
				  $error = true;
				  $messageStack->add('create_account', ENTRY_SHIPPING_STATE_ERROR_SELECT);
--- 286,299 ----
		  $shipping_check = tep_db_fetch_array($shipping_check_query);
		  $entry_state_has_zones = ($shipping_check['total'] > 0);
		  if ($entry_state_has_zones == true) {
! 				$shipping_zone_query = tep_db_query("select distinct zone_id, zone_code from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name like '" . tep_db_input($shipping_state) . "%' or zone_code like '%" . tep_db_input($shipping_state) . "%')");
			  if (tep_db_num_rows($shipping_zone_query) == 1) {
				  $shipping_zone = tep_db_fetch_array($shipping_zone_query);
				  $shipping_zone_id = $shipping_zone['zone_id'];
+		   if (!tep_validstatezip($shipping_zone['zone_code'],$shipping_postcode)) {
+			 $error = true;
+			 $messageStack->add('create_account', 'Shipping State selected does not match zipcode entered. ('.$shipping_zone['zone_code'].','.$shipping_postcode.')');
+		   }
			  } else {
				  $error = true;
				  $messageStack->add('create_account', ENTRY_SHIPPING_STATE_ERROR_SELECT);
***************
*** 551,558 ****
  if ($HTTP_POST_VARS['action'] == 'process') {
	  if ($entry_state_has_zones == true) {
		  $zones_array = array();
! 			$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");
		  while ($zones_values = tep_db_fetch_array($zones_query)) {
			  $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
		  }
		  echo tep_draw_pull_down_menu('state', $zones_array);
--- 574,589 ----
  if ($HTTP_POST_VARS['action'] == 'process') {
	  if ($entry_state_has_zones == true) {
		  $zones_array = array();
! 			$zones_query = tep_db_query("select zone_name, zone_code from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");
!	   $def_state = '';
!	   if (isset($_POST['state'])) {
!		 $def_state=strtoupper(trim($_POST['state']));
!	   }
		  while ($zones_values = tep_db_fetch_array($zones_query)) {
+		 if ($def_state != '' and ($def_state == strtoupper($zones_values['zone_name']) or 
+								   $def_state == strtoupper($zones_values['zone_code']))) {
+		   array_unshift($zones_array, array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']));
+		 }
			  $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
		  }
		  echo tep_draw_pull_down_menu('state', $zones_array);
***************
*** 680,689 ****
  if ($HTTP_POST_VARS['action'] == 'process') {
	  if ($entry_state_has_zones == true) {
		  $zones_array = array();
! 			$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");
		  while ($zones_values = tep_db_fetch_array($zones_query)) {
			  $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
		  }
		  echo tep_draw_pull_down_menu('shippingstate', $zones_array);
		  } else {
		  echo tep_draw_input_field('shippingstate');
--- 715,733 ----
  if ($HTTP_POST_VARS['action'] == 'process') {
	  if ($entry_state_has_zones == true) {
		  $zones_array = array();
!	   $zones_query = tep_db_query("select zone_name, zone_code from " . TABLE_ZONES . " where zone_country_id = '" . (int)$shipping_country . "' order by zone_name");
!	   $def_state = '';
!	   if (isset($_POST['state'])) {
!		 $def_state=strtoupper(trim($_POST['state']));
!	   }
	while ($zones_values = tep_db_fetch_array($zones_query)) {
+		 if ($def_state != '' and ($def_state == strtoupper($zones_values['zone_name']) or 
+								   $def_state == strtoupper($zones_values['zone_code']))) {
+		   array_unshift($zones_array, array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']));
+		 }
	  $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
	}
+ 
		  echo tep_draw_pull_down_menu('shippingstate', $zones_array);
		  } else {
		  echo tep_draw_input_field('shippingstate');

 

Couple of minor typos:

create_account2.php line 410

create_account3.php line 408

 

{if($create_password==1){$email_test .=ASSWORD_CREATED.': '.$passwords;}

Should probably be .= PASSWORD_CREATED

 

Some minor HTML changes and adding support for none-javascript users.

*** New files for fec/create_account2.php	2006-05-04 14:13:28.000000000 -0500
--- create_account2.php	2006-08-23 10:07:56.216682570 -0500
***************
*** 43,48 ****
--- 43,63 ----
		  $gender = false;
	  }
  }
+ 	
+   if (isset($HTTP_POST_VARS['copy']) and $HTTP_POST_VARS['copy'] == 'checkbox' and $HTTP_POST_VARS['javascript'] == 'no') {
+	 foreach(array('firstname'=>'ShipFirstName','lastname'=>'ShipLastName','country'=>'shipcountry',
+				   'shipcompany'=>'shipcompany','street_address'=>'ShipAddress','suburb'=>'shipsuburb',
+				   'City'=>'ShipCity','postcode'=>'shippostcode','state'=>'shippingstate') as $billing_field => $shipping_field) {
+	   if (isset($HTTP_POST_VARS[$billing_field])) {
+		 $HTTP_POST_VARS[$shipping_field] = $HTTP_POST_VARS[$billing_field];
+		 $$shipping_field = $HTTP_POST_VARS[$billing_field];
+	   }
+	   if (isset($_POST[$billing_field])) {
+		 $_POST[$shipping_field] = $_POST[$billing_field];
+	   }
+	 }
+   }
+   
//START REGISTRATION CODE
  $createaccount='N';
  //next two lines gives you a temporary fixed password you can change to what you like
***************
*** 631,639 ****
 <tr bgcolor="#003399">
 <td colspan=2 width="100%" bgcolor="#003399">
 <b><font color=white size="-1" face="arial, helvetica">Shipping Information</font></b>
! <font color=white size="-2" face="arial, helvetica">
 (Check to use Billing Information: <input type="checkbox" name="copy"
! OnClick="java script:ShipToBillPerson(this.form);" value="checkbox"> )
 </td>
 </tr>
 <tr>
--- 666,674 ----
 <tr bgcolor="#003399">
 <td colspan=2 width="100%" bgcolor="#003399">
 <b><font color=white size="-1" face="arial, helvetica">Shipping Information</font></b>
! <font color=white size="-2" face="arial, helvetica"><label>
 (Check to use Billing Information: <input type="checkbox" name="copy"
! OnClick="java script:ShipToBillPerson(this.form);" value="checkbox"></label> )
 </td>
 </tr>
 <tr>
***************
*** 655,661 ****
 ?>
 <tr>
 <td class="infoBoxContents"><?php echo ENTRY_STREET_ADDRESS; ?></td>
! <td class = "infoBoxContents"><tt><font size="2"><input name="ShipAddress" value="<? echo $ShipAddress; ?>" size="20"></font></tt><? echo ' <span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>'; ?></td>
 </tr>
 </tr>
 <?php
--- 690,696 ----
 ?>
 <tr>
 <td class="infoBoxContents"><?php echo ENTRY_STREET_ADDRESS; ?></td>
! <td class = "infoBoxContents"><tt><font size="2"><input name="ShipAddress" value="<? echo $shipping_street_address; ?>" size="20"></font></tt><? echo ' <span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>'; ?></td>
 </tr>
 </tr>
 <?php
***************
*** 745,750 ****
--- 793,804 ----
 ?>
 <table border="0" width="100%" cellspacing="0" cellpadding="2" valign="top">
 </td><td width="100%" border="1"> </td><td width="100%" border="1" valign="top"><center>
+ <input type="hidden" name="javascript" value="no">
+ <script type="text/javascript">
+ <!--
+   document.checkout.javascript.value='yes';
+ //-->
+ </script>
 <?php
 echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form></td>';
 ?>

Link to comment
Share on other sites

Hi all,

 

I was wondering what changes and which create account page I have to have to make customers create an account. I dont wish to use the option to create an account I want them to create one.

 

Thanks

 

Then you don't need this contribution. If you choose, you can install the combine payment & shipping aspect of the mod, but you won't need the rest of it. The main purpose of this mod was to allow customers to checkout w/o making an account. By default OSC forces the customers to create one.

 

Greg

I only do what my Rice Krispies tell me to do!

Link to comment
Share on other sites

I have already implimented the shipping and payment process. I guess Ill have to custom modify the login and create_account page unless someone has already done this. Shouldnt be to hard all I need is the form area for login in.

 

Thanks,

Eric

Link to comment
Share on other sites

I need some serious help. I had a customer who created and account and order a week or so ago. All was fine the payment came through and the order showed up in the admin.

 

Today she ordered again. I received the payment but the order did not populate in the admin. I have her old order sitting in there marked as shipped. Should I have deleted the first one when it was finished, is this why the second one didn't show up?

 

I really need help on this one. I had to call her and ask her what she ordered. I can't do this with every customer.

 

Has anyone else ran into this issue? If so what did you do? Please help!

Link to comment
Share on other sites

I need some serious help. I had a customer who created and account and order a week or so ago. All was fine the payment came through and the order showed up in the admin.

 

Today she ordered again. I received the payment but the order did not populate in the admin. I have her old order sitting in there marked as shipped. Should I have deleted the first one when it was finished, is this why the second one didn't show up?

 

I really need help on this one. I had to call her and ask her what she ordered. I can't do this with every customer.

 

Has anyone else ran into this issue? If so what did you do? Please help!

 

If she paid via PayPal then you should checkout contribution 2679 - osCommerce PayPal IPN Module v1.0 For 2.2MS2

Link to comment
Share on other sites

If she paid via PayPal then you should checkout contribution 2679 - osCommerce PayPal IPN Module v1.0 For 2.2MS2

 

Hmm that's very curious. Thanks for the info I will check this out.

 

I noticed in the first few lines of the paragraph for that link it says "This module stores orders prematurely in the database to be processed by PayPal IPN notifications. This takes care of customers not returning back to the store to store the order in the database, and allows processing to occur when the PayPal IPN notification is received."

 

Does this mean that if the buyer does not click return to merchant that it doesn't put the order in the database? I'm basically trying to figure out WHY?

 

I will dive into this though, thank you again for responding so quickly.

 

Thanks!

 

Shell

Link to comment
Share on other sites

Hello all.

 

I have a few questions about this contribution. Does any one have any expereince with trying to install this on a system that has CCGV and/or Points Rewards contributions? are there big integration problems?

 

Thank you

 

Arkady

Edited by Voland

People dont change, people realize.

Link to comment
Share on other sites

Great Contribution, Jus one thing i cant figure out..on the create account page, im getting '//fast easy checkout end' appearing at the top of my header i cant seem to find out how to get rid of it..any help would be wicked..

 

ss.gif

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...