| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
XCart to send response back to external site | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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 |
|||||||
#2
|
|||||||||
|
|||||||||
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 |
|||||||||
#3
|
|||||||
|
|||||||
Re: XCart to send response back to external site
Thanks!
Any ideas on how to do #3?
__________________
5.2.6 |
|||||||
#4
|
|||||||||
|
|||||||||
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. |
|||||||||
#5
|
|||||||
|
|||||||
Re: XCart to send response back to external site
Thanks, I will look into that...
Marty Esterman Fluency Games
__________________
5.2.6 |
|||||||
|
|||
X-Cart forums © 2001-2020
|