Jump to content
NimaP

One Page Checkout Support

Recommended Posts

Steve,

 

Made the modifications you suggested and the checkout page is still blank the same as it was as before. I left in the modifications that you had suggested with the checkout.php.

 

Thanks,

 

Marduke

Hi Marduke

 

It is very weird, must be down to that template, a file compare on on all files in includes/modules & classes might help you but will take a while

 

Steve

Share this post


Link to post
Share on other sites

Hey guys, just installed one page checkout, my problem is that when I click on "checkout" from the shopping cart page it takes me to Order_info.php and after filling that out it keeps redirecting back to itself. I'm not quite sure what the problem is. If anyone can help or has any ideas it is greatly appreciated. I have opc disabled at the moment but if anyone wants to check it out let me know and I will enable it so you can see the problem.

Hi all i can say is recheck install and make sure you havent left anything out

 

Steve

Share this post


Link to post
Share on other sites

Hello, I have not been able to find the solution to this.

 

When the user tries to checkout out and it fails, the checkout screen returns with the state drop down box field filled in, but the verification box with a red x. You have to change it to another state and then change it back.

 

This site only sells to USA.

 

Anybody know the answer to this one??

 

The site is:

http://www.m-rock.com/

 

Thanks in advance.

 

Rich

Edited by ragnew

Share this post


Link to post
Share on other sites

Hello,

 

I have installed the one page checkout on my new website and that works ok but now I want to add the payment module idealm (contribution 3759) for the Dutch banking system and I am having troubles to get that working.

The site is on RC2A en I have also installed the MATC (must agree to conditions) contribution in the one page checkout.

For the ideal module I have the following problem: on the admin site I can get everything working fine. On the one page checkout: once you have created an address/or logged in to your account the iDeal payment module shows up with no errors (so it is connected to the bank) but you must refresh your browser in order to get the pull down menu for the bank selection and that vanishes after about 1 second.

Has anyone experience in combining these 2 contributions because iDeal is the most important online payment system in the Netherlands.

Share this post


Link to post
Share on other sites

I was going to add this fix to the list of packages on the One Page Checkout contribution page, but as the author has chosen to not allow public uploads, I couldn't. Seems a shame that many people are likely to miss the opportunity to use this contribution fully because firstly, it doesn't work correctly, and secondly, most of those people are unlikely to find this fix in here.

 

There are several other issue I have with the code for this contribution, and as I find fixes, I will post them here.

 

Right, here we go.......

 

 

FIX FOR ISSUE WHERE TWO CUSTOMER ACCOUNTS ARE CREATED FOR EACH ORDER WHEN THE CONTRIBUTION IS SET TO CREATE ACCOUNT

 

The instructions for this contribution state that the following edit should be made to the file "checkout_success.php":

 

FIND THIS:

// if the customer is not logged on, redirect them to the shopping cart page
 if (!tep_session_is_registered('customer_id')) {
   tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
 }

REPLACE WITH:

/* One Page Checkout - BEGIN */
 if (ONEPAGE_CHECKOUT_ENABLED == 'True'){
     if (!tep_session_is_registered('onepage')){
         if (!tep_session_is_registered('customer_id')) {
             tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
         }
     }else{
         require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT);
         require_once('includes/functions/password_funcs.php');
         require('includes/classes/onepage_checkout.php');
         $onePageCheckout = new osC_onePageCheckout();
         $onePageCheckout->createCustomerAccount();
     }
 }else{
     if (!tep_session_is_registered('customer_id')) {
         tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
     }
 }
/* One Page Checkout - END */

 

I am sure that this code does not produce the results that the author intended. The effect of this code is that TWO customer records are added to the database when the admin panel controls for this contribution are set to create an account. The first customer database record is created when the customer first hits the "checkout_success.php" page, and the second is created when the customer clicks the continue button on the "checkout_success.php" page (the continue button fires a form which resubmits to the same page in order to process product notifications for the customer).

 

The fix to this problem is simply to add another conditional which checks for the presence of a customer_id in the session variables prior to adding the customer record, since if the customer has already been added to the system on a previous iteration of the page, the session variable will be present.

 

Rather than use the code supplied for the top of "checkout_success.php" from the latest package (v1.09), use the following code instead:

 

FIND THIS:

// if the customer is not logged on, redirect them to the shopping cart page
 if (!tep_session_is_registered('customer_id')) {
   tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
 }

REPLACE WITH:

