Jump to content

Edit History

spyrosel

spyrosel

Thank you @ftardio! This is useful indeed but I was looking for a solution for prestashop 1.6.

Fortunately I have found one!

I am getting the selected carrier in my payment module (in hookDisplayPayment method) and only display the payment method if my custom carrier is selected.

Here it is in case someone else is looking for this:

        $carrier = new Carrier($this->context->cart->id_carrier);
        if ($carrier->external_module_name != 'my_custom_carrier_module_name') {
            return;
        }

My problem now is how to hide the other payment methods when my custom carrier is selected... Any ideas?

spyrosel

spyrosel

Thank you @ftardio! This is useful indeed but I was looking for a solution for prestashop 1.6.

Fortunately I have found one!

I am getting the selected carrier in my payment module (in hookDisplayPayment method) and only display the payment method if my custom carrier is selected.

Here it is in case someone else is looking for this:

        $carrier = new Carrier($this->context->cart->id_carrier);
        if ($carrier->external_module_name != 'my_custom_carrier_module_name') {
            return;
        }

 

×
×
  • Create New...