Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

One Page Checkout Support


2260 replies to this topic

#1101 steve_s

  • Community Member
  • 1,580 posts
  • Real Name:steve
  • Gender:Male
  • Location:London

Posted 17 January 2010, 21:04

View Postlonghorn1999, on 16 January 2010, 19:53, said:

or add this to includes/application_top.php
find

require('includes/configure.php');


add after it

define('MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS','false');
define('MODULE_ORDER_TOTAL_COUPON_STATUS','false');



now no code needs to be removed

Steve

This post has been edited by steve_s: 05 January 2010 - 05:44 PM



Hi everyone,

Well it's very disappointing that one page checkout 1.11 doesn't seem to work with KGT coupons. I would think that this would be important for just about everyone with a shopping cart using OSC so it would've been fixed a long time ago. In the meanwhile, is the best way to disable coupons for now to add these defines to application_top.php or does that lead to any other unforeseen problems?

Thanks,

Nick
No it will not lead to any issues just using defines

Steve

#1102 steve_s

  • Community Member
  • 1,580 posts
  • Real Name:steve
  • Gender:Male
  • Location:London

Posted 17 January 2010, 21:09

View Postshujaathussain, on 12 January 2010, 12:18, said:

Thanks Steve. It worked. I am facing another problem about the coupon. This is the query string I get checkout.php?payment_error=ot_coupon. The coupon gets validated by validate button but still it redirects with the same error. Any ideas?
Thanks
Hi

i have not been able to find where that is set

Steve

#1103 longhorn1999

  • Community Member
  • 318 posts
  • Real Name:Nick
  • Gender:Male
  • Location:Texas

Posted 18 January 2010, 04:06

View PostWhiskers, on 17 January 2010, 11:18, said:

Maybe you're getting the error as you have cut the code out. I just uninstalled it and it is working fine without discount coupons.


Actually I spent today having my hosting service restore my backup to right before I ever messed with discount coupons and one page checkout. Then I installed one page checkout again and of course when a returning customer logs in and tries to check out:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where customer_id = '3'' at line 1

select amount from where customer_id = '3'

Maybe it's some conflict with purchase without account but nothing I change in the admin will set things right. I'd uninstall purchase without account but that was 12 add-ons ago and I foolishly used the package with an autoinstaller, making it even harder to take out. Any ideas before I finally have to throw in the towel? Maybe some simple database modification I'm missing?

Thanks,

Nick

#1104 steve_s

  • Community Member
  • 1,580 posts
  • Real Name:steve
  • Gender:Male
  • Location:London

Posted 18 January 2010, 21:05

View Postlonghorn1999, on 18 January 2010, 04:06, said:

Actually I spent today having my hosting service restore my backup to right before I ever messed with discount coupons and one page checkout. Then I installed one page checkout again and of course when a returning customer logs in and tries to check out:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where customer_id = '3'' at line 1

select amount from where customer_id = '3'

Maybe it's some conflict with purchase without account but nothing I change in the admin will set things right. I'd uninstall purchase without account but that was 12 add-ons ago and I foolishly used the package with an autoinstaller, making it even harder to take out. Any ideas before I finally have to throw in the towel? Maybe some simple database modification I'm missing?

Thanks,

Nick

Hi Nick

find following in checkout.php and remove it
  //BOF KGT
  if (MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true'){
    if(isset($_POST['code']))
    {
      if(!tep_session_is_registered('coupon'))
        tep_session_register('coupon');
      $coupon = $_POST['code'];
    }
  }
  //EOF KGT

and
  //BOF KGT
  onePage.kgtInstalled = <?php echo (MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ? 'true' : 'false');?>;
  //EOF KGT

and

		//BOF KGT
		if (MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true'){
			echo '<table cellpadding="2" cellspacing="0" border="0">
			 <tr>
			  <td class="main"><b>Have A Coupon?</b></td>
			 </tr>
			 <tr>
			  <td class="main">' . tep_draw_input_field('coupon', 'coupon code') . '</td>
			  <td class="main">' . tep_image_submit('button_redeem.gif', IMAGE_REDEEM_VOUCHER, 'id="voucherRedeemCoupon"') . '</td>
			 </tr>
			</table>';
		}
		//EOF KGT