// START: One Page Checkout v1.09
 /*
 // PREVIOUS CODE APPEARS WITHIN THESE COMMENTS!!!
// if the customer is not logged on, redirect them to the shopping cart page
 if (!tep_session_is_registered('customer_id')) {
   tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
 }
 */

 if (ONEPAGE_CHECKOUT_ENABLED == 'True'){
   if (!tep_session_is_registered('onepage')){
     if (!tep_session_is_registered('customer_id')) {
       tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
     }
   } else {
     if (!tep_session_is_registered('customer_id')) {
       // there is no customer identifier in the session vars so we need to create an account
       require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT);
       require_once('includes/functions/password_funcs.php');
       require('includes/classes/onepage_checkout.php');
       $onePageCheckout = new osC_onePageCheckout();
       $onePageCheckout->createCustomerAccount();
     }
   }
 } else {
   if (!tep_session_is_registered('customer_id')) {
     tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
   }
 }
// END: One Page Checkout v1.09

Share this post


Link to post
Share on other sites

Hello, I need to add fields to the checkout process, and I have been partially successfull so far. I need to know where this line occurs to add a fax field, into the orders table where customer is not registred.

insert into TABLE_ORDERS (customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, date_purchased, orders_status, currency, currency_value)

 

Anyone know where to find this?

Share this post


Link to post
Share on other sites

Hello, I need to add fields to the checkout process, and I have been partially successfull so far. I need to know where this line occurs to add a fax field, into the orders table where customer is not registred.

insert into TABLE_ORDERS (customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, date_purchased, orders_status, currency, currency_value)

 

Anyone know where to find this?

Sorry are you looking for this in checkout_process.php or in one page checkout files, as i've done a store wide search and it doesn't appear any where, what version of OSC are you using?

 

Steve

Share this post


Link to post
Share on other sites

Hello,

 

I have installed the one page checkout on my new website and that works ok but now I want to add the payment module idealm (contribution 3759) for the Dutch banking system and I am having troubles to get that working.

The site is on RC2A en I have also installed the MATC (must agree to conditions) contribution in the one page checkout.

For the ideal module I have the following problem: on the admin site I can get everything working fine. On the one page checkout: once you have created an address/or logged in to your account the iDeal payment module shows up with no errors (so it is connected to the bank) but you must refresh your browser in order to get the pull down menu for the bank selection and that vanishes after about 1 second.

Has anyone experience in combining these 2 contributions because iDeal is the most important online payment system in the Netherlands.

Hi

 

Did you follow the install instructions for MATC i posted a few posts above or on next page? as i noticed using MATC instruction and including the MATC module will cause problems

 

Steve

Share this post


Link to post
Share on other sites

I've a problem with tax...when I buy something, my one-page checkout already shows tax % for my state added to the order even if no state has been selected yet...when I select the state for the shipping or billing address the taxes are still there when instead they should disappear...at least when I pick a state different from the one where my store resides...I've been trying to look into my admin panel for tax settings issues but everything seems ok there...

can someone tell me where should I look to fix this?

Share this post


Link to post
Share on other sites

Figured out my problem with Credit Class/Gift Voucher. Had to comment out a couple of lines in the ot_coupon.php file, so I'm good with that now.

 

But, I still have problems with PayPal. The standard module works, but it does not log the buyer's order if they don't return to the website like the IPN modules do. So, if a buyer doesn't return to the checkout_success screen, the order doesn't get created. I get a payment but no order.

 

Tried installing two things today to log the order before they proceed to PayPal...Held Orders and OrderCheck...but neither of them work. Presumably, there's some conflict with One Page Checkout. No errors appearing with them...they just don't work, nothing is being logged.

 

I already have Recover Cart Sales installed so I can see what they purchased....but no shipping info.

 

Can anyone recommend a solution?

 

- Andrea

Hi Andrea,

 

Held orders will work

 

in catalog/checkout.php

find

require('includes/classes/http_client.php');

 

Add after it

if (tep_session_is_registered('held_order')) {
tep_db_query("delete from " . TABLE_HOLDING_ORDERS . " where orders_id = '" . $held_order . "'");
tep_db_query("delete from " . TABLE_HOLDING_ORDERS_PRODUCTS . " where orders_id = '" . $held_order . "'");
tep_db_query("delete from " . TABLE_HOLDING_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . $held_order . "'");
tep_db_query("delete from " . TABLE_HOLDING_ORDERS_PRODUCTS_DOWNLOAD . " where orders_id = '" . $held_order . "'");
tep_db_query("delete from " . TABLE_HOLDING_ORDERS_STATUS_HISTORY . " where orders_id = '" . $held_order . "'");
tep_db_query("delete from " . TABLE_HOLDING_ORDERS_TOTAL . " where orders_id = '" . $held_order . "'");
tep_session_unregister('held_order');
}

 

