Jump to content

One page checkout-completely removing payment method


tesladev

Recommended Posts

Hello!

 

I'd like to modify order process in PS 1.5.6, by completely removing step 3 of one-page-checkout - "payment method" and replacing "Save" button with "Next" button, which will save client data to database(as now) + made an automatic redirect to the last, final confirmation page.

 

I've got two shipping options in my shop, each consist of only one payment method - "courier + bank transfer", "courier + cash on delivery". Everything configured in ShipToPay module.

 

I've started by unlocking "Login to see payment methods", as described in topic: HERE. (thanks Dejv!)

 

Next, I turn on automatic redirect to the "Save" button by adding the following line to the order-opc.js

$('#submitAccount').click(

.....

$.ajax({
......
document.location.href=document.getElementById("HOOK_PAYMENT").getElementsByTagName("a")[0].getAttribute("href");
});

); 

It works, because I always have only one available payment method, except one annoying detail ;) No matter which delivery method I chose, after clicking on "Save" button, presta always select first top method, in my case - "courier bank transfer". It's default presta behaviour, without any modification.

 

Do you how to fix it? Or, even better, did you manage to make a similar one-page-checkout modification?

 

BTW, sorry for my English, I'm not a native speaker  :)

 

Thanks in advance, 

tesladev

Link to comment
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
×
×
  • Create New...