Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 2 votes

Skip checkout_shipping and checkout_payment


  • You cannot reply to this topic
39 replies to this topic

#21 rikawa

  • Community Member
  • 11 posts
  • Real Name:Rodrigo

Posted 27 November 2008, 19:18

Very thanks!

#22 S-AS

  • Community Member
  • 4 posts
  • Real Name:Sana

Posted 01 February 2009, 22:00

BOXTEL: thankyou SO much for this (i know you put it up two years ago!!). I spent hours today trying to figure out how to do this. This worked like a charm for me.

I've also installed Purchase without account so my checkout process is just two pages now, supreme!

#23 umbra

  • Community Member
  • 18 posts
  • Real Name:Jörgen Gustavsson

Posted 12 May 2009, 20:49

Any solution for this problem ???
I get this error:

"The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
* This problem can sometimes be caused by disabling or refusing to accept cookies."

The line that generates the error:
tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));

#24 geozerocool

  • Community Member
  • 48 posts
  • Real Name:Nodar Nakaidze
  • Location:Tbilisi,Georgia

Posted 02 July 2009, 15:19

umbra
i have the same problem please help

in opera i get blank page in FF tha same as umbra gets

#25 geozerocool

  • Community Member
  • 48 posts
  • Real Name:Nodar Nakaidze
  • Location:Tbilisi,Georgia

Posted 05 July 2009, 14:42

NO response :(

#26 expressionsoutlet

  • Community Member
  • 3 posts
  • Real Name:Clayton Manson

Posted 13 July 2009, 01:39

View Posthutt5, on Apr 11 2006, 10:18 PM, said:

I tried this and it's not working for me...
When I click on Checkout, I get "page can not be displayed" for checkout_shipping.php.

Any ideas??

Thanks,
Lauren

Just worked like a charm for me.
Would be 100% of the line you are pasting BEFORE that he has listed.
You are not getting rid of that line, just make some extra spaces, and paste before it.
Just for safety, make sure you have a blank line above and below the newly pasted code as not to run into or over right any other codes.

Good luck.

#27 ecartz

  • Community Member
  • 1,919 posts
  • Real Name:Matt
  • Gender:Male

Posted 15 August 2009, 15:02

View Postboxtel, on Feb 4 2006, 04:33 AM, said:

checkout_payment.php:

just before:
  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);
add:
// skip if only 1 payment method available
if (tep_count_payment_modules() == 1) {
  if (!tep_session_is_registered('payment')) tep_session_register('payment');
  tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
}
For people having trouble with an endless redirect, you could try changing the code to add to
// skip if only 1 payment method available
$payment_module_selections = $payment_modules->selection();
if (sizeof($payment_module_selections) == 1) {
  if (!tep_session_is_registered('payment')) tep_session_register('payment');
  $payment = $payment_module_selections[0]['id'];
  tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
}
and see if that sorts things out.

You also might want to double check your session and cookie settings.

Another thing to check is that you only have one payment method installed in admin >> Modules >> Payment. If you have more than one enabled, this code will not work. Note that it may not be enough to merely disable the other payment modules. You may have to actually remove them.
Always backup before making changes.

#28 ozstar

  • Community Member
  • 515 posts
  • Real Name:David
  • Gender:Male
  • Location:Sydney OZ

Posted 05 November 2009, 05:45

View Postecartz, on 15 August 2009, 15:02, said:

For people having trouble with an endless redirect, you could try changing the code to add to
// skip if only 1 payment method available
$payment_module_selections = $payment_modules->selection();
if (sizeof($payment_module_selections) == 1) {
  if (!tep_session_is_registered('payment')) tep_session_register('payment');
  $payment = $payment_module_selections[0]['id'];
  tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
}
and see if that sorts things out.

You also might want to double check your session and cookie settings.

Another thing to check is that you only have one payment method installed in admin >> Modules >> Payment. If you have more than one enabled, this code will not work. Note that it may not be enough to merely disable the other payment modules. You may have to actually remove them.



So am I to understand that the only code changes for a 'no sale' but contact admin email is to do what boxtel said on Feb 4 2006? Does this also not shopw the price of the product?

Thanks

oz

#29 vjboc

  • Community Member
  • 211 posts
  • Real Name:Vinny
  • Gender:Male

Posted 04 December 2009, 13:34

These codes work great in IE. But in firefox it causes the continue shopping link to disappear in the cart. It is the code in checkout_payment.php that is causing that to happen. When I removed it the continue shopping link re appeared. Is there something I can add to the code to make this work?

This is the code I put in:


// skip if only 1 payment method available
if (tep_count_payment_modules() == 1) {
if (!tep_session_is_registered('payment')) tep_session_register('payment');
tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
}


just before:

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);

#30 vjboc

  • Community Member
  • 211 posts
  • Real Name:Vinny
  • Gender:Male

Posted 04 December 2009, 18:12

For some reason the continue shopping disappeared in IE too. Is there something else I need to do? I also took the codes out of both checkout_payment and checkout_shipping that I put in there in the first place and now the continue shopping link does not work with that neither.
Can someone help?


This is all I added below:



checkout_shipping.php:

just before:

// process the selected shipping method

add:

// bypass if only 1 shipping method available or free shipping
if ( (tep_count_shipping_modules() == 1) || ($free_shipping == true) ) {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
if ($free_shipping) {
$quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
$quote[0]['methods'][0]['cost'] = '0';
} else {
$quote = $shipping_modules->quote($method, $module);
}
$shipping = array('id' => $shipping,
'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
'cost' => $quote[0]['methods'][0]['cost']);
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}


checkout_payment.php:

just before:

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);

add:

// skip if only 1 payment method available
if (tep_count_payment_modules() == 1) {
if (!tep_session_is_registered('payment')) tep_session_register('payment');
tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
}

