ornusweb Posted October 30, 2012 Share Posted October 30, 2012 Hello, Prestashop Version: 1.4.7.3 I have 2 different carriers setup in my shop. Carrier A Carrier B I also have 2 payment methods setup. Cash on Delivery Bank Wire Is there anyway I can add a condition so customers can ONLY select Carrier A if they select Cash on Delivery and Carrier B if they select Bank wire payment method? Thanks in Advance! 1 Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted October 30, 2012 Share Posted October 30, 2012 Hi, You will need change function hookPayment on some payment modules: public function hookPayment($params) { if (!$this->active) return ; global $smarty; $cart = new Cart($params['cookie']->id_cart); if($cart->id_carrier == 6){ // ID carrier return false; } ...... This code excludes payment method for carrier with ID = 6 Regards 1 Link to comment Share on other sites More sharing options...
ornusweb Posted October 30, 2012 Author Share Posted October 30, 2012 Hi, You will need change function hookPayment on some payment modules: public function hookPayment($params) { if (!$this->active) return ; global $smarty; $cart = new Cart($params['cookie']->id_cart); if($cart->id_carrier == 6){ // ID carrier return false; } ...... This code excludes payment method for carrier with ID = 6 Regards Thank you very much Alexander Simonchik. It works like a charm! 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