Search the Community
Showing results for tags 'desactivate'.
-
Hello, Is there any way by code to not show a payment method (PayPal) when buying a certain product? Something similar to the module "PayPal surcharge extra fee Module" that includes an option that says "Disable PayPal by Categories" and deactivated by ID I attach a photo I would like the same but I do not want to buy the entire module for just this option. I found a code but it is only for the product id and the bank transfer is deactivated. I want it to deactivated Paypal and a whole category public function hookPayment($params) { $products = $this->context->cart->getProducts(); if($products) { foreach ($products as $productos) { if ($productos['id_product'] == 2) { return; } } } if (!$this->active) return; if (!$this->checkCurrency($params['cart'])) return; $this->smarty->assign(array( 'this_path' => $this->_path, 'this_path_bw' => $this->_path, 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/' )); return $this->display(__FILE__, 'payment.tpl'); } Thank you, Regards!
- 1 reply
-
- paypal
- desactivate
-
(and 1 more)
Tagged with:
-
How to disable PHP Magic Quotes?
- 15 replies
-
- 1
-
- php magic quotes
- desactivate
-
(and 2 more)
Tagged with: