Author Topic: state not being shown in VM3.2.2  (Read 1038 times)

Amix

  • Beginner
  • *
  • Posts: 3
  • A beginner
state not being shown in VM3.2.2
« on: June 30, 2017, 17:44:11 pm »
Hello folks I've been struggling with an issue. State / Province / Region is not shown in Vm3. I've read all topics related to this problem and I don't know what should I do i disabled/unpublished and plugins and modules even I changed to beez template but still nothing please support me. my webpage is Allureskinproducts.com - virtuemart 3.2.2 - joomla 3.7.2 - PHP version:  7.1

If someone can fix my problem I can get him fully access to my cpanel and administrator

K&K media production

  • VirtueMart Developer Team
  • Global Moderator
  • Full Member
  • *
  • Posts: 838
  • VirtueMart Version: VM3 on J3
Re: state not being shown in VM3.2.2
« Reply #1 on: June 30, 2017, 23:49:12 pm »
It's your template. There is a JS error. Use firebug to see more details.

Code: [Select]
main.js:38    Uncaught TypeError: $(...).tooltip is not a function
No problem with protostar template:
https://www.allureskinproducts.com/index.php/component/virtuemart/user/editaddresscartBT?Itemid=0&template=protostar

Amix

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: state not being shown in VM3.2.2
« Reply #2 on: July 01, 2017, 07:44:20 am »
thank you so much for your response but i don't know exactly which kind of codes should I check I got a backup from my database so I removed and installed again but the problem still remains. I applied debugger and firebug

function(event) {
  $('.sp-select').not(this).find('ul').slideUp();
  $(this).find('ul').slideToggle();
}

and

// Select
    $(document).on('click', function(e) {
        var selector = $('.sp-select');
        if (!selector.is(e.target) && selector.has(e.target).length === 0) {
            selector.find('ul').slideUp();
        }
    });

    $('select:not(.vm-prd-customfields):not(.sub-variant)').each(function(event) {
        $(this).hide();
        var $self = $(this);
        var spselect  = '<div class="sp-select">';
        spselect += '<div class="sp-select-result">';
        spselect += '<span class="sp-select-text">' + $self.find('option:selected').text() + '</span>';
        spselect += ' <i class="fa fa-angle-down"></i>';
        spselect += '</div>';
        spselect += '<ul class="sp-select-dropdown">';

        $self.children().each(function(event) {
            if($self.val() == $(this).val()) {
                spselect += '<li class="active" data-val="'+ $(this).val() +'">' + $(this).text() + '</li>';
            } else {
                spselect += '<li data-val="'+ $(this).val() +'">' + $(this).text() + '</li>';
            }
        });

        spselect += '</ul>';
        spselect += '</div>';
        $(this).after($(spselect));
    });

    $(document).on('click', '.sp-select', function(event) {
        $('.sp-select').not(this).find('ul').slideUp();
        $(this).find('ul').slideToggle();
    });

    $(document).on('click', '.sp-select ul li', function(event) {
        var $select = $(this).closest('.sp-select').prev('select');
        $(this).parent().prev('.sp-select-result').find('span').html($(this).text());
        $(this).parent().find('.active').removeClass('active');
        $(this).addClass('active');
        $select.val($(this).data('val'));
        $select.change();
    });


Thanks in advance

Amix

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: state not being shown in VM3.2.2
« Reply #3 on: July 01, 2017, 11:06:37 am »
thank you  I solved the problem on my own