Jump to content
Latest News: (loading..)
NimaP

One Page Checkout Support

Recommended Posts

I have the Dwolla payment method installed and I it works OK when I don't have the One Page Checkout enabled, but with OPC enabled it does not show the box to enter the account number.

I realize you may not have any experience with Dwolla, but the Dwolla thread will have no experience with OPC. I will also post this there.

 

I am trying to find how to adjust this but I am not the best at php code let alone java, ajax, flash stuff.

Edited by ourcoffeebarn

Life Is Too Short,

Enjoy Your Coffee!

Pete

Share this post


Link to post
Share on other sites

I have the Dwolla payment method installed and I it works OK when I don't have the One Page Checkout enabled, but with OPC enabled it does not show the box to enter the account number.

I realize you may not have any experience with Dwolla, but the Dwolla thread will have no experience with OPC. I will also post this there.

 

I am trying to find how to adjust this but I am not the best at php code let alone java, ajax, flash stuff.

Hi,

 

you need to move code from function process into function selection i beleive

 

if no luck let me know

 

Steve

Share this post


Link to post
Share on other sites

My problem is this -> Authorization Failed

 

I have been able to open the login box

 

http://forums.oscommerce.com/topic/333292-one-page-checkout-support/page__view__findpost__p__1490183

 

My checkout.php.html ->

 

<?php
/*
   Copyright (c) Freeoscommerce.com 2009

This file is part of a freeoscommerce.com template.  Please visit http://www.freeoscommerce.com for licensing and other information.
*/
?><!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>

<?php global $language, $languages_id, $breadcrumb;
include_once DIR_WS_MODULES . 'kiss_meta_tags/kiss_meta_tags.php'; ?>
<?php include (DIR_WS_INCLUDES . 'page-header-inc.htc'); ?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="ext/jQuery/themes/smoothness/ui.all.css">

<!--$headcontent-->
<link rel="stylesheet" type="text/css" href="$templatedir/freeoscommerce_081_stylesheet.css">
</head>
<body>
<div id="wrapper1">
 <div id="wrapper2">
<!-- Header -->        
   <div id="header_wrapper">
     <div id="header">
       <div id="top_menu">
         <span><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">Home</a>'; ?></span>
         <span><?php echo '<a href="' . tep_href_link(FILENAME_SPECIALS) . '">' . BOX_HEADING_SPECIALS . '</a>'; ?></span>
         <span><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT) . '">' . HEADER_TITLE_MY_ACCOUNT . '</a>'; ?></span>
         <span><?php echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . BOX_HEADING_SHOPPING_CART . '</a>'; ?></span>
         <span><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING) . '">' . HEADER_TITLE_CHECKOUT . '</a>'; ?></span>
         <?php if (tep_session_is_registered('customer_id')) { ?>
           <span><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></span>
         <?php } ?>
       </div>
     </div>
     <div id="header_background1"></div>
     <div id="header_background2"></div>
   </div>
<!-- Content and Sidebars-->    
   <div id="wrapper3">
     <div id="content_wrapper">
       <div id="content">

         <div id="navigation">
           You are here: $breadcrumbs <br>
           <hr class="accessibility">
         </div>
         <div>
           $content
         </div>        
       </div>
     </div>


     <div id="left_sidebar_wrapper">
       <div id="left_sidebar">

		$categorybox
		$manufacturerbox
		$whatsnewbox
		$cartbox
		$informationbox        
       </div>
     </div>
     <div id="right_sidebar_wrapper">
       <div id="right_sidebar">
         $catmenu  
         $searchbox
         $maninfobox
         $orderhistorybox
         $bestsellersbox
         $reviewsbox
         $tellafriendbox
         $languagebox
         $currenciesbox
       </div>
     </div>
   </div>
<!-- Footer -->    
   <div id="footer">
     <div id="footer_content">
	<!-- $analitycs--> 
       This is the footer.<br><br>
       <a style="color: #000000" href="http://freeoscommerce.com/" target="_blank">Free osCommerce Templates</a>
     </div>
     <div id="footer_background1"></div>
     <div id="footer_background2"></div>
   </div>
