Navigation entre les pages

  • Posts: 147
  • Thank you received: 12
  • Hikashop Business
1 year 2 months ago #349205

-- url of the page with the problem -- : rolex.ahriise.com/collection
-- HikaShop version -- : 4.7.1
-- Joomla version -- : 4.2.7
-- PHP version -- : 8.1.13

Bonjour,

Lorsque l'on navigue d'une page à une autre, on arrive (logiquement) sur le haut de la page suivante.
Je souhaiterais que lors du passage à la page suivante, on soit automatiquement positionné à la hauteur des modèles et non pas en haut de la page.

Sauriez-vous comment effectuer cela ?

Merci d'avance et bonne journée

Sandra

Attachments:

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
1 year 2 months ago #349212

Bonjour,

Je ne vois qu'une page dans toutes les pages que j'ai vu dans votre boutique, donc je ne suis pas sûr de saisir ce que vous voulez.
Comment puis-je passer sur "la page suivante" ?
Avec de la pagination quelque part ?
Si je suppose que vous voulez parler de la pagination des listings, alors ce qu'il est possible de faire c'est de modifier product / listing_div via le menu Affichage>Vues et de rajouter #sp-component à l'URL de l'élément "form" de la pagination dans cette vue.

Last edit: 1 year 2 months ago by nicolas.

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

  • Posts: 147
  • Thank you received: 12
  • Hikashop Business
1 year 2 months ago #349264

Bonjour Nicolas,

Merci de votre réponse !
Effectivement, ajouter #sp_component permettra d'obtenir le résultat recherché.

Je ne comprends pas où ajouter cela dans ce fichier vue. Pourriez-vous me le préciser ?

Merci beaucoup !

Sandra

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

  • Posts: 4519
  • Thank you received: 612
  • MODERATOR
1 year 2 months ago #349267

Hello,

Follow me step by step :
- From HikaShop Configuration, go to Display dropdown => Views
- Use the three dropdown to filter your different views with "product", Your Frontend template and "Front-end"
- Then click to edit the "listing_div"
- See my screenshot to see details :
=> Around line 377, you will see the line :

<form action="<?php echo str_replace(array('&tmpl=raw', '&tmpl=component'), '', hikashop_currentURL().'#sp-component'); ?>" method="post"...">
=> Add after "hikashop_currentURL()", the code ".'#sp-component'"
Result :


Hope this will help you.
Regards

Last edit: 1 year 2 months ago by Philip.

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

  • Posts: 147
  • Thank you received: 12
  • Hikashop Business
1 year 2 months ago #349276

Hi Philip,

Thanks a lot for your answer.

I added it following your instructions, but apparently it doesn't work. When I navigate from a page to another (like from rolex.ahriise.com/collection to rolex.ahriise.com/collection?limitstart=18&limit=18 ), I don't end at the #sp-component anchor but still at the top of the page.

Any idea what I'm doing wrong?

Thanks a lot.

Sandra

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
1 year 2 months ago #349278

Hi,

Try also changing the line:

<?php echo str_replace(array('&tmpl=raw', '&tmpl=component'),'', $this->pagination->getListFooter($this->params->get('limit'))); ?>
to:
<?php echo str_replace(array('&tmpl=raw', '&tmpl=component', '" title="'),array('', '', '#sp-component" title="'), $this->pagination->getListFooter($this->params->get('limit'))); ?>
in the same area.
That should help for the links. The form action is more for the number of elements per page dropdown of the pagination.

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

  • Posts: 147
  • Thank you received: 12
  • Hikashop Business
1 year 2 months ago #349289

Hi Nicolas,

Thanks a lot. It works perfectly.

Thanks again for your precious help.

Sandra

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

Time to create page: 0.070 seconds
Powered by Kunena Forum