Aegis Matrix Posted March 23, 2016 Share Posted March 23, 2016 Hello, Is it possible to restrict customers from buying individual products unless there is a a primary product in cart ? For example, I am selling laptops as primary product, and also i provide printers, scanners and other peripherals. Now i want to restrict my customers from buying just the peripherals unless there is a laptop in cart. How do i do this ? Thank you. Regards, Sharath Bharadwaj Link to comment Share on other sites More sharing options...
NemoPS Posted March 23, 2016 Share Posted March 23, 2016 I don't think there is an easy way to do it.What you'd probably have to do, would be to override the OPC controller, so that it has a check on the cart products in the _getPaymentMethods() function. If there is no product belonging to the laptops category, then return an error. Given that you use opc of course, otherwise you need to modify OrderController.php Link to comment Share on other sites More sharing options...
Aegis Matrix Posted March 23, 2016 Author Share Posted March 23, 2016 @Nemo1 Thank you for your response. So i guess there is no way from admin panel to do it ? But if i modify the system files then it'll get refreshed everytime i update prestashop. I wish there was a easy way. Link to comment Share on other sites More sharing options...
NemoPS Posted March 25, 2016 Share Posted March 25, 2016 Correct, you cannot do it from the backend. There might be a module for it, but I don't honestly know any with this functionality.As for the mods being gone, they won't if you use overrides 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