strub Posted June 26, 2007 Share Posted June 26, 2007 Hy I wanted to fade out one of my payment method if a customer comes from abroad. Our shop is in Switzerland so every customer who is not from Switzerland can only pay with PayPal. I did the same with the Cost if an order is more than 300 USD then customers can only pay with paypal. Here is the code I did already, I assme I have to make a connection to the dB. This code is from : checkout_payment,php line about 350 for ($i=0, $n=sizeof($selection); $i<$n; $i++) { if ($currencies->format($cart->show_total()) > 300) { $n=0; } if ($check_countries['countries_id'] == 204) { $n=0; } Thanks in advance Link to comment Share on other sites More sharing options...
Guest Posted June 26, 2007 Share Posted June 26, 2007 Hy I wanted to fade out one of my payment method if a customer comes from abroad. Our shop is in Switzerland so every customer who is not from Switzerland can only pay with PayPal. I did the same with the Cost if an order is more than 300 USD then customers can only pay with paypal. Here is the code I did already, I assme I have to make a connection to the dB. This code is from : checkout_payment,php line about 350 for ($i=0, $n=sizeof($selection); $i<$n; $i++) { if ($currencies->format($cart->show_total()) > 300) { $n=0; } if ($check_countries['countries_id'] == 204) { $n=0; } Thanks in advance Why not just use the zones feature of OSC? Link to comment Share on other sites More sharing options...
strub Posted June 26, 2007 Author Share Posted June 26, 2007 I came a bit closer but is still not correctly working. I changed to if ($country['entry_country_id'] !== 204) { $n=0; } now it fades out one payment method. But also if a customer has the entry_country_id == 204 which is Switzerland. So somewhere must be a little problem. Link to comment Share on other sites More sharing options...
strub Posted June 28, 2007 Author Share Posted June 28, 2007 I am sure something with this code must be wrong ($country['entry_country_id'] although entry_country_id should be right. but sth must be still missing If I could echo just the id from the country so that would be the right code. But how to find the right code? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.