find

	  switch($action){
	  case 'process':
		  echo $onePageCheckout->processCheckout();

change it

	  switch($action){
	  case 'process':
                          require('held_orders_process.php');
		  echo $onePageCheckout->processCheckout();

 

Steve

Share this post


Link to post
Share on other sites

Hello, I have not been able to find the solution to this.

 

When the user tries to checkout out and it fails, the checkout screen returns with the state drop down box field filled in, but the verification box with a red x. You have to change it to another state and then change it back.

 

This site only sells to USA.

 

Anybody know the answer to this one??

 

The site is:

http://www.m-rock.com/

 

Thanks in advance.

 

Rich

 

Hi Rich,

 

See if you can get their demo site to do the same, then report it as a bug

 

Steve

Share this post


Link to post
Share on other sites

I've a problem with tax...when I buy something, my one-page checkout already shows tax % for my state added to the order even if no state has been selected yet...when I select the state for the shipping or billing address the taxes are still there when instead they should disappear...at least when I pick a state different from the one where my store resides...I've been trying to look into my admin panel for tax settings issues but everything seems ok there...

can someone tell me where should I look to fix this?

Hi Try this http://forums.oscommerce.com/topic/333292-one-page-checkout-support/page__view__findpost__p__1425265

Share this post


Link to post
Share on other sites

 

Thanks Steve...I will try that too...

also do you know why when I click to pay for the order and my page is moved to paypal screen instead of the description of the item I am buying I get the name of the store?

I am using paypal standard payment method...

capture shows better:

paypal_description.jpg

Share this post


Link to post
Share on other sites

 

Still trying to figure out...no luck...

tried deleting all the tax settings in my admin panel and now taxes are not showing up at all...

tried re-creating the tax zone but no luck...no tax at all at this moment...

will post if I can solve it...but if you have an idea of which files should I look into it would be great...

let me know

thanks...

Edited by cherubrock74

Share this post


Link to post
Share on other sites

No luck Steve...for some reasons it is like when I am checking out the store already suppose I am in CT (the state for which I've set tax% in admin panel)

how should I fix that?

Hi try in admin>configuration>my store

leave state field blank see if that helps,

Regards to paypal it normally just displays name of store for list of products there is a charge and paypal mods need a setting cant remember which it was old paypal ipn had it

 

Steve

Share this post


Link to post
Share on other sites

Sorry are you looking for this in checkout_process.php or in one page checkout files, as i've done a store wide search and it doesn't appear any where, what version of OSC are you using?

 

Steve

 

If I could find it I would have my answer, :) but I know that this query gets generated by oscommerce, and this is where I need somehow add the field customers_fax, because when I comment out define('TABLE_ORDERS', 'orders'); before processing the order, I get that query code as part of the tep stop. Question is, how does that query geet generated.

Share this post


Link to post
Share on other sites

Version 1.1 released: http://addons.oscommerce.com/info/6646

 

#1: fixed bug when logged in customer refreshes page javascript error

#2: When updating the quantities at the top of One Page Checkout is delayed until a second click on the update button

#3: Firing off the order totals more often then necessary. When calling (js)updateShippingMethods()

#4: Session IDs are being doubled in the URL when entering the One Page Checkout.

#5: minor osCommerce standards issues

#6: IMAGE_UPDATE_CART and IMAGE_LOGIN added to language file

#7: includes/checkout/cart.php Missing closing anchor

#8: Shipping Tax fix

#9: Bugfix for Paypal Standard and paypal IPN payment modules where it wasn't updating shipping method

#10: Bugfix for latin/swedish/norwegian characters when using other charsets

#11: Protex installation instructions

#12: KTG coupon module support added

Share this post


Link to post
Share on other sites

Hi try in admin>configuration>my store

leave state field blank see if that helps,

Regards to paypal it normally just displays name of store for list of products there is a charge and paypal mods need a setting cant remember which it was old paypal ipn had it

 

Steve

 

Steve I just found out this error...I am getting it when after completed payment using PayPal I clicked on the button to return to the store...

before I used to get back to the cart...but now for some reasons I am getting this:

 

Fatal error: Call to a member function on a non-object in /homepages/5/d180349627/htdocs/rpmct.com/e-store/includes/modules/payment/paypal_standard.php on line 522

 

any help?

should I install the new version that was just released?

Share this post


Link to post
Share on other sites

Version 1.1 released: http://addons.oscommerce.com/info/6646

 

#1: fixed bug when logged in customer refreshes page javascript error

#2: When updating the quantities at the top of One Page Checkout is delayed until a second click on the update button

#3: Firing off the order totals more often then necessary. When calling (js)updateShippingMethods()

#4: Session IDs are being doubled in the URL when entering the One Page Checkout.

#5: minor osCommerce standards issues

#6: IMAGE_UPDATE_CART and IMAGE_LOGIN added to language file

#7: includes/checkout/cart.php Missing closing anchor

#8: Shipping Tax fix

#9: Bugfix for Paypal Standard and paypal IPN payment modules where it wasn't updating shipping method

#10: Bugfix for latin/swedish/norwegian characters when using other charsets

#11: Protex installation instructions

#12: KTG coupon module support added

 

Hi, i've installed your new version and i get the following error on checkout

 

Fatal error: Call to undefined method stdClass::calculate_discount() in /.../.../.../.../catalog/includes/classes/onepage_checkout.php on line 190

 

Have i something missed?

 

Thanks for your help

Edited by 2fix4u

Share this post


Link to post
Share on other sites

Hi

 

Did you follow the install instructions for MATC i posted a few posts above or on next page? as i noticed using MATC instruction and including the MATC module will cause problems

 

Steve

 

Hi Steve,

 

No we figured out something ourselves. I don't know whether it is the correct solution but it works fine on our page. This is what we did:

In checkout.php add after:
if (is_array($payment_modules->modules)) {
echo $payment_modules->process_button();
}
?>
<?php

The following code:

//----- BEGINNING OF ADDITION: MATC -----// 
if(MATC_AT_CHECKOUT != 'false'){
require(DIR_WS_MODULES . 'matc.php');
}
//----- END OF ADDITION: MATC -----//
?>


replace in includes/modules/matc.php all:


TheSubmitButton

by:

checkoutButton

 

For the rest of the contribution we followed the standard procedure only in the matc.php we removed the following line:

<script type="text/javascript" src="includes/jquery.js"></script>

 

Regards,

 

Evelien

Share this post


Link to post
Share on other sites

Steve I just found out this error...I am getting it when after completed payment using PayPal I clicked on the button to return to the store...

before I used to get back to the cart...but now for some reasons I am getting this:

 

Fatal error: Call to a member function on a non-object in /homepages/5/d180349627/htdocs/rpmct.com/e-store/includes/modules/payment/paypal_standard.php on line 522

 

any help?

should I install the new version that was just released?

Install new version

 

Steve

Share this post


Link to post
Share on other sites

Hi, i've installed your new version and i get the following error on checkout

 

Fatal error: Call to undefined method stdClass::calculate_discount() in /.../.../.../.../catalog/includes/classes/onepage_checkout.php on line 190

 

Have i something missed?

 

Thanks for your help

I f you don't have the OT discount installed

remove this code error should be removed then

 

        //BOF KGT
       if (MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' && is_object( $order->coupon )){
         //kgt - discount coupons

           $applied_discount = 0;
           $discount = $order->coupon->calculate_discount( $order->products[$i], $valid_products_count );
           if( $discount['applied_discount'] > 0 ) $valid_products_count++;
           $shown_price = $order->coupon->calculate_shown_price( $discount, $order->products[$i] );
           //var_dump($shown_price);
           $shown_price = $shown_price['actual_shown_price'];
       } else {
           $shown_price = tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'];

       }
       $order->info['subtotal'] += $shown_price;
         /**************
         $shown_price = tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'];
       $order->info['subtotal'] += $shown_price;
         **************/
         //end kgt - discount coupons
       //EOF KGT

 

Steve

Share this post


Link to post
Share on other sites

Two questions:

 

Firstly, does One Page Checkout work with any of the PayPal IPN modules? If so, which one?

 

Secondly...what are these new files in the One Page Checkout contrib referencing PayPal Express?

 

PayPal Express is an alternative checkout. You put an item in your cart, click on a PayPal Express button located under your cart...and go straight to PayPal. It bypasses any checkout procedure you have installed.

 

Or is this something different that they have chosen to call PayPal Express? Confused.

 

- Andrea

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

×