Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Linking "Place Order" with customized payment methods?

 
Reply
   X-Cart forums > X-Cart 5 > Modifying the design and features (X-Cart 5)
 
Thread Tools Search this Thread
  #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:	28
Size:	62.4 KB
ID:	3948  
__________________
X-Cart 5.2.16
Pay With Amazon
Reply With Quote
  #2  
Old 10-14-2014, 06:31 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,430
 

Default Re: Linking "Place Order" with customized payment methods?

Hi Kevin!

Just to make sure, are you using free Pay with Amazon module (http://www.x-cart.com/extensions/addons/pay-with-amazon-payment-module.html) or did you create your own payment method?

If you are not sure about how to create payment method module, please refer to our previous webinar record here: http://kb.x-cart.com/display/XDD/Webinar+3+-+21+Aug+2014+-+Payment+gateway+creation

Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #3  
Old 10-14-2014, 10:56 AM
 
klsmith007@yahoo.com klsmith007@yahoo.com is offline
 

Member
  
Join Date: Sep 2014
Posts: 13
 

Default Re: Linking "Place Order" with customized payment methods?

Hi Tony,

Yes, I'm using the "free" "Pay with Amazon" module. I'd just like to have the option of selecting that payment option when on the checkout page in addition to the other options instead of having to only do it on the mini popup or view cart option.

I have not checked out the webinar. I have been intensely looking at the code, but haven't quite figured it out. Since the Paypal payment module also brings up a popup in which to log in and pay, I figured that was a good starting point, but as of yet, I just haven't been able to figure it out.

At this point, I'm ready to pay you guys to do it for me "if" it's within my limited budget.

Thanks for the reply.

Kevin
__________________
X-Cart 5.2.16
Pay With Amazon
Reply With Quote
  #4  
Old 10-14-2014, 12:43 PM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,430
 

Default Re: Linking "Place Order" with customized payment methods?

I see now.

Well, Amazon's module does not consider an option of adding it to the checkout page (probably because of legal or marketing concerns) that is why all payment logic is located in the classes/XLite/Module/Amazon/PayWithAmazon/Controller/Customer/AmazonCheckout.php file.

If you want to put Amazon payment method onto checkout page, you have to basically create your own payment method. This process is described in aforementioned webinar and it is not that complicated to be honest.

Surely, you can order a customization from us. Just drop us a message at sales@x-cart.com and receive a free quote, so you could at least estimate the expenses.

Unfortunately, considering current implementation of Pay With Amazon, there is no effortless option of putting Amazon payment to checkout page.

Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote

The following user thanks tony_sologubov for this useful post:
klsmith007@yahoo.com (10-15-2014)
  #5  
Old 10-15-2014, 01:37 AM
 
klsmith007@yahoo.com klsmith007@yahoo.com is offline
 

Member
  
Join Date: Sep 2014
Posts: 13
 

Default Re: Linking "Place Order" with customized payment methods?

Hi Tony,

I spent an hour viewing webinar 3 on creating a custom payment module and found it most helpful. Thank you for that. I also appreciated the code snippets. However, I did find it difficult to create a new payment module following the knowledgebase write-up. I think because the write-up lacked the specific directories where most of the files reside that I had to go through the video a second time to see where to place the files that it's making it more of a challenge. This was time well spent, since after viewing the video a second time, the information was easier to follow. Just a couple of handwritten notes and now everything is clear.

I happily did this since I value everything that you and the team have provided, but you may wish to augment the write-up with that information for others like myself that are new to the whole directory/layout structure. You might also consider a zip(tar) file with just the files that you worked on as a support tool so that we can be sure we have everything we need for our own payment modules.

Take care.

Kevin
__________________
X-Cart 5.2.16
Pay With Amazon
Reply With Quote

The following user thanks klsmith007@yahoo.com for this useful post:
tony_sologubov (10-15-2014)
  #6  
Old 10-15-2014, 04:49 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,430
 

Default Re: Linking "Place Order" with customized payment methods?

Hi Kevin!

Thank you so much for feedback! I am writing Knowledge Base articles right now, so the amount of useful info will grow.

Anyway, could you please let me know what confused you in the webinar write-up? I mean, what are parts where you could not realize where to place a file, etc? I will be great to adjust the text.

Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #7  
Old 10-22-2014, 01:37 AM
 
klsmith007@yahoo.com klsmith007@yahoo.com is offline
 

Member
  
Join Date: Sep 2014
Posts: 13
 

Default Re: Linking "Place Order" with customized payment methods?

Sorry Tony,

I've been super busy lately. I've got some notes and will post as soon as I can free up some time. Thanks for all of your help in getting started.

Kevin
__________________
X-Cart 5.2.16
Pay With Amazon
Reply With Quote
  #8  
Old 10-23-2014, 04:02 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,430
 

Default Re: Linking "Place Order" with customized payment methods?

Sure! Thanks for that in advance!
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Modifying the design and features (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:47 AM.

   

 
X-Cart forums © 2001-2020