Hi,
you can change the HUF to Ft, by adding following code in your theme functions.php file
add_filter("adverts_currency_list", "my_adverts_currency_list");
function my_adverts_currency_list( $list ) {
foreach( $list as $k => $currency ) {
if( $currency["code"] == "HUF" ) {
$list[$k]["sign"] = "Ft";
}
}
return $list;
}
I am not exactly sure about your second question. Where do you see the “.00”? and what are your currency settings in wp-admin / Options / Core?
Hi Greg,
Currency change working, thanks!
Second question:
At the advert add page if I type the price, I get .00 after my price, here you can see:
https://drive.google.com/open?id=0B0QRp-GaH1eLR21zSGE1SXZmeDg
https://drive.google.com/open?id=0B0QRp-GaH1eLWjQxR0g4bC1pcHc
Thanks!
yologerix
Right now i am afraid it is not really possible to remove the .00 at the end of the price, unless you will want to disable currency validation and formatting at all and validate the price as an integer only, if so then you can use the code below to do that
add_filter( "adverts_form_load", "disable_price_validation" );
function disable_price_validation( $form ) {
if( $form['name'] != "advert" ) {
return $form;
}
foreach( $form["field"] as $key => $field ) {
if( $field["name"] == "adverts_price" ) {
$form["field"][$key]["class"] = "";
$form["field"][$key]["filter"] = array();
$form["field"][$key]["validator"] = array( array( "name" => "is_integer" ) );
}
}
return $form;
}