Jump to content

[SOLVED] Display payment from specific price


Wazzu
 Share

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');
   }
}

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More