cancel
Showing results for 
Search instead for 
Did you mean: 

PlumRocket pagination error

PlumRocket pagination error

Hi community,

 

I'm experiencing some issues with the Plumrocket Lite navigation tool, when I click the second page of the pagination it stucks on the first page and does not change the URL (like ?p=2 to ?p=3)

 

I've got this error on my page:


TypeError: $(...).append is not a function
at Object.updateDataLayer (data-layered.js:16:37)
at filter-action.js:226:26
at Array.forEach (<anonymous>)
at Object.done (filter-action.js:224:50)
at Object.success (filter-action.js:106:30)
at fire (jquery.js:3500:50)
at Object.fireWith [as resolveWith] (jquery.js:3630:29)
at done (jquery.js:9796:30)
at XMLHttpRequest.<anonymous> (jquery.js:10057:37)
at XMLHttpRequest.nrWrapper (result/?p=2&q=auricular:10:17817)

 

The data-layered.js:16:37 from my code is:

 

    return {
        updateDataLayer: function (data) {
            if (data.productlist && typeof dataLayer != 'undefined' && data.googleTagManager.length > 0) {
                $('.products-grid').append(data.googleTagManager);

                var impressions = [];
                var impressionsData;

                if (typeof staticImpressions['search_result_list'] != 'undefined') {
                    impressionsData = staticImpressions['search_result_list'];
                } else {
                    impressionsData = staticImpressions['category.products.list'];
                }

                for (var i = 0; i < impressionsData.length; i++) {
                    impressions.push({
                        'id': impressionsData[i].id,
                        'name': impressionsData[i].name,
                        'category': impressionsData[i].category,
                        'list': impressionsData[i].list,
                        'position': impressionsData[i].position
                    });
                }
 
The critical line is: $('.products-grid').append(data.googleTagManager)
 
Anyone who can help me? Thanks.