<!-- Layout Graphics -->        
 </div>
 <div id="left_shadow"></div>
 <div id="right_shadow"></div>
</div>
<div id="top_background"></div>
<div id="main_background"></div>
<!-- Website Name/Logo -->    
<div id="website_name"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . STORE_NAME . '</a>'; ?></div>

</body>
</html>
<!-- dialogs_bof //-->
<div id="loginBox" title="Log Into My Account" style="display:none;"><table cellpadding="2" cellspacing="0" border="0">
<tr>
 <td class="main">E-Mail Address:</td>
 <td><input type="text" name="email_address" id="email_address"></td>
</tr>
<tr>
 <td class="main">Password:</td>

 <td><input type="password" name="login_password" maxlength="40" id="login_password"></td>
</tr>
<tr>
 <td colspan="2" align="right"><img src="includes/languages/english/images/buttons/button_login.gif" border="0" alt="IMAGE_LOGIN" title=" IMAGE_LOGIN " width="100" height="22" id="loginWindowSubmit"></td>
</tr>
</table></div>
<div id="addressBook" title="Address Book" style="display:none"></div>
<div id="newAddress" title="New Address" style="display:none"></div>
<!-- dialogs_eof//-->

 

 

Just stumbled over the same problem, it is a variable mismatch - the solution is very simple:

 

find in checkout.php :

 

var pass = $('input[name=password]', $dialog).val();

 

change to :

var pass = $('input[name=login_password]', $dialog).val();

 

That's it

 

Cheers

Share this post


Link to post
Share on other sites

I'm sorry but this has got to be one of the most fustrating contributions I've ever used.

 

Way too many ajax requests. If 1 ajax requests takes a minimum of 200 ms, then the 6-7 of them I see happening will take almost 2 seconds to finish. Abort the ajax commands whenever you can, or at least do the majority of them when the user clicks the submit button.

 

Also, what if I decide to prevent all javascript code from running, there would be no database checks before processing, is this secure. Its a great idea for a contribution, just really needs to be updated, because its not practical.

 

Edit:

 

Yup, total security issue. I can easily make duplicate customers by ignoring the verifications.

Edited by alphanetchrisc

Share this post


Link to post
Share on other sites

After installing this contribution I got the error 'there was an error setting payment, ' when I selected my credit card payment option. No additional credit card boxes appeared so I was unable to complete credit card number, name, expiry etc. If I pressed okay on the error & continue on the checkout page the credit card boxes did eventually appear. This issue is also detailed in post #1952 on page 98, however not the piece of code that fixed my error.

Thanks to Steve, my error was fixed changing the code:

in catalog/includes/classes/onepage_checkout.php

find

/* Comment line below for oscommerce versions before MS2.2 RC2a */

$confirmation = $GLOBALS[$payment]->confirmation();

 

/* Uncomment line below for oscommerce versions before MS2.2 RC2a */

//$confirmation = $GLOBALS[$payment]->selection();

 

change it to

/* Comment line below for oscommerce versions before MS2.2 RC2a */

//$confirmation = $GLOBALS[$payment]->confirmation();

 

/* Uncomment line below for oscommerce versions before MS2.2 RC2a */

$confirmation = $GLOBALS[$payment]->selection();

Share this post


Link to post
Share on other sites

Do I need to install a special free shipping module in order to have free shipping with one page checkout? My regular checkout works fine so when a customer purchases a gift voucher they go through payment & checkout without the shipping module appearing, and without being charged postage (I use flat rate postage).

I have gift vouchers set up with Product Model # GIFT, Products Weight # 0.00. And Config/Download set to True.

I have one page checkout set up with FALSE in the dont show shipping and handling if product weight = 0 .

When I activate one page checkout, the shipping info shows when I go to purchase a gift voucher.......is this issue something to do with my setup/install?? Does it matter my Products Weight # 0.00 has a decimal place?

I should probably mention I also have Gift Voucher/Credit Class installed.

Appreciate your thoughts!

Share this post


Link to post
Share on other sites

