bigberge Posted April 8, 2009 Share Posted April 8, 2009 Is there a way to enable a payment mode for lets say all transactions of 12$ and less ? Ans is there a way to disable a payment mode for transactions of 12$ and less ... or enable it only for transactions over 12,00$ ? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 8, 2009 Share Posted April 8, 2009 You need to modify the paymenr module's update_status function look for something like: function update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_COD_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_COD_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } // disable the module if the order only contains virtual products if ($this->enabled == true) { if ($order->content_type == 'virtual') { $this->enabled = false; } } } and before the final } add: // Disable order module if order total if $12 or less if (true == $this->enabled && 12 > $order->info['total']) { $this->enabled = false; } Quote Link to comment Share on other sites More sharing options...
bigberge Posted April 8, 2009 Author Share Posted April 8, 2009 if i am correct, to disable a payment module for 12$ or more i juste switch the > like this ? // Disable order module if order total if $12 or less if (true == $this->enabled && 12 < $order->info['total']) { $this->enabled = false; } Thanks alot ! Quote Link to comment Share on other sites More sharing options...
Guest Posted April 8, 2009 Share Posted April 8, 2009 The way I had written it was correct to disable it if the order is less than $12 12 < $order->info['total'] means "12 is more than the order total" (just another way of saying "the order total is less than 12") Quote Link to comment Share on other sites More sharing options...
bigberge Posted April 9, 2009 Author Share Posted April 9, 2009 Great, that what i understood. Also, i have a little problem. I want paypal to do both transactions, but with a different payment email. So i need to get 2 paypal transaction modules, i tried to modify the Paypal standard so it would be another module with a different name... but it doesnt work. Any clues ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.