Jump to content

[SOLVED] Display payment from specific price


Wazzu

Recommended Posts

I can even show a different template to display a disabled payment method, so customers know it exists :-)

    function hookPayment($params) {

       global $smarty;
       $smarty->assign(array(
               'this_path' => $this->_path,
               'this_path_ssl' => Configuration::get('PS_FO_PROTOCOL').$_SERVER['HTTP_HOST'].__PS_BASE_URI__."modules/{$this->name}/"));

   // Checks the minimum total of the order
   if ($params['cart']->getOrderTotal() < 1000) {
           return $this->display(__FILE__, 'payment_disabled.tpl');
   } else {
           return $this->display(__FILE__, 'payment.tpl');
   }
}

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...