VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Payment Modules => Topic started by: guimz on June 10, 2011, 14:36:11 PM

Title: Change list_payment_methods.tpl.php
Post by: guimz on June 10, 2011, 14:36:11 PM
Hi,

I'm working on a shop and I'm having a problem with the business models.
I need to have the checkout doing to different things, so I need to hack (I think) the list_payment_methods.tpl.php.

I need to have two different methods, to two different situations, being one the paypal method to Portugal and Spain (mainland), a another that processes the order, but the payment is done outside the shop, like bank transfer or check.

So I need to tell that if the country code is PT or ES, it will show the paypal method, else, shows the other method.

How can I change this piece of code to make this work?

<td colspan="2"><?php
//every other country
     $ps_payment_method->list_nocheck($payment_method_id,  false);
     $ps_payment_method->list_bank($payment_method_id,  false);    
//Portugal and Spain             
     $ps_payment_method->list_paypalrelated($payment_method_id,  false); ?>
</td>

Can somebody help me with this? How can I get the country code variable so I can verify and choose what method to show?

Hope to get some replies :P

thank you all...


See U soon