We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53526
    • 2 Posts
    Good evening everyone. For the resources directory on the site, I installed 3 applications that I needed: tagmanager2, getPage, and CSS StarRating. With the help of the first I made a filter and do the sorting. With the help of the second I get paginated through the pages in the catalog. Well, the third one is used for ranking users by various resources.
    And now there was a problem, or a glitch. When downloading the directory in the resource cards, just bang and the rating disappears. After clicking on the F5 button, the rating appears, but if you select any filter or sort, it disappears again.
    Here I enclose the output codes of the catalog itself and the goods card in it:

    Catalog:

    <ul class="places-list">
    [[tmFilters?
    &filterOuterTpl=`tm2_filterOuterTpl`
    &filterTpl=`tm2_filterTpl`
    &filterNumericOuterTpl=`tm2_filterOuterTpl`
    &filterNumericTpl=`tm2_filterNumericTpl`
    &jsMap=`1`
    &toPlaceholder=`filters`
    ]]

    <div id="filters">
    <form action="[[~[[*id]]]]" method="get">

    <input type="hidden" name="page_id" value="[[*id]]" disabled="disabled" />

    [[+filters]]

    <button type="button" onclick="tmFilters.resetFilters(); return false;">Сбросить</button>
    </form>
    </div>

    <div class="sorting">
    <select class="f_sortby" name="sortby" onchange="tmFilters.changeOrder(this);">
    <option value="longtitle">по названию</option>
    <option value="price">по цене</option>
    <option value="publishedon">по дате</option>
    </select>

    <select class="f_sortdir" name="sortdir" onchange="tmFilters.changeOrder(this);">
    <option value="asc">по возрастанию</option>
    <option value="desc">по убыванию</option>
    </select>

    <select class="f_limit" name="limit" onchange="tmFilters.changeOrder(this);">
    <option value="4" selected="selected">4</option>
    <option value="10">10</option>
    <option value="20">20</option>
    <option value="40">40</option>
    </select>
    <div class="clearfix"></div>
    </div>


    <div id="products">
    [[!tmCatalog?
    &sortdir=`[[#GET.sort]]`
    ]]
    <div class="clearfix"></div>
    </div>

    <ul class="pagination" id="pages">
    [[!+page.nav]]
    </ul>
    </ul>

    Commodity Chunk:

    <li class="places-list__item">
    <div class="places-list__item-lc">
    <a href="/[[~[[+id]]]]" class="places-list__item-img places-list__item-img--lc">
    <img src="[[+tv.cardimg]]" alt=""></a>
    <div class="places-list__rating places-list__rating--lc">
    <div class="mbr-section-stars">[[!starRating? &starId=`[[+id]]`]]</div>
    </div>
    <div class="places-list__address places-list__address--lc">[[+tv.adres]]</div>
    </div>
    <div class="places-list__item-rc">
    <div class="places-list__item-top">
    <div class="places-list__item-top-tags">
    <span class="tt-tag">[[showMestas?content=`[[+tv.mesta]]`]]</span>
    </div>
    </div>
    <a href="/[[~[[+id]]]]" class="places-list__item-img places-list__item-img--rc" rel="nofollow">
    <img src="[[+tv.cardimg]]" alt=""></a>
    <h3 class="places-list__item-header"><a href="/[[~[[+id]]]]" rel="nofollow">[[+longtitle]]</a></h3>
    <div class="places-list__add-info">
    <div class="places-list__rating places-list__rating--rc">
    <div class="mbr-section-stars">[[!starRating? &starId=`[[+id]]`]]</div>
    </div>
    <div class="places-list__address places-list__address--rc">[[+tv.adres]]</div>
    </div>
    <div class="places-list__text">[[+tv.lead]]</div>
    <div class="nav_link" onclick="location.href='/[[~[[+id]]]]';"></></div>
    </div>
    </li>

    Although push in what direction to dig, what can cause such a nuisance. Thank you
      • 17301
      • 932 Posts
      It sounds like an issue with the JavaScript/jQuery. I actually have something similar happening with likedislike at the moment which I haven't got round to fixing yet. I'll post here as soon as I've had a deeper look into it, if you haven't resolved it yourself by then.
        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 53526
        • 2 Posts
        Hello! Yes, it looks like it. This only happens when Ajax filtering is enabled:
        &filtersType=`filters`
        If you enable this option filters_simple rating is displayed, but then the checkboxes marked by the user become inactive