Do I need to install a special free shipping module in order to have free shipping with one page checkout? My regular checkout works fine so when a customer purchases a gift voucher they go through payment & checkout without the shipping module appearing, and without being charged postage (I use flat rate postage).

I have gift vouchers set up with Product Model # GIFT, Products Weight # 0.00. And Config/Download set to True.

I have one page checkout set up with FALSE in the dont show shipping and handling if product weight = 0 .

When I activate one page checkout, the shipping info shows when I go to purchase a gift voucher.......is this issue something to do with my setup/install?? Does it matter my Products Weight # 0.00 has a decimal place?

I should probably mention I also have Gift Voucher/Credit Class installed.

Appreciate your thoughts!

Hi

 

No you dont it works with all shipping and order total modules same as normal store does, might need some code added if you add any to any checkout page otherwise will work out of the box with them

 

Steve

Share this post


Link to post
Share on other sites

I have combed through this thread and found similar problem but no suitable answer.

1. Everything seems to work well, but on checkout_success page, I get a blank page after installing OPC. Even when I set it to false in admin to revert back to the previous, normal checkout process, I now get the blank page. I bring back back the original catalog/checkout_process file, and I get the same blank page.

The message I get from the error log is;

Fatal error: Call to a member function loadSessionVars() on a non-object in /home/user/public_html/yebo7.com/checkout_process.php on line 60

 

Line 60 is somewhere here:

One Page Checkout - BEGIN */

if (ONEPAGE_CHECKOUT_ENABLED == 'True'){

$onePageCheckout->loadSessionVars();

$onePageCheckout->fixTaxes();

 

/*

* This error report is due to the fact that we cannot duplicate some errors.

* please forward this email always if you recieve it

*/

if ($order->customer['email_address'] == '' || $order->customer['firstname'] == '' || $order->billing['firstname'] == '' || $order->delivery['firstname'] == ''){

ob_start();

echo 'ONEPAGE::' . serialize($onepage);

echo 'SESSION::' . serialize($_SESSION);

echo 'SERVER::' . serialize($_SERVER);

echo 'ORDER::' . serialize($order);

$content = ob_get_contents();

mail(ONEPAGE_DEBUG_EMAIL_ADDRESS, 'Order Error: Please forward to I.T. Web Experts', $content);

unset($content);

ob_end_clean();

}

}

/* One Page Checkout - END */

 

 

2. Secondly, do I have to install kgt_howto even though I'm not interested in coupons? Could it be that it's because I didn't install this?

 

Please help!

 

Felix

Hi Felix

 

1 did you send it web experts that mail ?

 

2 no you dont have to install the coupon add on

 

Steve

Share this post


Link to post
Share on other sites

