This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Ivanko

  • *****
  • 391 posts
Price scrooling Min->Max in Search Menu
« on: March 03, 2017, 01:04:55 AM »
The gain in search view is very short.
Let say user want to select MIN 30 euros MAX 100 euros

It is impossible due to high sensetivity

any suggestion?

*

MB Themes

Re: Price scrooling Min->Max in Search Menu
« Reply #1 on: March 03, 2017, 09:23:27 AM »
@Ivanko
You can remove slider and use simple inputs.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

tiobil

  • **
  • 7 posts
Re: Price scrooling Min->Max in Search Menu
« Reply #2 on: March 03, 2017, 03:02:51 PM »
how do you do this


www.piata-nationala.ro
« Last Edit: March 03, 2017, 04:54:08 PM by tiobil »

Marked as best answer by frosticek on March 04, 2017, 03:33:30 PM
*

Ivanko

  • *****
  • 391 posts
Re: Price scrooling Min->Max in Search Menu
« Reply #3 on: March 03, 2017, 10:09:39 PM »
@ tiobil

In search.php find:


Code: [Select]
<?php if( osc_price_enabled_at_items() ) { ?>
              <fieldset class="price-box">
                <div class="row price">
                  <h4><?php _e('Price''veronika'); ?>:</h4>
                  <div id="amount-min"></div><div id="amount-del">-</div><div id="amount-max"></div>
                </div>

                <div class="slider-span">
                  <div id="slider-range"></div>
                </div>
              </fieldset>
<?php ?>

replace with:

Code: [Select]
<?php if( osc_price_enabled_at_items() ) { ?>
              <fieldset class="price-box">               
        <h4><?php _e('Price''veronika'); ?>:</h4>
  <div class="box">
                   <div class="row price">
                    <input class="price-min" type="text" name="sPriceMin"  placeholder="<?php echo osc_esc_html(__('min''veronika')); ?> <?php echo osc_get_preference('def_cur''veronika_theme'); ?>" value="<?php echo Params::getParam('sPriceMin'); ?>"/>
                  </div>  
                 
                  <div class="row price">
                    <input class="price-max" type="text" name="sPriceMax" placeholder="<?php echo osc_esc_html(__('max''veronika')); ?> <?php echo osc_get_preference('def_cur''veronika_theme'); ?>" value="<?php echo Params::getParam('sPriceMax'); ?>"/>
                  </div>
                </div>       
   </fieldset>
<?php ?>

*

tiobil

  • **
  • 7 posts
Re: Price scrooling Min->Max in Search Menu
« Reply #4 on: March 04, 2017, 01:18:57 AM »
@ ivanko

very thanks....
To me it does not work, says there is a programming error

*

Ivanko

  • *****
  • 391 posts
Re: Price scrooling Min->Max in Search Menu
« Reply #5 on: March 04, 2017, 01:24:04 AM »
what is the error ?
name , file  ?

you can try to play with this code, this is just example....which is satisfied to me.....

*

tiobil

  • **
  • 7 posts
Re: Price scrooling Min->Max in Search Menu
« Reply #6 on: March 04, 2017, 01:38:14 AM »
@
 ivanko

This is the error

*

Ivanko

  • *****
  • 391 posts
Re: Price scrooling Min->Max in Search Menu
« Reply #7 on: March 04, 2017, 02:08:03 AM »
Then you need to check your errors on server in errorlog.
But if you did some syntax error you should get php warning, so you need to study and find mistake...

*

tiobil

  • **
  • 7 posts
Re: Price scrooling Min->Max in Search Menu
« Reply #8 on: March 04, 2017, 12:44:53 PM »
 @
ivanko

This is already a lot for me

*

Ivanko

  • *****
  • 391 posts
Re: Price scrooling Min->Max in Search Menu
« Reply #9 on: March 04, 2017, 05:18:49 PM »
Then you can try reinstall theme, the code must work.

Re: Price scrooling Min->Max in Search Menu
« Reply #10 on: January 16, 2018, 02:50:47 PM »
Thanks for the code suggestion @Ivanko,

What about if you keep the slider and change just the max value?
I was also wondering how to swap the currency and the value. Example: 1st the value and then the currency.

Thanks!

Re: Price scrooling Min->Max in Search Menu
« Reply #11 on: January 16, 2018, 08:01:47 PM »
It sounds to me to be identified in this piece of code:

Code: [Select]
this.orientation+" ui-widget ui-widget-content ui-corner-all"+(a.disabled?" ui-slider-disabled ui-disabled":""));
this.range=d([]);if(a.range){if(a.range===true){if(!a.values)a.values=[this._valueMin(),this._valueMin()];
if(a.values.length&&a.values.length!==2)a.values=[a.values[0],a.values[0]]}
this.range=d("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(a.range==="min"||a.range==="max"?" ui-slider-range-"+a.range:""))}
for(var j=c.length;j<f;j+=1)e.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>")

and more particularly at
Code: [Select]
this.range=d("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(a.range==="min"||a.range==="max"?" ui-slider-range-"+a.range:""))}
source: ../oc-content/themes/veronika/js/jquery-ui.js