Changing display# to link saying "Show all"

  • Posts: 197
  • Thank you received: 5
  • Hikashop Business
10 years 3 months ago #163339

I would like to change the behavior of the pagination "Display #" or add to it somehow by having a simple link that displays all of the products in the category I am browsing.

in other words, I would like a link with the same functionality of the "all" value in the drop down. I have a mockup below (very rough)



I already found the display page listing_div.php and this:
<?php echo $this->pagination->getListFooter($this->params->get('limit')); ?>

But I don't know how to change the way that works or how to build a link that would have the same effect as the "all" value in the select drop down.

Thank you.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 3 months ago #163369

Hello,

1.
If you want to hide the "display" line, using some CSS code like this will probably help you :

.hikashop_products_listing .limit {
display: none;
}
2.
You'll have to use some code customization through "listing_div" file of the "product" view via "Hikashop->Display->Views".

Please Log in or Create an account to join the conversation.

  • Posts: 197
  • Thank you received: 5
  • Hikashop Business
10 years 3 months ago #163461

1) Thank you. I already know how to accomplish that. The red cross on the select list is there for illustration purposes. as in "I do not want this but I want that"

2) I am aware that something is needed in listing_div in the place of the snippet. The question is what? Has anyone ever written any code in there to accomplish something similar?

I seem to remember a forum post where there were instructions on how to display different pagination displays (like 10/15/20/ etc) in the select box. To do that I would assume it would be necessary to find that code and change it.

That's essentially what I am looking for.

By the way, is the select part of the Joomla pagination system or Hikashop's?

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 82726
  • Thank you received: 13342
  • MODERATOR
10 years 3 months ago #163467

Hi,

The pagination of listings uses the Joomla pagination system. So you will be able to override each element via template pagination overrides.
In your pagination override, you could add such code:

<a onclick="document.getElementById('display_dropdown_id').selectedIndex=XX;document.getElementById('display_dropdown_id').form.submit();" href="#">ALL</a>
of course, you need to replace display_dropdown_id with the id of the dropdown and XX with the index of the ALL choice in the dropdown. Then, simply hide the dropdown with CSS so that your ALL link can still change it in order to change the pagination but that the users don't see it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum