View Single Post
  #1  
Old 10-08-2014, 03:42 AM
 
klsmith007@yahoo.com klsmith007@yahoo.com is offline
 

Member
  
Join Date: Sep 2014
Posts: 13
 

Default Linking "Place Order" with customized payment methods?

I've modified my "Checkout" page to also include the "Pay with Amazon" option under the payment methods. I didn't change anything in the popup mini cart, nor the main cart. I just felt that once I got into the "Checkout" process that I still wanted the Amazon option available for checkout.

What I'm having trouble doing is getting the Pay With Amazon popup to come up when I click the "Place Order" button.

By placing the Pay With Amazon code inside the list item and making the img part of the label object, the image has lost its special capability to bring up the popup when the image or radio button are selected. This is a good thing, since I DON'T want the button to bring the Amazon popup up in this case. Now there seems to be some validation step that gets done when the image or radio are selected. I used 115 for the methodID per the database.

doActionPayment in ./classes/XLite/Controller/Customer/Checkout.php does the validation of the change in payment method, but where is the code for "Place Order"? I enabled the Paypal payment method so that I could track down how that is done, thinking that the Amazon option would be similar, but I haven't had any luck with it yet.

If someone could point me to the right place to look and an idea of the code I would need to implement, that would be great. I'm thinking that an HTMLElement.click() might work, but there might be a better PHP option. I'm not a PHP developer, but I do have a fair amount of software development experience, so a pointer to the X-cart code and a link to a PHP primative would probably do the trick.

Thanks.

Kevin
Attached Thumbnails
Click image for larger version

Name:	Screenshot-4.png
Views:	206
Size:	62.4 KB
ID:	3948  
__________________
X-Cart 5.2.16
Pay With Amazon
Reply With Quote