Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • marislem Friend
    #1034191

    I’ve followed the steps in the documentation page to create Depend Filter but when in the front end I select an item of "Localidad" the "Ciudad /Barrio" doesn’t display.
    Something strange occurs: the first time I make the selection I can see the cities but the I can’t see them any more.
    Than you
    Mariana


    1. 01-1
    Luna Garden Moderator
    #1034402
    This reply has been marked as private.

    marislem Friend
    #1034610

    Hi,
    I wrote to my hosting help desk and they say that there is no restriction for this IP address. They ask to send me a screenshot with the error.

    I rewrite the url site:
    http://kumvisual.com.ar/pym/
    Page:
    http://kumvisual.com.ar/pym/index.php/buscalos-en-tu-barrio (At the Mail Menu "Buscalos en tu barrio)

    Regards
    Mariana

    Luna Garden Moderator
    #1034643

    Hi,

    Thanks for the info.

    I have checked on your site. On page Buscalos en tu barrio, you set to show 2 JA K2 Filter modules, that makes the JS code detect the wrong element from other.

    I reported your issue to our developer, we’ll try to fix it soon. For temporary, disable module id 126.

    Mo0nlight Moderator
    #1034762

    Hi.

    You can try this.
    Edit the file.
    /modules/mod_jak2filter/tmpl/default.php

    Look for:

           jQuery('#jak2filter<?php echo $module->id;?> .jak2depend').unbind().off().change(function() {
                $next = '#K2ExtraField_'+jQuery(this).data('exfield')+'_'+(parseInt(jQuery(this).data('dependlv'))+1);
                if (jQuery($next).length) resetChildren(jQuery(this), jQuery($next));
    
                jQuery('#xf_'+parseInt(jQuery(this).data('exfield'))+'_array').val('');
                jQuery('#jak2filter<?php echo $module->id;?> .jak2depend').each(function(){
                    $ar = jQuery('#xf_'+parseInt(jQuery(this).data('exfield'))+'_array').val();
                    if (jQuery(this).val() != '')
                        $ar += jQuery(this).val()+',';
                    jQuery('#xf_'+parseInt(jQuery(this).data('exfield'))+'_array').val($ar);
                });
    
                jQuery('#xf_'+parseInt(jQuery(this).data('exfield'))+'_txt').val(jQuery(this).val());
                if (jQuery(this).val() == '') { // get the prev value if choose no value at current.
                    $prev = '#K2ExtraField_'+jQuery(this).data('exfield')+'_'+(parseInt(jQuery(this).data('dependlv'))-1);
                    if (jQuery($prev).length) {
                        jQuery('#xf_'+parseInt(jQuery(this).data('exfield'))+'_txt').val(jQuery($prev).val());
                    }
                }
                if (jQuery(this).data('autofield') == 'all') $('<?php echo $formid; ?>').fireEvent('submit'); // always submit form if all defined.
                <?php if($auto_filter): ?>
                    if (parseInt(jQuery(this).data('dependlv')) === parseInt(jQuery(this).data('autofield'))) // submit form at number defined
                        $('<?php echo $formid; ?>').fireEvent('submit');
                <?php endif; ?>
                <?php if($auto_filter): ?>
                if (!jQuery($next).length) {
                    // if auto_filter and the last one choose we submit form.
                    $('<?php echo $formid; ?>').fireEvent('submit');
                }
                <?php endif; ?>
            });

    Change to

            jQuery('#jak2filter<?php echo $module->id;?> .jak2depend').unbind().off().change(function() {
                $next = '#jak2filter<?php echo $module->id;?> #K2ExtraField_'+jQuery(this).data('exfield')+'_'+(parseInt(jQuery(this).data('dependlv'))+1);
                if (jQuery($next).length) resetChildren(jQuery(this), jQuery($next));
    
                jQuery('#jak2filter<?php echo $module->id;?> #xf_'+parseInt(jQuery(this).data('exfield'))+'_array').val('');
                jQuery('#jak2filter<?php echo $module->id;?> #jak2filter<?php echo $module->id;?> .jak2depend').each(function(){
                    $ar = jQuery('#xf_'+parseInt(jQuery(this).data('exfield'))+'_array').val();
                    if (jQuery(this).val() != '')
                        $ar += jQuery(this).val()+',';
                    jQuery('#jak2filter<?php echo $module->id;?> #xf_'+parseInt(jQuery(this).data('exfield'))+'_array').val($ar);
                });
    
                jQuery('#jak2filter<?php echo $module->id;?> #xf_'+parseInt(jQuery(this).data('exfield'))+'_txt').val(jQuery(this).val());
                if (jQuery(this).val() == '') { // get the prev value if choose no value at current.
                    $prev = '#jak2filter<?php echo $module->id;?> #K2ExtraField_'+jQuery(this).data('exfield')+'_'+(parseInt(jQuery(this).data('dependlv'))-1);
                    if (jQuery($prev).length) {
                        jQuery('#jak2filter<?php echo $module->id;?> #xf_'+parseInt(jQuery(this).data('exfield'))+'_txt').val(jQuery($prev).val());
                    }
                }
                if (jQuery(this).data('autofield') == 'all') $('<?php echo $formid; ?>').fireEvent('submit'); // always submit form if all defined.
                <?php if($auto_filter): ?>
                    if (parseInt(jQuery(this).data('dependlv')) === parseInt(jQuery(this).data('autofield'))) // submit form at number defined
                        $('<?php echo $formid; ?>').fireEvent('submit');
                <?php endif; ?>
                <?php if($auto_filter): ?>
                if (!jQuery($next).length) {
                    // if auto_filter and the last one choose we submit form.
                    $('<?php echo $formid; ?>').fireEvent('submit');
                }
                <?php endif; ?>
            });
    marislem Friend
    #1034798

    Hi, I did it but I don’t see any change.
    Regards

    Luna Garden Moderator
    #1034901

    Hi,

    Pls share the FTP info of your site so we will check for you.

    marislem Friend
    #1035095
    This reply has been marked as private.
    Mo0nlight Moderator
    #1035849

    Hi.

    I can not access with your provided ftp account nor cpanel account

    Kindly check again

    Luna Garden Moderator
    #1035959

    Hi,

    We can’t access to your FTP or Cpanel, could you check the info you sent me again?

    marislem Friend
    #1036061
    This reply has been marked as private.
    Luna Garden Moderator
    #1036339

    Hi,

    I have checked your site and see that JA K2 Filter you use not in latest version.
    Update this extension to latest version then custom again. Depend filter will work.

    marislem Friend
    #1036541

    Hi, I updated the version and it didn’t work. Then I uninstalled JA K2 Filter and installed again and then it started to work.
    I tried it several times and it worked perfectly. But then it started to appear an empty extra field new (please see the screenshot in the attachment) and the component doesn’t work again.

    Another question: How do I sort depend filter items alphabetically?

    Regards
    Mariana


    1. screen01
    Mo0nlight Moderator
    #1036682

    Hi.

    After you installed the latest version you have to apply the code above to make it work in your case.

    You had three level at your multi category so the module show up 3 select box. It’s not a bug.
    You have to add more title to the depend range field.

    i applied it for you.
    Please check.

    marislem Friend
    #1036790

    Hi. After installing the update the site started working correctly and I didn’t put the code you mentioned. At that time I made a backup. Then I kept working and the error that I mentioned came up.
    Before receiving your response I installed the backup and the site works well. I tested it several times and it still works correctly.
    kumvisual.com.ar/pesca

    Another question: How do I sort depend filter items alphabetically? I’ve done it manually in "Manage Multi-level Fields data" beacuse I couldn’t find the way to order alphabetically.

    Regards
    Mariana

Viewing 15 posts - 1 through 15 (of 16 total)

This topic contains 15 replies, has 3 voices, and was last updated by  Luna Garden 6 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum