0

I have try to do remove pay online & cash on delivery option if we sign in for wholesale Magento 1.9.4.0

thanks

0

You can follow this blog to disable payment method based on the condition

you can set your custom logic by using this code

in the Observer.php file please replace this code to satisfy your condtion

<?php

class Vendor_Extension_Model_Observer {

    public function paymentMethodIsActive(Varien_Event_Observer $observer) {
        $method = $observer->getMethodInstance();
        
        if ($method->getCode() == 'cashondelivery') {

            if(Mage::getSingleton('customer/session')->isLoggedIn()){

                $groupeId = Mage::getSingleton('customer/session')->getCustomerGroupId();
                if ($groupeId==2) {
                    $result = $observer->getResult();
                    $result->isAvailable = false;
                }

            }   
            
            
        }
        
    }
}
  • We logged in as a wholesaler. then hide cash on delivery.. – Vipin Aug 16 at 4:23
  • what is the groupe id of wholesaler customer groupe – Jigs Parmar Aug 16 at 5:48
  • ill update my code please check this – Jigs Parmar Aug 16 at 5:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.