#31 RolfR

  • Community Member
  • 13 posts
  • Real Name:Roffe R

Posted 20 March 2010, 09:19

works fine for me but cant get the tax for the shipping to be included in the order total,
if I use 2 shipping options all is good, but when It skips that page it wont add the tax in the total
(only shows tax for the products) the overall total is fine but need to display products+shipping tax in this country of mine :)

anyone know how to fix it?

thx

#32 multimixer

  • Community Sponsor
  • 3,592 posts
  • Real Name:George Zarkadas
  • Gender:Male
  • Location:Greece

Posted 20 March 2010, 09:22

View PostRolfR, on 20 March 2010, 09:19, said:

works fine for me but cant get the tax for the shipping to be included in the order total,
if I use 2 shipping options all is good, but when It skips that page it wont add the tax in the total
(only shows tax for the products) the overall total is fine but need to display products+shipping tax in this country of mine :)

anyone know how to fix it?

thx
Try to use this lines
if ( (tep_count_shipping_modules() == 1) || ($free_shipping == true) ) {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
if ($free_shipping) {
$quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
$quote[0]['methods'][0]['cost'] = '0';
} else {
$quote = $shipping_modules->quote($method, $module);
}
$shipping = array('id' => $shipping,
'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
'cost' => $quote[0]['methods'][0]['cost']);
$shipping = $shipping_modules->cheapest(); // added by mm 5 2 10
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

Looking for a way to create your own osCommerce template ? click

#33 RolfR

  • Community Member
  • 13 posts
  • Real Name:Roffe R

Posted 20 March 2010, 09:50

View Postmultimixer, on 20 March 2010, 09:22, said:

Try to use this lines
if ( (tep_count_shipping_modules() == 1) || ($free_shipping == true) ) {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
if ($free_shipping) {
$quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
$quote[0]['methods'][0]['cost'] = '0';
} else {
$quote = $shipping_modules->quote($method, $module);
}
$shipping = array('id' => $shipping,
'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
'cost' => $quote[0]['methods'][0]['cost']);
$shipping = $shipping_modules->cheapest(); // added by mm 5 2 10
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

wow thank you for the fast answer and for saving the day!!! :D
works perfect!

#34 dspeak

  • Community Member
  • 74 posts
  • Real Name:Danny

Posted 16 June 2010, 17:23

Does this work with multi vendor shipping?

I have 2 payment forms credit card with cvv2 and paypal.

I only use UPS shipping ground.

I would like to skip the shipping screen and go strait to payment.

Can this be done and if so how, I am a novice and not experienced with code.

#35 AntonRachitskiy

  • Community Member
  • 2 posts

Posted 28 March 2011, 08:23

Thanks for the code! Installed it on 2.3 and everything works great.

Just added two more mods to checkout_confirmation.php to get rid of "edit" links that will loop customer back to checkout page:
FIND:
 <td><?php echo '<strong>' . HEADING_SHIPPING_METHOD . '</strong> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>

REPLACE:
            <td><?php echo '<strong>' . HEADING_SHIPPING_METHOD . '</strong>';
			if ( (tep_count_shipping_modules() > 1) && ($free_shipping != true) ) echo  '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>



AND

FIND:
            <td><?php echo '<strong>' . HEADING_PAYMENT_METHOD . '</strong> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>

REPLACE WITH:
            <td><?php echo '<strong>' . HEADING_PAYMENT_METHOD . '</strong>'; 
			if (tep_count_payment_modules() > 1) echo  '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>


#36 chemist4

  • Community Member
  • 77 posts
  • Real Name:Tim
  • Gender:Male
  • Location:Missouri

Posted 14 April 2011, 16:31

This is a great mod. I have been looking for a way to shorten the checkout process in 2.3.1 and this works great.

#37 chemist4

  • Community Member
  • 77 posts
  • Real Name:Tim
  • Gender:Male
  • Location:Missouri

Posted 14 April 2011, 16:46

Is there some way to get this to work with Discount Coupon Codes? Would it just be a matter of moving the code from the checkout_payment page to the checkout_confirmation page? Since I only have one payment option and one shipping option this works great, but I would also like to be able to offer discounts and the contrib I have installed places the code entry on the payment page, which is now skipped.

Any help would be appreciated.

#38 catalano

  • Community Member
  • 106 posts
  • Real Name:Chris Catalano

Posted 02 May 2011, 22:00

Since this thread originated several years ago, can someone post the confirmed required edit(s) to make this work in 2.3.1? It seems like there were a lot of additional tweaks made that may or may not still be required.

Thanks,
Chris

#39 catalano

  • Community Member
  • 106 posts
  • Real Name:Chris Catalano

Posted 02 May 2011, 22:00

Since this thread originated several years ago, can someone post the confirmed required edit(s) to make this work in 2.3.1? It seems like there were a lot of additional tweaks made that may or may not still be required.

Thanks,
Chris

#40 chemist4

  • Community Member
  • 77 posts
  • Real Name:Tim
  • Gender:Male
  • Location:Missouri

Posted 13 June 2011, 22:04

View Postcatalano, on 02 May 2011, 22:00, said:

Since this thread originated several years ago, can someone post the confirmed required edit(s) to make this work in 2.3.1? It seems like there were a lot of additional tweaks made that may or may not still be required.

Thanks,
Chris

I can confirm that the original posted additions will work fine on 2.3.1. I think the tweaks were mainly special situations or to change the behavior slightly. I have this done on my checkout_shipping.php page since I only have one shipping method available. I had it on the payment page, but removed it since that is where Discount Coupon Codes puts its thing. All these additions do is load the available options and, if there is only one (i.e. no choice to make), it continues to the next step.