includes/classes/onepage_checkout.php
find and remove it
    //BOF KGT
    if(MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS=='true')
    {
      //kgt - discount coupons
      if (tep_not_null($onepage['info']['coupon'])) {
      //this needs to be set before the order object is created, but we must process it after
        if (!tep_session_is_registered('coupon')) tep_session_register('coupon');
        $order->info['coupon'] = $onepage['info']['coupon'];
        //$order->info['applied_discount'] = $onepage['info']['applied_discount'];
        //$order->info['subtotal'] = $onepage['info']['subtotal'];
      }
      //end kgt - discount coupons
    }
    //EOF KGT

and
      //BOF KGT
        if (MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true'){
          $valid_products_count = 0;
          $order->coupon->applied_discount = array();
        }
      //EOF KGT

and
       //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

and
     //kgt - discount coupon
      if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' && is_object( $order->coupon ) )
      {
        //$order->coupon->applied_discount = $applied_discount;
        $order->info['total'] = $order->coupon->finalize_discount( $order->info );
        $onepage['coupon'] = $order->coupon;
      }
      //end kgt - discount coupon

and
   //BOF KGT
    if(MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS=='true')
    {
      $onepage['info']['coupon'] = $order->info['coupon'];
      //$onepage['info']['applied_discount'] = $order->info['applied_discount'];
      //$onepage['info']['subtotal'] = $order->info['subtotal'];
      //end kgt - discount coupons
    }
    //EOF KGT

that should do it

Steve

#1105 longhorn1999

  • Community Member
  • 318 posts
  • Real Name:Nick
  • Gender:Male
  • Location:Texas

Posted 18 January 2010, 21:26

View Poststeve_s, on 18 January 2010, 21:05, said:

Hi Nick

find following in checkout.php and remove it
  //BOF KGT
  if (MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true'){
    if(isset($_POST['code']))
    {
      if(!tep_session_is_registered('coupon'))
        tep_session_register('coupon');
      $coupon = $_POST['code'];
    }
  }
  //EOF KGT

and
  //BOF KGT
  onePage.kgtInstalled = <?php echo (MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ? 'true' : 'false');?>;
  //EOF KGT

and

		//BOF KGT
		if (MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true'){
			echo '<table cellpadding="2" cellspacing="0" border="0">
			 <tr>
			  <td class="main"><b>Have A Coupon?</b></td>
			 </tr>
			 <tr>
			  <td class="main">' . tep_draw_input_field('coupon', 'coupon code') . '</td>
			  <td class="main">' . tep_image_submit('button_redeem.gif', IMAGE_REDEEM_VOUCHER, 'id="voucherRedeemCoupon"') . '</td>
			 </tr>
			</table>';
		}
		//EOF KGT

includes/classes/onepage_checkout.php
find and remove it
    //BOF KGT
    if(MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS=='true')
    {
      //kgt - discount coupons
      if (tep_not_null($onepage['info']['coupon'])) {
      //this needs to be set before the order object is created, but we must process it after
        if (!tep_session_is_registered('coupon')) tep_session_register('coupon');
        $order->info['coupon'] = $onepage['info']['coupon'];
        //$order->info['applied_discount'] = $onepage['info']['applied_discount'];
        //$order->info['subtotal'] = $onepage['info']['subtotal'];
      }
      //end kgt - discount coupons
    }
    //EOF KGT

and
      //BOF KGT
        if (MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true'){
          $valid_products_count = 0;
          $order->coupon->applied_discount = array();
        }
      //EOF KGT

and
       //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

and
     //kgt - discount coupon
      if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' && is_object( $order->coupon ) )
      {
        //$order->coupon->applied_discount = $applied_discount;
        $order->info['total'] = $order->coupon->finalize_discount( $order->info );
        $onepage['coupon'] = $order->coupon;
      }
      //end kgt - discount coupon

and
   //BOF KGT
    if(MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS=='true')
    {
      $onepage['info']['coupon'] = $order->info['coupon'];
      //$onepage['info']['applied_discount'] = $order->info['applied_discount'];
      //$onepage['info']['subtotal'] = $order->info['subtotal'];
      //end kgt - discount coupons
    }
    //EOF KGT

that should do it

Steve

Hi Steve,

Thanks for you help. Unfortunately that still didn't do it. I don't know if my database is messed up or maybe I missed a space or some single character somewhere in the coding, though I've checked several times now.

