Jump to content

badcrocodile

Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • First Name
    Jason
  • Last Name
    Pollock

badcrocodile's Achievements

Newbie

Newbie (1/14)

1

Reputation

1

Community Answers

  1. My problem was that the file nbr-product-page.tpl wasn't being called by my theme. More specifically, it was being called but someone had commented it out because they didn't want the select field where visitors choose how many products per page they want to show up. So instead of hiding it with CSS they commented out the include for that file. I'm using a custom theme and am new to Prestashop myself so can't give much better answer or more details than that. Basically, at some point in your product display file you need the following: {include file="$tpl_dir./nbr-product-page.tpl"} That was my experience at least. If you do a find-replace for nbr-product-page.tpl that should get you going in the right direction.
  2. Make sure that nbr-product-page.tpl is being loaded and that you have a select form control element with an ID of nb_item.
  3. My theme wasn't calling nbr-product-page.tpl anywhere. It was commented out at some point. That's why layered nav wasn't working because nbr-product-page.tpl is what creates the #nb_item select element that I was missing.
  4. Hmmm... so themes/my_module/js/modules/blocklayered.js line 320ish assigns a variable nbPerPage equal to a selected value on the #nb_item DOM node... which is odd because the #nb_item node is not a select box at all but rather a hidden input field. How could this ever evaluate to anything other than false?? Changing lines 316 - 319 of blocklayered.js from if ($('#nb_item option:selected').length == 0) var nbPerPage = nb_products; else var nbPerPage = parseInt($('#nb_item option:selected').val()); to if ($('#nb_item option:selected').length == 0) var nbPerPage = $('#nb_item').data('perpage'); else var nbPerPage = parseInt($('#nb_item option:selected').val()); Making this change sets up to then tweak pagination.tpl and give us a value to work with: Change line 75 from <input name="n" id="nb_item" class="hidden" value="{$nb_products}" /> to <input name="n" id="nb_item" class="hidden" value="{$nb_products}" data-perpage="{$products_per_page}" /> All of this may be a total hack - I'm not saying it isn't - but it's what worked for me to fix my layered navigation product counts during pagination. If someone knows of a better answer please follow up!
  5. UPDATE: Changing themes to bootstrap seems to fix it -- so my question at this point is what could be causing this behavior in my theme?
  6. Hi all, Having troubles with the Layered Navigation block on my website at http://casshudson.monkeydrupal.com/13-casters. The pagination works but the "Showing 1 - 10" count goes nuts when going to any other page using the pagination links. I read here that the problem could be with the # that Layered Nav is appending to the pagination links. I can see this when I hover my mouse over any of the pagination links. For example, hovering over page 2 link shows "http://casshudson.monkeydrupal.com/13-casters#/page-1" -- when in fact the correct URL would be http://casshudson.monkeydrupal.com/13-casters?p=2. As a matter of fact even hovering over the Page 10 link shows the exact same URL (http://casshudson.monkeydrupal.com/13-casters#/page-1). Why page-1? Shouldn't this be page 10? Anyone ever have any issues like this? I've read quite a bit of similar experiences but haven't been able to find anything that works.
×
×
  • Create New...