• Resolved sulive

    (@sulive)


    Hi Greg,

    Is there a possibility for users to choose between 3 currencies when they submit an ad? So when they enter the price they should also be able to select a currency from a list.

    Thanks
    Silvia

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi, i am afraid that currently, this is not really possible, WPAdverts supports just a single currency, the only other option right now is to allow users to enter any text in the Price field.

    We will be working soon on the currencies extension for WPAdverts it will allow having multiple currencies, but right now i am afraid i cannot tell when it will be ready.

    Thread Starter sulive

    (@sulive)

    Hi Greg,

    Now when I enter an amount in the Price field, the currency is automatically shown. How can I disable that so users can enter any text there?

    Thanks,
    Silvia

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    you can do that by adding the code below in your theme functions.php file

    
    add_filter( "adverts_form_load", "disable_currencies_form_load" );
    function disable_currencies_form_load( $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();
            }
        }
        return $form;
    }
    add_filter( "adverts_get_the_price", "disable_currencies_price", 10, 2 );
    function disable_currencies_price( $price_formatted, $price ) {
        return $price;
    }
    
    Thread Starter sulive

    (@sulive)

    Thanks a lot Greg!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multiple currencies’ is closed to new replies.