I downloaded the most recent version of this contrib and like the instructions say - "copy over 'ext', 'images', and 'includes' folder over", and after I do that I can't see anything referring to One Page Checkout in any admin screen - and it also doesn't put all of it on one page during checking (I assume it's disabled initially) - but I have no clue how to enable it.

Share this post


Link to post
Share on other sites

I'm excited about this add-on but can't seem to get it to work. I'm installing it on an osCommerce 2.3.1 site that only has a couple other add-ons presently (SEO URLS 5 and Order Editor). I've uploaded everything and made all the necessary changes but I'm getting the following error:

 

Call to undefined method oscTemplate::getHeaderTags() in /******/checkout.php on line 285

 

I tried commenting out the line:

 

<?php echo $oscTemplate->getHeaderTags(); ?>

 

but doing so only returns a blank page when attempting to check out.

 

Any ideas? Also, I have an Authorize.Net AIM payment module I'm using, but there weren't any instructions for updating these files. Are any changes necessary to these files?

 

Thanks in advance for any help on this

Share this post


Link to post
Share on other sites

I downloaded the most recent version of this contrib and like the instructions say - "copy over 'ext', 'images', and 'includes' folder over", and after I do that I can't see anything referring to One Page Checkout in any admin screen - and it also doesn't put all of it on one page during checking (I assume it's disabled initially) - but I have no clue how to enable it.

Anybody got any clue about this? What am I supposed to see different once I upload those 3 folders?

Share this post


Link to post
Share on other sites

Anybody got any clue about this? What am I supposed to see different once I upload those 3 folders?

have you scroll past the version history, where there is furhter instructions?

as there are changes that are needed to be made to the standard checkout files, (and a few others)

Share this post


Link to post
Share on other sites

I'm excited about this add-on but can't seem to get it to work. I'm installing it on an osCommerce 2.3.1 site that only has a couple other add-ons presently (SEO URLS 5 and Order Editor). I've uploaded everything and made all the necessary changes but I'm getting the following error:

 

Call to undefined method oscTemplate::getHeaderTags() in /******/checkout.php on line 285

 

I tried commenting out the line:

 

<?php echo $oscTemplate->getHeaderTags(); ?>

 

but doing so only returns a blank page when attempting to check out.

 

Any ideas? Also, I have an Authorize.Net AIM payment module I'm using, but there weren't any instructions for updating these files. Are any changes necessary to these files?

 

Thanks in advance for any help on this

 

had a look at the file, the checkout file seems to be based off an older version of osc 2.3 and not the current 2.3.1, there are a few differances.

 

e.g.

<?php echo $oscTemplate->getHeaderTags(); ?> in checkout.php

compaired to

<?php echo $oscTemplate->getBlocks('header_tags'); ?> in template_top.php

 

and it has <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

which is now longer used, as it is all admin controlled.

 

there are a few other things that need to be changed

Share this post


Link to post
Share on other sites

I'm excited about this add-on but can't seem to get it to work. I'm installing it on an osCommerce 2.3.1 site that only has a couple other add-ons presently (SEO URLS 5 and Order Editor). I've uploaded everything and made all the necessary changes but I'm getting the following error:

 

Call to undefined method oscTemplate::getHeaderTags() in /******/checkout.php on line 285

 

 

Hi, I use OSC 2.2 rc2a and I get the same error as you. Havn't figured it out yet, but it has to be something more then that the module is made för an older version. I guess 2.2 should be old enough.

Even me, I'm interested in how to solve this problem.

 

/George

Share this post


Link to post
Share on other sites

Anybody got any clue about this? What am I supposed to see different once I upload those 3 folders?

Have you made the necessary changes to the other files? (The ones you don't have to upload, but edit). If you did, you should see "One page checkout" in your admin configuration.

Share this post


Link to post
Share on other sites

Hi, I use OSC 2.2 rc2a and I get the same error as you. Havn't figured it out yet, but it has to be something more then that the module is made för an older version. I guess 2.2 should be old enough.

Even me, I'm interested in how to solve this problem.

 

/George

 

The current version (1.5) was designed to be used with osc 2.3. and not OSC 2.2 rc2a.

osc 2.3 is vastly changed from 2.2, in reguards to the code used.

Share this post


Link to post
Share on other sites

The current version (1.5) was designed to be used with osc 2.3. and not OSC 2.2 rc2a.

osc 2.3 is vastly changed from 2.2, in reguards to the code used.

 

Well I don't know about that because I have 1.5 installed and functioning on OSC 2.2 rc2a. The only problem I had was that he failed to inform everyone that you need an upgraded version of php on your server or at least have the json_encode function somewhere because he uses that now for the payment input fields. Additionally the new_address.php page has "saveAddress" when it should be "addNewAddress" in the hidden field info at the top AND you need to remove the empty carriage return after the "success:true" in the saveAddress function in the onepage_checkout.php class file. Other than that it works perfectly, so long as you follow the installation instructions, including running the SQL statements.

Share this post


Link to post
Share on other sites

Well I don't know about that because I have 1.5 installed and functioning on OSC 2.2 rc2a. The only problem I had was that he failed to inform everyone that you need an upgraded version of php on your server or at least have the json_encode function somewhere because he uses that now for the payment input fields. Additionally the new_address.php page has "saveAddress" when it should be "addNewAddress" in the hidden field info at the top AND you need to remove the empty carriage return after the "success:true" in the saveAddress function in the onepage_checkout.php class file. Other than that it works perfectly, so long as you follow the installation instructions, including running the SQL statements.

 

i know what i did now, i was working on some changes to it, as i found the menus was not correct, as it was using the older method of using the column left and right, instead of being controlled through the database, so i made throse changes, and when i looked to reply back i looked at my changes and not the orginal package.

 

you would of also needed to remove one other line about headertags as well

Share this post


Link to post
Share on other sites

been having problems on my live site, for some reason it is not effecting my local version on xampp.

 

after i enter an email address, it gets stuck on checking email address.

error console on firefox says date is null at line 1228

 

which is

if (data.success == false){

 

which is part of the email address check

$('input[name="billing_email_address"]').each(function (){
		$(this).unbind('blur').blur(function (){
			var $thisField = $(this);

			if (checkoutClass.initializing == true){
				checkoutClass.addIcon($thisField, 'required');
			}else{
				if (this.changed == false) return;
				if (checkoutClass.fieldErrorCheck($thisField, true, true) == false){
					this.changed = false;
					checkoutClass.queueAjaxRequest({
						url: checkoutClass.pageLinks.checkout,
						data: 'action=checkEmailAddress&emailAddress=' + $thisField.val(),
						type: 'post',
						beforeSendMsg: 'Checking Email Address',
						dataType: 'json',
						success: function (data){
							$('.success, .error', $thisField.parent()).hide();
							if (data.success == false){
								checkoutClass.addIcon($thisField, 'error', data.errMsg.replace('/n', "\n"));
								alert(data.errMsg.replace('/n', "\n").replace('/n', "\n").replace('/n', "\n"));
							}else{
								checkoutClass.addIcon($thisField, 'success');
							}
						},
						errorMsg: 'There was an error checking email address, You may complete your order with lowcostbedsandmattressdirect.co.uk by calling 08444 122499 (Lo-Call).'
					});
				}
			}
		}).keyup(function (){
			this.changed = true;
		});
		bindAutoFill($(this));
	});

 

Share this post


Link to post
Share on other sites

been having problems on my live site, for some reason it is not effecting my local version on xampp.

 

after i enter an email address, it gets stuck on checking email address.

error console on firefox says date is null at line 1228

 

which is

if (data.success == false){

 

which is part of the email address check

$('input[name="billing_email_address"]').each(function (){
		$(this).unbind('blur').blur(function (){
			var $thisField = $(this);

			if (checkoutClass.initializing == true){
				checkoutClass.addIcon($thisField, 'required');
			}else{
				if (this.changed == false) return;
				if (checkoutClass.fieldErrorCheck($thisField, true, true) == false){
					this.changed = false;
					checkoutClass.queueAjaxRequest({
						url: checkoutClass.pageLinks.checkout,
						data: 'action=checkEmailAddress&emailAddress=' + $thisField.val(),
						type: 'post',
						beforeSendMsg: 'Checking Email Address',
						dataType: 'json',
						success: function (data){
							$('.success, .error', $thisField.parent()).hide();
							if (data.success == false){
								checkoutClass.addIcon($thisField, 'error', data.errMsg.replace('/n', "\n"));
								alert(data.errMsg.replace('/n', "\n").replace('/n', "\n").replace('/n', "\n"));
							}else{
								checkoutClass.addIcon($thisField, 'success');
							}
						},
						errorMsg: 'There was an error checking email address, You may complete your order with lowcostbedsandmattressdirect.co.uk by calling 08444 122499 (Lo-Call).'
					});
				}
			}
		}).keyup(function (){
			this.changed = true;
		});
		bindAutoFill($(this));
	});

 

did some more testing, works fine when not using SSL, but when i turn it back on, and it goes to the shared ssl that the hosting provider uses, it fails at checking the email address.

Share this post


Link to post
Share on other sites

did some more testing, works fine when not using SSL, but when i turn it back on, and it goes to the shared ssl that the hosting provider uses, it fails at checking the email address.

 

the problem is also effecting the payment / billing parts as well (they disappear when i finish inputing the delivery info

Share this post


Link to post
Share on other sites

Hi, when OPC go to my bank and payment fails return to checkout.php, but all user data is in blank. How can I solve this? I would like when the payment fails and return to checkout.php all data remain.

 

Regards

Share this post


Link to post
Share on other sites

Hey,

 

does anybody know by now, in which case(s) the following error is taking place?

 

Some orders of my customers shop are incomplete, although the input fields were completly filled.

 

changes for checkout_process.php:

/* One Page Checkout - BEGIN */
 if (ONEPAGE_CHECKOUT_ENABLED == 'True'){
     $onePageCheckout->loadSessionVars();
     $onePageCheckout->fixTaxes();

     /*
      * This error report is due to the fact that we cannot duplicate some errors.
      * please forward this email always if you recieve it
      */
     if ($order->customer['email_address'] == '' || $order->customer['firstname'] == '' || $order->billing['firstname'] == '' || $order->delivery['firstname'] == ''){
     	ob_start();
     	echo 'ONEPAGE::' . serialize($onepage);
     	echo 'SESSION::' . serialize($_SESSION);
     	echo 'SERVER::' . serialize($_SERVER);
     	echo 'ORDER::' . serialize($order);
     	$content = ob_get_contents();
     	mail(ONEPAGE_DEBUG_EMAIL_ADDRESS, 'Order Error: Please forward to I.T. Web Experts', $content);
     	unset($content);
     	ob_end_clean();
     }
 }
/* One Page Checkout - END */

 

I got this e-mail three times now and all data is in the session, but neither in the onepage object nor in the order object...

 

Greetings from Germany,

Martin

Edited by 7thSENSE

Share this post


Link to post
Share on other sites

I'm excited about this add-on but can't seem to get it to work. I'm installing it on an osCommerce 2.3.1 site that only has a couple other add-ons presently (SEO URLS 5 and Order Editor). I've uploaded everything and made all the necessary changes but I'm getting the following error:

 

Call to undefined method oscTemplate::getHeaderTags() in /******/checkout.php on line 285

 

I tried commenting out the line:

 

<?php echo $oscTemplate->getHeaderTags(); ?>

 

but doing so only returns a blank page when attempting to check out.

 

Any ideas? Also, I have an Authorize.Net AIM payment module I'm using, but there weren't any instructions for updating these files. Are any changes necessary to these files?

 

Thanks in advance for any help on this

just remove them lines or use 1.4 1.5 is for osc 2.3

Share this post


Link to post
Share on other sites

Hey,

 

does anybody know by now, in which case(s) the following error is taking place?

 

Some orders of my customers shop are incomplete, although the input fields were completly filled.

 

changes for checkout_process.php:

/* One Page Checkout - BEGIN */
 if (ONEPAGE_CHECKOUT_ENABLED == 'True'){
     $onePageCheckout->loadSessionVars();
     $onePageCheckout->fixTaxes();

     /*
      * This error report is due to the fact that we cannot duplicate some errors.
      * please forward this email always if you recieve it
      */
     if ($order->customer['email_address'] == '' || $order->customer['firstname'] == '' || $order->billing['firstname'] == '' || $order->delivery['firstname'] == ''){
     	ob_start();
     	echo 'ONEPAGE::' . serialize($onepage);
     	echo 'SESSION::' . serialize($_SESSION);
     	echo 'SERVER::' . serialize($_SERVER);
     	echo 'ORDER::' . serialize($order);
     	$content = ob_get_contents();
     	mail(ONEPAGE_DEBUG_EMAIL_ADDRESS, 'Order Error: Please forward to I.T. Web Experts', $content);
     	unset($content);
     	ob_end_clean();
     }
 }
/* One Page Checkout - END */

 

I got this e-mail three times now and all data is in the session, but neither in the onepage object nor in the order object...

 

Greetings from Germany,

Martin

Hi Martin,

 

Fisrt of what payment module are you using also check that payment module doesnt have its own process page like paypal standard/ipn has

 

if it has modify according to the paypal in install guide

 

Steve

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×