Maybe some error in line 425 of onepage_checkout.php or line 538 or checkout.php? Both of them read:

$gv_query=tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");


I'd also had to add a define TABLE_COUPON_GV_CUSTOMER to database_tables.php to get rid of a previous error.

Edited by longhorn1999, 18 January 2010, 21:32.


#1106 MOBASS

  • Community Member
  • 12 posts
  • Real Name:Simon

Posted 19 January 2010, 06:48

Hi Longhorn1999

I had the same problem as you, I think I found the solution

if you go to the end of includes/checkout/payment_method.php

delete the CREDIT CLASS GIFT VOUCHER CONTRIBUTION

That should fix you problem

Well it did for me anyway :-)

Simon

#1107 longhorn1999

  • Community Member
  • 318 posts
  • Real Name:Nick
  • Gender:Male
  • Location:Texas

Posted 19 January 2010, 07:36

View PostMOBASS, on 19 January 2010, 06:48, said:

Hi Longhorn1999

I had the same problem as you, I think I found the solution

if you go to the end of includes/checkout/payment_method.php

delete the CREDIT CLASS GIFT VOUCHER CONTRIBUTION

That should fix you problem

Well it did for me anyway :-)

Simon


Simon, you're a life saver!! That salvaged my 3 day weekend which had been wasted installing, restoring backups, installing...etc etc...

It works perfectly now. Thanks again to everyone who gave me suggestions here,

Nick

Edited by longhorn1999, 19 January 2010, 07:39.


#1108 Stealth1

  • Community Member
  • 334 posts
  • Real Name:Chris

Posted 19 January 2010, 07:46

I just installed this and I have an issue, the sub-total is not showing nor is the taxes.

Sub-Total is always displaying $0.00 and then somehow the Total: ends up at some random number which I can't seem to find a reason for as it is not just the shipping. There is also no line for taxes it simply has sub-total, shipping, total.

Another issue is it doesn't display any of the payment details, I use money order as a method of payment yet it doesn't tell the customer where or who to send the Money Order to.

#1109 shujaathussain

  • Community Member
  • 8 posts
  • Real Name:suji

Posted 19 January 2010, 08:45

Hello!

Does anyone know how can we add the customer details in Customer table as right now it goes to order table?
Thanks

#1110 rachael_web86

  • Community Member
  • 128 posts
  • Real Name:Rachael

Posted 19 January 2010, 11:32

Hi I was wondering if anyone could point me in the right direction please...

I have this add on installed & it's working perfectly :-) However, I was hoping to add in additional boxes to my checkout.php for customers to enter their prescription E.G I need drop down selection boxes such as: (Left Eye Sphere: 0, +0.25, +0.50)

Is this possible?

I can't add them in as product attributes becuase if a customer selects more than 1 frame, I don't want them to have to keep filling out their prescription. Any clue would be brillant

Many thanks in advance :)

#1111 MOBASS

  • Community Member
  • 12 posts
  • Real Name:Simon

Posted 19 January 2010, 11:55

View PostStealth1, on 19 January 2010, 07:46, said:

I just installed this and I have an issue, the sub-total is not showing nor is the taxes.

Sub-Total is always displaying $0.00 and then somehow the Total: ends up at some random number which I can't seem to find a reason for as it is not just the shipping. There is also no line for taxes it simply has sub-total, shipping, total.

Hi Stealth1

I had a similar issue where there was no sub-total showing, but I do not show tax

I disabled (about line 106 in my checkout.php) //$onePageCheckout->fixTaxes();
and
in checkout_process.php (about line 77) //$onePageCheckout->fixTaxes();

As far as I know to show tax or not was an option in the admin area, try and enable that before you modify the files and see if it shows up.

Simon

#1112 josephicon

  • Community Member
  • 14 posts
  • Real Name:Joseph

Posted 19 January 2010, 15:21

Hello there, I am using Paypal Standard, and after payment, the customer gets directed to checkout_process.php, but the cart remains full, and the order status remains at preparing, and the customer account is not created by opc. Any ideas?

#1113 steve_s

  • Community Member
  • 1,580 posts
  • Real Name:steve
  • Gender:Male
  • Location:London

Posted 20 January 2010, 20:14

