deroxonweb Posted September 1, 2012 Share Posted September 1, 2012 (edited) Hello Sir/Madam, Could somebody please teach me how to solve the conflict of top and bottom pagination in product-list? I have a top and bottom pagination in the product-list, but when I click on whatever button of that, the top pagination bar will be hiding. I am using PS1.4.8.3. I looked into the category.tpl and found the code: {if $products} <div class="content_sortPagiBar"> {include file="$tpl_dir./pagination.tpl"} <div class="sortPagiBar clearfix"> {include file="$tpl_dir./product-sort.tpl"} {include file="$tpl_dir./product-compare.tpl"} {include file="$tpl_dir./nbr-product-page.tpl"} </div> </div> {include file="$tpl_dir./product-list.tpl" products=$products} <div class="content_sortPagiBar"> {include file="$tpl_dir./pagination.tpl"} <div class="sortPagiBar clearfix"> {include file="$tpl_dir./product-sort.tpl"} {include file="$tpl_dir./product-compare.tpl"} {include file="$tpl_dir./nbr-product-page.tpl"} </div> </div> I tried to modify among those codes, but it is useless. I think it should be the pagination ajax setting problem. I have no idea where to correct this problem. Please give me a hand. Thank you very much. Best regards, Derox Edited September 21, 2012 by deroxonweb (see edit history) Link to comment Share on other sites More sharing options...
deroxonweb Posted September 3, 2012 Author Share Posted September 3, 2012 Could somebody please teach me how to set the proper top and bottom pagination for product-list? I am using PS1.4.8.3. Thanks a lot. Best regards, Derox Link to comment Share on other sites More sharing options...
devein Posted September 5, 2012 Share Posted September 5, 2012 if you are using blocklayered, the problem lies in the blocklayered.js code that is written to handle only one pagination element. simplest hack would be to include second pagination.tpl with other id than "pagination" (for example, "pagination2"), (including second pagination template with a parameter, like here products variable is passed) {include file="$tpl_dir./product-list.tpl" products=$products} and then duplicate relevant blocklayered.js functions (everywhere there is invocation to "#pagination", copy all code and change id to "#pagination2"). Link to comment Share on other sites More sharing options...
deroxonweb Posted September 21, 2012 Author Share Posted September 21, 2012 (edited) Hello Sir, I followed the way to change the second pagination.tpl in category.tpl to paginationtop.tpl, and duplicate all the blocklayered.js functions (I have changed the #pagination to #paginationtop). The conflict of the top and bottom pagination has been solved. But when I click on the block layer function to narrow a result, the page will remain loading only... so I disable the loader function. But whatever of that, when I remove the filter checkbox, the result will remain the same only, does not change or filter again. Could you please teach me how to solve this problem? Or anything I have done in the wrong way? I copy all the code in blocklayered.js. from: ------------------------------------------------------------------ var ajaxQueries = new Array(); var ajaxLoaderOn = 1; var sliderList = new Array(); var slidersInit = false; $(document).ready(function() { cancelFilter(); openCloseFilter(); --------------------------------------------------------------- to the bottom and paste it in the same file. Then I only find the #pagination and changed all to #paginationtop. Is it true? Please help, thank you very much. Edited September 21, 2012 by deroxonweb (see edit history) Link to comment Share on other sites More sharing options...
devein Posted September 21, 2012 Share Posted September 21, 2012 (edited) well, you have gone too easy on blocklayered.js the trick is not just to duplicate whole code - you need only to duplicate code related to #pagination. so take the original .js and try to understand where line of code starts with #pagination. It can be difficult as jquery has chained functions. anyway this is the way to do it. disabling "loader" function effectively disabled whole loading of new products AFAIK - you shouldnt disable anything if you dont know what it is. after some bit more little thinking (I'm just learning like you): in jquery you can select multiple elements. so perhaps this time try not to duplicate the lines, just change the jquery selection from ('#pagination') to ('#pagination,#paginationtop') - but keep them working, this is just a example! see http://api.jquery.com/multiple-selector/ good luck! PS after weekend I will be back online Edited September 21, 2012 by devein (see edit history) Link to comment Share on other sites More sharing options...
deroxonweb Posted September 23, 2012 Author Share Posted September 23, 2012 Hi Sir, I tried to change the jquery selection from ('#pagination') to ('#pagination,#paginationtop'), the price range filter will be errored, and when I remove the filter checkbox, the top pagination bar when be disappeared again. Is there a way to solve this problem? I tried to only duplicate the related #pagination code and change it to #paginationtop, but the filter will not loading at all. I am so nervous of this problem. Could you please upload me a proper blocklayered.js file that can solved this problem? The filter function is very important to my site activity, please give me a hand. Thank you very much. Best regards, Derox Link to comment Share on other sites More sharing options...
deroxonweb Posted September 27, 2012 Author Share Posted September 27, 2012 Hello, Could somebody please help to solve this problem? Or any other alternative way that is similar to the block layered? Thank you. Best regards, Derox Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now