Friday, September 17, 2010

Cheesy Love Statuses For Facebook

Prevent the payment in cash for different countries from Italy

We happened to this need for the site of one of our customers www.labstore.it : amministrave issues in practice it was necessary to prevent users from non-Italian to choose the cash as payment. Virtue Mart does not in any way from the control panel management of the genre, as it does well with the shipping methods. Hand
code, then:

The file we need is called ps_payment_method and is found in / administrator / components / com_virtuemart / classes.
At line 411: $

db_contra = new ps_DB;
$ sql_contra = "SELECT country FROM # __ {vm} _user_info WHERE user_id = ". $ GLOBALS ['auth'] ['user_id']." LIMIT 1 ";
$ db_contra-> query ($ sql_contra)
$ db_contra-> next_record ();
naz_contra $ = $ db_contra-> f (" country ") ;
Then after the line 422 add
if (($ db-> f ("Cash payment_method_name ")=='')&&($ naz_contra! == 'ITA')) {continue;
} Save the file and drink a beer in our face.

note: this change so as we see it only works with the Italian version. In theory it should change the text "Flag" with the constant virtuemart net of translation.

0 comments:

Post a Comment