View Postshujaathussain, on 19 January 2010, 08:45, said:

Hello!

Does anyone know how can we add the customer details in Customer table as right now it goes to order table?
Thanks

Hi

I think they have to login after placing order and details are then in customer table, not 100% sure as never tried

Steve

#1114 steve_s

  • Community Member
  • 1,580 posts
  • Real Name:steve
  • Gender:Male
  • Location:London

Posted 20 January 2010, 20:17

View Postrachael_web86, on 19 January 2010, 11:32, said:

Hi I was wondering if anyone could point me in the right direction please...

I have this add on installed & it's working perfectly :-) However, I was hoping to add in additional boxes to my checkout.php for customers to enter their prescription E.G I need drop down selection boxes such as: (Left Eye Sphere: 0, +0.25, +0.50)

Is this possible?

I can't add them in as product attributes becuase if a customer selects more than 1 frame, I don't want them to have to keep filling out their prescription. Any clue would be brillant

Many thanks in advance :)
Easiest way is to use the comments text box, telling customers to put data in there

edit
includes/checkout/comment.php to include a message just simple html will do if only using one language

Steve

#1115 shujaathussain

  • Community Member
  • 8 posts
  • Real Name:suji

Posted 21 January 2010, 16:36

View Poststeve_s, on 17 January 2010, 21:09, said:

Hi

i have not been able to find where that is set

Steve

It's in ot_coupon.php in order total folder. I found the redirection link and commented it. Not the best way to tackle but somewhat working. Thanks

#1116 steve_s

  • Community Member
  • 1,580 posts
  • Real Name:steve
  • Gender:Male
  • Location:London

Posted 21 January 2010, 23:17

View Postjosephicon, on 19 January 2010, 15:21, said:

Hello there, I am using Paypal Standard, and after payment, the customer gets directed to checkout_process.php, but the cart remains full, and the order status remains at preparing, and the customer account is not created by opc. Any ideas?
Hi

try redirecting them to the actual paypal mod, it has redirect to checkout success page

Steve

#1117 tormo3

  • Community Member
  • 8 posts
  • Real Name:Maksim
  • Gender:Male

Posted 23 January 2010, 18:59

Hello!

there is one problem: password confirmation don't work in "billing address". If I enter the passwords are not identical, the registration is still going on
Anyone knows how to fix this problem?


P.S. Thanks for this contribution!

Edited by tormo3, 23 January 2010, 19:05.


#1118 aelalfy1989

  • Community Member
  • 99 posts
  • Real Name:Ahmed El Alfy

Posted 24 January 2010, 05:25

Hi,

One quick question for anyone familiar with this contribution, can I use this along with purchase without account contribution? Basically what I want is a clean checkout area. basically when they press checkout they should be moved to a login page that asks if they want to 1) purchase without account 2) create account 3) login to existing account. For example if they click checkout without account. They should be taken to a one page checkout with fields to fill in (ex address, name, phone #, etc) but if they press login and use their account, it should take them to the same page but the fields that were empty for purchase without account should be prefield but editable. I think I might not be clear enough but I really am trying. Also in my footer I have a "log in" link. If they press that I don't want to "purchase without account" to show. If someone can tell me how do achieve that, that would be great. OR I'm willing to pay 100$ for anyone that can do that for me.

Thanks
AE
Thank you in advance,
AE

#1119 longhorn1999

  • Community Member
  • 318 posts
  • Real Name:Nick
  • Gender:Male
  • Location:Texas

Posted 24 January 2010, 06:25

View Posttormo3, on 23 January 2010, 18:59, said:

Hello!

there is one problem: password confirmation don't work in "billing address". If I enter the passwords are not identical, the registration is still going on
Anyone knows how to fix this problem?


P.S. Thanks for this contribution!


Hi everyone,

I seem to be having this same problem as well. Thanks to tormo3 for pointing it out or I might've missed it in testing. Any solutions would be much appreciated,

Thanks,

Nick

#1120 BrianCH

  • Community Member
  • 10 posts
  • Real Name:Brian Hoang

Posted 24 January 2010, 06:27

Hi all,

I installed this contribution generally it works, but when in "shopping cart" page and click "Checkout" or "Continue Shopping" buttons nothing happen. It seems there is no link for this two buttons, while the "Update" works. Do you know how to fix this?