Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

one page checkout


hungryfrank

Recommended Posts

I have made  an add-on that shorten the checkout flow as little as one page. .Now the question is would I need a confirmation page?  or I can put a required checkbox

 

you can cut up to 4 pages of your checkout by using my three add_ons

login create account in one page

Express checkout  

login pop up modal

Link to comment
Share on other sites

on a test shop only

I need a little help testing of this.   

in your application top

add 

 if ($PHP_SELF=='checkout_shipping.php')  tep_redirect(tep_href_link('checkout_payment.php'));

and replace this

and  please leave comment so I can fix it or let me know if it works properly with other addons.

checkout_payment.php

Edited by hungryfrank

you can cut up to 4 pages of your checkout by using my three add_ons

login create account in one page

Express checkout  

login pop up modal

Link to comment
Share on other sites

Looks to work fine but only tested on one site running 1.0.4.0.

As you can see some language issues with missing text. Also I think it may need to be modified I'm not sure you can simply display the total and subtotal when checking out.

You may find it required to show the tax also so customer has full info before they confirm payment ( which I belive is required so continue check out may need to be renamed to confrim paymet and checkout or somthing like that.

Definetly a step in the right direction.

 

image.png.efd7b5ce1c96f17d4cc2d32118b78423.png

image.png.700ebebb159ea97581b3a097007e4ce7.png

 

Link to comment
Share on other sites

It should work with the tax.i haven't changed any code.  I will take a look. I don't use tax so I never notice it. you can also show checkout_confirmation if you want. 

 

you can cut up to 4 pages of your checkout by using my three add_ons

login create account in one page

Express checkout  

login pop up modal

Link to comment
Share on other sites

53 minutes ago, hungryfrank said:

It should work with the tax.i haven't changed any code

Sorry my mistake looks like stock 1.0.4.0 is not displaying any tax info in the checkout either. Unless I'm missing something?

Also I just spotted that this is may not be required on this page..

image.png.83d0e99929b158f4ae34ede1dbf17251.png

Something else to consider if you have time is to add a print or save Invoice button so customer can print of a copy of his invoice on comleting order. Never understood why osC is missing this basic function.

 

Link to comment
Share on other sites

yes that is great I will take it out.  what I really want an Ajax to update the totals when something is changed. and it has to work with addons.i have no idea on how to implement that.

Edited by hungryfrank

you can cut up to 4 pages of your checkout by using my three add_ons

login create account in one page

Express checkout  

login pop up modal

Link to comment
Share on other sites

49 minutes ago, hungryfrank said:

what I really want an Ajax to update the totals when something is changed. and it has to work with addons.i have no idea on how to implement that.

I find it best to take small steps that way less chance of me falling on my face...😊 best to get the one page working as is first. Ajax can be added later most of what you need should already be available as several Ajax carts have been done in the past. Bound to be a few Ajax gurus about the forum.

file based

https://www.w3schools.com/php/showphp.php?filename=demo_ajax_php

pulling from db

https://www.tutorialspoint.com/php/php_and_ajax.htm

 

Link to comment
Share on other sites

I managed to get a page up to update the totals. I have to pass the value of selected shipping to it

my Ajax works 

but I can't get the change function to work

$(document).ready(function(){
    var shipping = $(".shipping:checked").val();
	//load_data();
	function load_data()
	{
		$.ajax({
			url:"http://localhost/metro55/total_ajax.php",
			method:"post",
			data:{
			shipping:shipping
		 //   actions:processs
			},
			success:function(data)
			{
				$('#result').html(data);
			}
		});
	}
	
    $('input:radio[name=shipping]').change(function() {
      	load_data();
		
	});
});

if I uncomment the load data it loads but not when the shipping radio is clicked. I need that and passing the value to the Ajax page

 

total_ajax.php

Edited by hungryfrank

you can cut up to 4 pages of your checkout by using my three add_ons

login create account in one page

Express checkout  

login pop up modal

Link to comment
Share on other sites

the purpose of the Ajax is to upload a new order total after customer choses the shipping method. as of now the only problem is to show a new total to the customer before he pays, without going to confirmation page.

you can cut up to 4 pages of your checkout by using my three add_ons

login create account in one page

Express checkout  

login pop up modal

Link to comment
Share on other sites

how strange. I found this fiddle http://jsfiddle.net/78mpxr5L/2/

simple for start

I put this which I got from view source

 <table class="table border-right border-left border-bottom table-hover m-0">
                              <tr class="table-selection3 table-success">
                  <td>
                    Flat Rate                                      </td>
                                    <td class="text-right">
                    <div class="custom-control custom-radio custom-control-inline"><input type="radio" name="shipping" value="flat_flat" id="d_flat" required aria-required="true" aria-describedby="d_flat" class="custom-control-input shipping" /><label class="custom-control-label" for="d_flat">$5.00</label></div>                  </td>
                                  </tr>
                                <tr class="table-selection3 table-success">
                  <td>
                    Per Item                                      </td>
                                    <td class="text-right">
                    <div class="custom-control custom-radio custom-control-inline"><input type="radio" name="shipping" value="item_item" checked="checked" id="d_item" required aria-required="true" aria-describedby="d_item" class="custom-control-input shipping" /><label class="custom-control-label" for="d_item">$2.50</label></div>                  </td>
                                  </tr>
                                <tr class="table-selection3 table-success">
                  <td>
                    Zone Rates                    <div class="form-text">Shipping to US : 3.3 lb(s)</div>                  </td>
                                    <td class="text-right">
                    <div class="custom-control custom-radio custom-control-inline"><input type="radio" name="shipping" value="zones_zones" id="d_zones" required aria-required="true" aria-describedby="d_zones" class="custom-control-input shipping" /><label class="custom-control-label" for="d_zones">$10.50</label></div>                  </td>
                                  </tr>
                          </table>   

and change the script to look for shipping. it works in the fiddle but not in my shop

you can cut up to 4 pages of your checkout by using my three add_ons

login create account in one page

Express checkout  

login pop up modal

Link to comment
Share on other sites

1 hour ago, hungryfrank said:

it works in the fiddle but not in my shop

Check the XHR output in Firefox web-developer panel .. you will see the requests there.. This might give you the right direction. I hope this helps!

Link to comment
Share on other sites

Cool very impressed looks to be working so far 😁 Ajax update of total based on radio button selection looks to update total every time. Should be very good once finished.

Nice bit of work. I think it can be taken further with modals for address edit and such but that's just the icing on the top 😂 .

image.png.9bbdf2219c2f112abd97aab439a3179f.png

 

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