| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Clone a payment module | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Clone a payment module
Hi,
I need to have an option at checkout for; 1, Debit card 2, Credit card - surcharge applies The cart uses Ogone and is re-directed to their payment site. The only way I see this possible is to have a duplicate clone of the Ogone module and then add the surcharge. It does rely on trusting the customer clicking the right option though. I presume it may not be as simple as: 1, copy and rename related files 2, copy and rename database Or maybe I can edit the Ogone Direct payment to re-direct to the Ogone Web Based? This sounds easier?? Any tips on the best way to do this much appreciated..
__________________
Gold 4.4.4 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Clone a payment module
I would actually attempt to adjust the order total based on the added checkbox. Take a look at the JavaScript method that applies the surcharge to the order total. I am assuming you are using OPC.
When you select a payment method that has an associated surcharge, see how the order total updates? I would pursue the same method for my extra checkbox. Seems easier than having two payment methods. If you want to "keep them honest", add an extra input for the pin number when using the debit card method. Even if you just throw these values away, you can set an alert to pop if the field isn't filled out, and that would make them think that it mattered and reconsider their selection method... Out of curiosity, do you save a lot when they use a debit card? Even without the pin?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#3
|
|||||||
|
|||||||
Re: Clone a payment module
Thanks, yes I only need the surcharge bit not the full clone of payment.
But thought trying to split out the bits I need could take longer. Will give it a go.
__________________
Gold 4.4.4 |
|||||||
#4
|
|||||||
|
|||||||
Re: Clone a payment module
Quote:
2.5% for credit card. And do you have any tips how to split out the code I need for this... been scratching my head all day.
__________________
Gold 4.4.4 |
|||||||
#5
|
|||||||||
|
|||||||||
Re: Clone a payment module
Well I have to admit that it is extremely difficult unless you are a JavaScript guru. I have done stuff like this before, but it is at the very limit of my abilities.
The JS that controls OPC, is located in /common_files/modules/One_Page_Checkout/ajax.checkout.js Very tricky file to work with, you will be interested in "_callbackPaymentMethodListChanged" I believe. Let us know how you progress with this, I am very interested in this subject. Hopefully someone with more experience than me will weigh in on this as well. I'd like to know who wrote the OPC code, it is fairly brilliant.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|