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

XCart to send response back to external site

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 05-24-2016, 06:55 AM
 
mesterman mesterman is offline
 

Newbie
  
Join Date: Apr 2016
Posts: 2
 

Default XCart to send response back to external site

Hello all,

I am fairly new to using x-cart (v. 5) and have not done any logic/customization changes.

I am adding products from an external site to the XCart solution via URL; I have successfully been able to do this, but I need some additional functionality.

1- Be able to add multiple products/qty in single URL POST method; I have a workaround that I send multiple POSTS in a delayed loop

- or -

2- if (1) is not possible, I want the XCart software to send me a response back that the adding a product was successful; then I can send the next request. Sending successive requests at one time has not worked (only 1 request is added to the user's cart)

3- When a user completes and pays for an order, I want to send a URL POST/GET method FROM XCart back to my third party software so I can do some additional processing/return to the external site

I really just need someone to point me in the right direction of what classes to decorate/modify... That would be most helpful!

Thanks,
Marty Esterman
Founder, Fluency Games
__________________
5.2.6
Reply With Quote
  #2  
Old 05-24-2016, 08:45 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: XCart to send response back to external site

You should look into \XLite\Controller\Customer\Cart::doActionAdd() and add a similar method from your module by decorating that class.

If your products have no options, the logic will be pretty simple.
But with options it may become a tricky one - see the getCurrentItem() and prepareOrderItem() methods.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #3  
Old 05-25-2016, 05:16 AM
 
mesterman mesterman is offline
 

Newbie
  
Join Date: Apr 2016
Posts: 2
 

Default Re: XCart to send response back to external site

Thanks!

Any ideas on how to do #3?
__________________
5.2.6
Reply With Quote
  #4  
Old 05-25-2016, 07:54 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: XCart to send response back to external site

You can use the \XLite\Core\HTTP\Request class to send background HTTP/HTTPS requests.
Please check the source code for examples of use.

Or you can add an IMG or SCRIPT tag to the "thank you" page and link it to the third-party software.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions

Last edited by qualiteam : 05-25-2016 at 07:56 PM.
Reply With Quote
  #5  
Old 05-26-2016, 04:48 AM
 
mesterman mesterman is offline
 

Newbie
  
Join Date: Apr 2016
Posts: 2
 

Default Re: XCart to send response back to external site

Thanks, I will look into that...

Marty Esterman
Fluency Games
__________________
5.2.6
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



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 03:13 PM.

   

 
X-Cart forums © 2001-2020