Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

fast easy checkout


nana

Recommended Posts

I am having some trouble with the redirection in this contribution.

 

Issue #1:

If they already have an account and use the login box to login, they are taken to the (DEFAULT) index.php page.

 

Issue #2:

If they do not have an account and fill out the information but opt-out of creating an account and click continue, they are taken to checkout_shipping which is combined with checkout_payment (They now have an "Account" and there is an option for Log Off and Create Account). If for whatever reason (ie. decide to change their billing/shipping info), they click the back button on the browser, they are taken to account_password_new.php and are forced to enter a password instead of taking them to a page where they can edit their info.

 

Here is the first part of my create_account.php

<?php
/*
$Id: create+account3.php,v 2.00 2004/01/05 23:28:24 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
$show_account_box = 1;
//0 no create account box
//1 javascript create account box
//2 normal create account box
$create_password =0;// set to 1 to create an account with random password
$show_login=1;
//0 no create login box
//1 javascript login account box
//2 normal create login box
////////////////////////////////////////////////
////////////////////////////////////////////////
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . 'create_account.php');
require(DIR_WS_LANGUAGES . $language . '/' . 'fast_account.php');
require(DIR_WS_LANGUAGES . $language . '/' . 'login.php');
// if we have been here before and are coming back get rid of the credit covers variable
if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers'); //rmh M-S_ccgv
//line 21-23 sends the customer ti index.php if he is logedin
if ((tep_session_is_registered('customer_id'))&&(tep_session_is_registered('createaccount'))) { tep_redirect(tep_href_link('account_password_new.php', '', 'SSL'));
}
if (tep_session_is_registered('customer_id')) {
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'SSL'));
}
// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
if ($session_started == false) {
tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
}
$error = false;
if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) {
$fromlogin=tep_db_prepare_input($HTTP_POST_VARS['fromlogin']);
if (ACCOUNT_GENDER == 'true') {
	if (isset($HTTP_POST_VARS['gender'])) {
		$gender = tep_db_prepare_input($HTTP_POST_VARS['gender']);
		} else {
		$gender = false;
	}
}
//START REGISTRATION CODE
//$createaccount='N';
//next two lines gives you a temporary fixed password you can change to what you like
//start type one create assount
if ($create_password == 1) {
	$createaccount = tep_db_prepare_input($HTTP_POST_VARS['createmyaccount']);
	if ($createaccount!='Y')$createaccount='N';
	$password = tep_create_random_value(15);
	$confirmation = $password;
}
//start type two create account
if ($show_account_box >= 1) {
	$createaccount = tep_db_prepare_input($HTTP_POST_VARS['createaccount']);
	if ($createaccount!='Y')$createaccount='N';
	if ($createaccount=='Y') {
		$password = tep_db_prepare_input($HTTP_POST_VARS['password']);
		$confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']);
	}
}
if ($fromlogin == 1) {
	$createaccount = 'Y';
		$password = tep_db_prepare_input($HTTP_POST_VARS['password']);
		$confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']);
}
$firstname = tep_db_prepare_input($HTTP_POST_VARS['firstname']);
$lastname = tep_db_prepare_input($HTTP_POST_VARS['lastname']);
if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($HTTP_POST_VARS['dob']);
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);
if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($HTTP_POST_VARS['company']);
$street_address = tep_db_prepare_input($HTTP_POST_VARS['street_address']);
if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($HTTP_POST_VARS['suburb']);
$postcode = tep_db_prepare_input($HTTP_POST_VARS['postcode']);
$city = tep_db_prepare_input($HTTP_POST_VARS['City']);
if (ACCOUNT_STATE == 'true') {
	$state = tep_db_prepare_input($HTTP_POST_VARS['state']);
	if (isset($HTTP_POST_VARS['zone_id'])) {
		$zone_id = tep_db_prepare_input($HTTP_POST_VARS['zone_id']);
		} else {
		$zone_id = false;
	}
}
$country = tep_db_prepare_input($HTTP_POST_VARS['country']);
$telephone = tep_db_prepare_input($HTTP_POST_VARS['telephone']);
$fax = tep_db_prepare_input($HTTP_POST_VARS['fax']);
if (isset($HTTP_POST_VARS['newsletter'])) {
	$newsletter = tep_db_prepare_input($HTTP_POST_VARS['newsletter']);
	} else {
	$newsletter = false;
}

I know it has to do with the redirection part of it:

//line 21-23 sends the customer ti index.php if he is logedin
if ((tep_session_is_registered('customer_id'))&&(tep_session_is_registered('createaccount'))) { tep_redirect(tep_href_link('account_password_new.php', '', 'SSL'));
}
if (tep_session_is_registered('customer_id')) {
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'SSL'));
}

I just don't want to change this and cause problems with the way these redirections were intended to be used.

 

Any help is greatly appreciated as this is causing some confusion with my customers and I have been receiving several complaints about getting "lost"

Link to comment
Share on other sites

  • Replies 1.7k
  • Created
  • Last Reply

Top Posters In This Topic

I'm having a slight problem with FEC and the orders.php in admin.

 

PROBLEM:

I can't update the order status (ie delivered, processing etc). I can choose to update it but the effects don't take place and the customer is not notified.

 

Anyone else had this problem? Would love some thoughts and help.

Link to comment
Share on other sites

I'm having a slight problem with FEC and the orders.php in admin.

 

PROBLEM:

I can't update the order status (ie delivered, processing etc). I can choose to update it but the effects don't take place and the customer is not notified.

 

Anyone else had this problem? Would love some thoughts and help.

 

 

Still in desperate need of H E L P.

Link to comment
Share on other sites

Hi

 

Does the latest downoad now work for RC2a?

 

I saw a great site with the checkout in one page: https://visionsxpressed.com/checkout.php

 

...and their checkout page had a higher Google PR than their index ...lol!

 

 

Thankyou for your work

 

Adam

 

That is exactly what I would like to have for my checkout page. I would pay to have their checkout page. Any takers?

Link to comment
Share on other sites

Hi, i have installed this contrib (only the part II, that deals with create account + login), but i have a question... i though that it would mix the login and create account parts in the same page, (wich it does), but the thing is that it still goes before to login.php, i mean, when going to checkout, or from the breadcrum, it goes to login.php, (the same as allways), and then, with the button, to create_account... i though the main goal of this was to make the process shorter, but the customer still has to go trhough the same number of pages...is this the way its supossed to work or did i miss something?

Link to comment
Share on other sites

  • 1 month later...
Still in desperate need of H E L P.

 

And as the cream on top: orders are no longer registered in admin. customers can not see orders and they can not be found as administrator either. They do still arrive ok through email though but HIGHLY annoying.

 

HELP? Willing to donate for a solution.

Link to comment
Share on other sites

  • 4 weeks later...

Hi all of you experts.

Great contrib - I have only installede the part of combining checkout_shipping and checkout_payment.

 

I have one big wish for this contrib, that when a customer choses a shipping method (in shipping_box.php) (I use this module in the FEC folder) the payment page or hole page should reload.

 

Reason:'

I would like to use ship2pay so when a customer choses shipping method, they can only choose payments I select to fit for the shipping method.

For this to work I need the checkout_shipping to reload (or the payment_box.php) when selecting a shipping method.

 

anyone able to fix this......

 

Best regards

 

Michael.

Link to comment
Share on other sites

  • 2 weeks later...

i have installed the first part of this contribution to my store and i have checked it has beendone as per the instructions.

 

the problem is that now when someone goes to the checkout the page does not apper in affect stopping people from buying.

 

 

has anyone experinced this and does anyon know how to fix it.

Link to comment
Share on other sites

I'm totally new to OSCommerce with a small amount of knowledge of Mysql and so so php. I installed FEC 3.2 Quicker Install v5 and ran the sql arguments in PHPMyAdmin but I get this error when I submit the form on the new create_account.php (I chose create_account2.php for mine). I get this error:

 

1054 - Unknown column 'createaccount' in 'field list'

 

insert into customers (customers_firstname, customers_lastname, customers_email_address, customers_telephone, customers_fax, createaccount, customers_newsletter, confirmation_key, customers_password, customers_gender, customers_dob) values ('Christian', 'Day', '[email protected]', '(555) 555-5555', '', 'N', '', 'zchQFy0qTdxtMuo', '8afb9581c0412be42dd8353f3ce86619:e4', 'm', '19691225')

 

Does this mean my sql argument didn't go through? Or rather, it would seem it did go through because the createaccount column is there. But then why is it seen as unknown if I installed everything? Is the FEC not compatible with the latest download of OSCommerce?

 

Wishing this weren't so hard. LOL

 

Thanks!

 

Christian

Link to comment
Share on other sites

And as the cream on top: orders are no longer registered in admin. customers can not see orders and they can not be found as administrator either. They do still arrive ok through email though but HIGHLY annoying.

 

HELP? Willing to donate for a solution.

 

 

Some mean ass ask authors to do jobs for him for free!!! But I guess the author have to eat food as those mean ass do, right?? :lol:

Link to comment
Share on other sites

And as the cream on top: orders are no longer registered in admin. customers can not see orders and they can not be found as administrator either. They do still arrive ok through email though but HIGHLY annoying.

 

HELP? Willing to donate for a solution.

 

 

I can help... <_<

 

I can run FEC very successfully...

Link to comment
Share on other sites

HEY!!! This programme does NOT forward customer info to PayPal checkout!!! Any solution already??? :blink:

 

 

This PayPal module can forward customer info and the following error occurred when it worked together with the current FEC. Anybody can resolve them??

http://addons.oscommerce.com/info/2679/v,22

 

 

 

I have installed this module today and the user interface works good! However, this horrible messege appeared inside my simulated customer account!!!

 

I logged in as a customer and fill in personal information. Then, I checked out with PayPal live gateway. Of course, I didnt pay and then pushed "back to merchant". Then, this message appeared in my account. Anybody can help me?? :"(..

 

 

=====================================

1054 - Unknown column 's.public_flag' in 'where clause'

 

select o.orders_id, o.date_purchased, o.delivery_name, o.delivery_country, o.billing_name, o.billing_country, ot.text as order_total, s.orders_status_name from orders o, orders_total ot, orders_status s where o.customers_id = '3' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '1' and s.public_flag = '1' order by orders_id desc limit 3

 

[TEP STOP]

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

I installed this today because I wanted to combine the shipping and payment pages, and all is well except one thing.

 

I use Google Checkout. The one where the buttons to use it dyamically appear only on the login and shoppng cart pages. FEC is picking this up as a payment method on checkout_shipping.php and when selected, it obviously does not work.

 

Is there any way I could insert something into the catalog>includes>fec>payment_box.php file to tell it NOT to pick up Google Checkout as a payment method? Here's the file:

 

<tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
 $selection = $payment_modules->selection();

 if (sizeof($selection) > 1) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="50%" valign="top"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></td>
			<td class="main" width="50%" valign="top" align="right"><b><?php echo TITLE_PLEASE_SELECT; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
 } else {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_PAYMENT_INFORMATION; ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
 }

 $radio_buttons = 0;
 for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) {
  echo '				  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
} else {
  echo '				  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
}
?>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td>
				<td class="main" align="right">
<?php
if (sizeof($selection) > 1) {
  echo tep_draw_radio_field('payment', $selection[$i]['id']);
} else {
  echo tep_draw_hidden_field('payment', $selection[$i]['id']);
}
?>
				</td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
if (isset($selection[$i]['error'])) {
?>
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="4"><?php echo $selection[$i]['error']; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
} elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
?>
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td colspan="4"><table border="0" cellspacing="0" cellpadding="2">
<?php
  for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
?>
				  <tr>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
					<td class="main"><?php echo $selection[$i]['fields'][$j]['title']; ?></td>
					<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
					<td class="main"><?php echo $selection[$i]['fields'][$j]['field']; ?></td>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				  </tr>
<?php
  }
?>
				</table></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
}
?>
			</table></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
$radio_buttons++;
 }
?>
		</table></td>
	  </tr>
	</table></td>
  </tr>

   <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>

Link to comment
Share on other sites

Should have looked at my 'old' checkout_payment.php first.

 

In catalog>includes>fec>payment_box.php, find this near the top of the file:

 

<?php
 $selection = $payment_modules->selection();

 if (sizeof($selection) > 1) {
?>

 

Replace it with this:

 

<?php
 // ** GOOGLE CHECKOUT **
 // Skips Google Checkout as a payment option on the payments page since that option
 // is provided in the login and shopping cart pages

 $selection = $payment_modules->selection();
 for($i=0, $n=sizeof($selection); $i<$n; $i++) {
if($selection[$i]['module'] == 'GoogleCheckout') {
  array_splice($selection, $i, 1);	
  break;   
}
 }
 // ** END GOOGLE CHECKOUT **
 if (sizeof($selection) > 1) {
?>

 

Now, only my Checks/Money Order and PayPal IPN modules appear in checkout_shipping.php. And Google Checkout works just fine on its own. Maybe this will help any other GC users. :blush:

Link to comment
Share on other sites

It seems the site I picked up has an install of FEC 3.2 and the 'Alternative Checkout System' in which Frank had said in the early days of this thread partly inspired/coded this contribution.

 

Alternative Checkout System Thread

 

I can't seem to figure out a bug in which the cc expiration date isn't erroring out when expired, orders are still processed. The ACS contrib looks to be orphaned so I'm seeking help here.

 

You may be asking why the old 2005 version of ACS instead of the current FEC as it would seem FEC is an enhancement from ACS. Well one major reason. (actually I am using both contribs)

 

FEC is a two-step checkout for new and existing users

 

1. Login or create account or don't create account

2. Shipping and CC checkout

 

ACS is a one-step checkout for new users

 

1. All account info, shipping and billing info in 1 page - single click to checkout_success.php

 

If already logged in, then we use FEC's combined shipping/checkout page (which doesn't have the CC expire problem).

 

I've compared both files and just can't figure out what I'm missing.

 

Any help on fixing this problem would be appreciated. Like I said, no errors, just processing CC's with expired dates. Thanks.

Link to comment
Share on other sites

Hello,

 

Im using FEC Quicker Install v5.1 Ver with CCGV5.20_1.

 

Its working in Firefox.........but not working in IE7.

1. When i enable this code 'echo $order_total_modules->credit_selection();//rmh M-S_ccgv' in checkout_shipping.php.

2. And showing this error code in IE7 'document.checkout_payment.shipping.0' is not null or not an object.

 

 

3. This is the checkout_confirmation.php code....................

 

 

// ################# Added CGV Contribution ##################"

// CCGV Contribution

$order_total_modules = new order_total;

$order_total_modules->collect_posts();

$order_total_modules->pre_confirmation_check();

/// #################BEGIN fec for get total

$paynow = tep_db_prepare_input($HTTP_GET_VARS['paynow']);

if ($paynow ==3) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'show_total=1&error_message=' . urlencode(ERROR_TOTAL_NOW), 'SSL'));

}

/// ##########END fec for get total

// if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {

if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) ) {

// ################# End Added CGV Contribution ##################"

 

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));

}

 

 

 

is this ok?

 

Please help me......... thank you so much.

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...