tazan Posted August 19, 2018 Share Posted August 19, 2018 Hi All, I'm building this webshop based on credit/virtual coins the customers can purchase and then use. When theybuy credit, they will go through the normal checkout process, but when they buy some products with the credit, I need the purchase to happen automatically, without checkout process. I'm sure it can't be much of a pickle to achieve that. But perhaps there are already made modules for something similar? Any advice is appreciated. Best Regards, hendrik Link to comment Share on other sites More sharing options...
NemoPS Posted August 20, 2018 Share Posted August 20, 2018 Well I am not sure about existing modules, but the process per se is not terribly complex. What you need to create is - a controller/script to be called by the "buy" button - a dummy payment module that can be the script itself (aka the script can be a dummy payment module) In your code: - create a new cart object - add the product to the cart - copy what PaymentModule::validateOrder does to create a new order - make sure the user has at least one address, and use it in your code (grabbing its id) More or less just this 1 Link to comment Share on other sites More sharing options...
tazan Posted September 5, 2018 Author Share Posted September 5, 2018 Thank you for the answer. That does make sense, I will take a look at making it like that Best Regards, Hendrik Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now