• Resolved nagahxp

    (@nagahxp)


    Greetings

    I have two issues with wpadverts plugin
    First: is rtl which I already searched this forum and asked before and you provided a great support and rtl is fine with desktop and tablets but on mobile unfortunately still add listing labels is not rtl, you can see on the attached screentshots (Attachment1, Attachment2)
    and this is confusing users as they are not understanding what is the text input for.

    Second: price is numbers by default, but unfortunately when inputing numbers in Arabic language (on mobiles), it is not accepting the characters, so the user has to change the language to English then input the price,
    but usually users will not understand this and thy will assume there is an error there and they are leaving the page without adding their advert!

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

    (@gwin)

    Hi,
    1. this might be a conflict with the theme responsive CSS, can you paste here a link to your page with [adverts_add] shortcode? It would be best if i could check this issue on site.

    2. can you let me know what value are you trying to enter in the price field? By default, the price field will accept only Arabic numbers (that is 0-9), if you would like users to enter there any values then you would need to disable script which is formatting the number as a currency value.

    Thread Starter nagahxp

    (@nagahxp)

    Hello

    1. here is the link for add new listing page (Link)

    2. the new mobiles are using the hindi numbers for arabic languages, you can see the numbers style in this attachment, if the only way is to disable the currency script then let’s do it.

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    1. you should be able to right align the field labels by adding the code below in wp-admin / Appearance / Customize / Additional CSS panel

    
    @media all and (max-width: 420px) {
      .adverts-form .adverts-control-group > label {
        text-align: right;
        margin-right: 0;
      }
    }
    

    2. ok you can disable it by adding the code below in the theme functions.php file

    
    add_filter( "adverts_form_load", "disable_currency_validation_form_load" );
    function disable_currency_validation_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;
    }
    
    Thread Starter nagahxp

    (@nagahxp)

    Hi,

    1. I tried the code but no effect, I kept the code posted if you want to see the live status
    There is another CSS code already there, does it have any conflict?, I tried each code separately but in all cases the mobile view still left hand labels for input fields
    The old code which is already there:

    .adverts-form.adverts-form-aligned .adverts-control-group > div,
    .adverts-field-name-post_content label,
    .adverts-field-name-_adverts_account label,
    .adverts-field-name-gallery label,
    .adverts-field-name-advert_category label {
        float: right !important;
    }
    .wpjb.adverts-widget.adverts-widget-categories .adverts-grid-row {
        text-align: right;
        float: right;
    }

    2. That works fine and I can input numbers in any formats now. Thank you

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    1. try postfixing the values with !important keyword so they will overwrite any other value assigned, like this

    
    @media all and (max-width: 420px) {
      .adverts-form .adverts-control-group > label {
        text-align: right !important;
        margin-right: 0 !important;
      }
    }
    
    Thread Starter nagahxp

    (@nagahxp)

    Hi Greg,

    for point
    1. it is now aligned and working fine as required, thank you

    2. the price text box is now accepting values at any format but unfortunately it is displaying 0 value when published! can you help please

    Plugin Author Greg Winiarski

    (@gwin)

    2. in the theme functions.php file add the code below it should disable price formatting

    
    add_filter( "adverts_get_the_price", "my_adverts_get_the_price", 10, 2 );
    function my_adverts_get_the_price( $price, $price_raw ) {
      return $price_raw;
    }
    
    Thread Starter nagahxp

    (@nagahxp)

    That works great with me
    thanks for your usual and immediate support

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘rtl alignment on mobile and price values’ is closed to new replies.