Search the Community
Showing results for tags 'checkput_payment.php'.
-
Hi to everybody! We are working on 2.3.3 and we use 3 payment method: Cod, Paypal with standard module and bank transfert. when the item is "out of stock" and with "stock_allow_checkout" is true, I'd like to disable the Paypal payment in checkout_payment.php page, enabling payments only with Cod and banck transfert. Anyone know how I can solve it? I'm not such an expert, sorry... Trying to solve my problem, in module paypal_standard.php I've changed this code function update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYPAL_STANDARD_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_PAYPAL_STANDARD_ZONE . "' and zone_country_id = '" . $order->billing['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->billing['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } to function update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYPAL_STANDARD_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_PAYPAL_STANDARD_ZONE . "' and zone_country_id = '" . $order->billing['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->billing['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } // disable the module if the order only contains items out of stock if ($this->enabled == true) { if (STOCK_ALLOW_CHECKOUT == 'true') { if ($order->products[$i]['qty'] < 1) { $this->enabled = false; } } } } but it doesn't is working..... I also tried with function update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYPAL_STANDARD_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_PAYPAL_STANDARD_ZONE . "' and zone_country_id = '" . $order->billing['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->billing['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } // disable the module if the order only contains items out of stock if ($this->enabled == true) { if (STOCK_ALLOW_CHECKOUT == 'true') { $stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty']; if ($stock_left < 1) { $this->enabled = false; } } } } but it doesn't work neather.... is there someone that can help me? thank you very much Riccardo