Ziya Posted April 17, 2014 Share Posted April 17, 2014 (edited) Hello everyone, I am stuck at a problem. I have a payment module. if user logged in and making payment then everything works fine. But if we try as guest it is not working . I am talking about validation code of my module. if ($this->context->cart->id_customer ==0 ) .. Tools::redirectLink(orderpage); $this->context->cart->id_customer =0 and that is why payment process being cancelled always. it redirects me order detail page I don't how and where to register cart->id_customer information, or how to fill cart info for context ? is possible to make payment as a guest , except cashondelivery I am paying with cashondelivery it works fine, and just right after that , if I try to make payment with module it works fine also. It seems cashondelivery creates a temp user for guest and my module can use it. I dont know if user information is stored on cookie or somewhere else ? Please help me to understand how stuff works here Thank you in advance Edited April 17, 2014 by Ziya (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted April 17, 2014 Share Posted April 17, 2014 the only real difference between a customer and a guest is a password. i would suspect that the module is just buggy and is performing a check to ensure a valid customer exists if you would like guests to use this module, then remove that code and just validate that it is either a customer or a guest. Link to comment Share on other sites More sharing options...
Ziya Posted April 17, 2014 Author Share Posted April 17, 2014 (edited) when checking validate.php of cashondelivery there is same control if customer exists if ($this->context->cart->id_customer ==0 ) .. but when trying to [pay with cash on delivery , the value of $this->context->cart->id_customer is different than 0, I wonder where that value had been changed ? as I understand , the module cashondelivery is registering a guest as a temp user, but how ? Edited April 17, 2014 by Ziya (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted April 17, 2014 Share Posted April 17, 2014 the module does not register customers or guest, as i said remove the checks that compare the id_customer to 0, and instead validate that the customer is valid 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