[Skip to main content](#vessel-content)

#   Can't override pagination.php

##

- **[kriptonus](/forum/user/59817-kriptonus "View kriptonus's Profile")**
- [![kriptonus's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59817-kriptonus "View kriptonus's Profile") Topic Author
- [ Offline](/forum/user/59817-kriptonus)

Less More

- Posts: 14
- Thank you received: 0
-
-

5 years 1 month ago [\#335840](#335840) by [kriptonus](/forum/user/59817-kriptonus "View kriptonus's Profile")  *[Can't override pagination.php](/forum/30-integrations/903218-cant-override-pagination-php#335840 "-- url of the page with the problem -- : vanillashop23.ru -- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.10.0 -- PHP version -- : 8.0.3 -- Error-message(debug-mod must be tuned on) -- : Fatal error: Cannot declare class hikashopPaginationHelper, because the name is already in use in /home/r/rmmoto/vanillashop23.ru/public&#95;html/templates/vanillashop/html/com&#95;hikashop/administrator/helpers/pagination.override.php on line 371  Hi! I've tried to override pagination.php file, but I couldn't do it.  For the first time, I had created pagination.override.php in my&#95;template/html/com&#95;hikashop/administrator/ , next, I added original code from pagination.php and some changes to override class hikashopBridgePaginationHelper:  I have an error message now:  What have I made wrong and how could I fix it?")* was created by *[kriptonus](/forum/user/59817-kriptonus "View kriptonus's Profile")*

-- url of the page with the problem -- : vanillashop23.ru
-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.10.0
-- PHP version -- : 8.0.3
-- Error-message(debug-mod must be tuned on) -- : Fatal error: Cannot declare class hikashopPaginationHelper, because the name is already in use in /home/r/rmmoto/vanillashop23.ru/public_html/templates/vanillashop/html/com_hikashop/administrator/helpers/pagination.override.php on line 371

Hi!
I've tried to override pagination.php file, but I couldn't do it.

For the first time, I had created pagination.override.php in my_template/html/com_hikashop/administrator/ , next, I added original code from pagination.php and some changes to override class hikashopBridgePaginationHelper:
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 4.4.3 * @author hikashop.com * @copyright (C) 2010-2021 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php //jimport('joomla.html.pagination'); //include_once $originalFile; include_once(JPATH_ADMINISTRATOR . '/components/com_hikashop/helpers/pagination.php'); class hikashopBridgePaginationHelperOverride extends hikashopBridgePaginationHelper { var $hikaSuffix = ''; var $form = ''; function getPagesLinks() { $app = JFactory::getApplication(); $lang = JFactory::getLanguage(); $lang-&gt;load('lib_joomla');

I have an error message now:

> Fatal error: Cannot declare class hikashopPaginationHelper, because the name is already in use in /home/r/rmmoto/vanillashop23.ru/public\_html/templates/vanillashop/html/com\_hikashop/administrator/helpers/pagination.override.php on line 371

What have I made wrong and how could I fix it?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy85MDMyMTgtY2FudC1vdmVycmlkZS1wYWdpbmF0aW9uLXBocD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86324
- Thank you received: 14286
-
-

5 years 1 month ago [\#335841](#335841) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Can't override pagination.php](/forum/30-integrations/903218-cant-override-pagination-php#335841 "-- url of the page with the problem -- : vanillashop23.ru -- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.10.0 -- PHP version -- : 8.0.3 -- Error-message(debug-mod must be tuned on) -- : Fatal error: Cannot declare class hikashopPaginationHelper, because the name is already in use in /home/r/rmmoto/vanillashop23.ru/public&#95;html/templates/vanillashop/html/com&#95;hikashop/administrator/helpers/pagination.override.php on line 371  Hi! I've tried to override pagination.php file, but I couldn't do it.  For the first time, I had created pagination.override.php in my&#95;template/html/com&#95;hikashop/administrator/ , next, I added original code from pagination.php and some changes to override class hikashopBridgePaginationHelper:  I have an error message now:  What have I made wrong and how could I fix it?")*

Hi,

Look at the bottom of your copy of pagination.php
You can see you have a second class hikashopPaginationHelper defined which extends from hikashopBridgePaginationHelper
So you need to change hikashopPaginationHelper to hikashopPaginationHelperOverride there.
Also, instead of extending from hikashopBridgePaginationHelper, you could either extend from hikashopBridgePaginationHelperOverride or from hikashopPaginationHelper (which will extend from hikashopBridgePaginationHelper)
It depends what you need to override in your pagination.php

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy85MDMyMTgtY2FudC1vdmVycmlkZS1wYWdpbmF0aW9uLXBocD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[kriptonus](/forum/user/59817-kriptonus "View kriptonus's Profile")**
- [![kriptonus's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59817-kriptonus "View kriptonus's Profile") Topic Author
- [ Offline](/forum/user/59817-kriptonus)

Less More

- Posts: 14
- Thank you received: 0
-
-

5 years 1 month ago [\#335846](#335846) by [kriptonus](/forum/user/59817-kriptonus "View kriptonus's Profile")  Replied by *[kriptonus](/forum/user/59817-kriptonus "View kriptonus's Profile")* on topic *[Can't override pagination.php](/forum/30-integrations/903218-cant-override-pagination-php#335846 "-- url of the page with the problem -- : vanillashop23.ru -- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.10.0 -- PHP version -- : 8.0.3 -- Error-message(debug-mod must be tuned on) -- : Fatal error: Cannot declare class hikashopPaginationHelper, because the name is already in use in /home/r/rmmoto/vanillashop23.ru/public&#95;html/templates/vanillashop/html/com&#95;hikashop/administrator/helpers/pagination.override.php on line 371  Hi! I've tried to override pagination.php file, but I couldn't do it.  For the first time, I had created pagination.override.php in my&#95;template/html/com&#95;hikashop/administrator/ , next, I added original code from pagination.php and some changes to override class hikashopBridgePaginationHelper:  I have an error message now:  What have I made wrong and how could I fix it?")*

I need to override pagination from native to bootstrap 4. So, I have to modify function _list_render as I see it.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy85MDMyMTgtY2FudC1vdmVycmlkZS1wYWdpbmF0aW9uLXBocD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86324
- Thank you received: 14286
-
-

5 years 1 month ago [\#335848](#335848) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Can't override pagination.php](/forum/30-integrations/903218-cant-override-pagination-php#335848 "-- url of the page with the problem -- : vanillashop23.ru -- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.10.0 -- PHP version -- : 8.0.3 -- Error-message(debug-mod must be tuned on) -- : Fatal error: Cannot declare class hikashopPaginationHelper, because the name is already in use in /home/r/rmmoto/vanillashop23.ru/public&#95;html/templates/vanillashop/html/com&#95;hikashop/administrator/helpers/pagination.override.php on line 371  Hi! I've tried to override pagination.php file, but I couldn't do it.  For the first time, I had created pagination.override.php in my&#95;template/html/com&#95;hikashop/administrator/ , next, I added original code from pagination.php and some changes to override class hikashopBridgePaginationHelper:  I have an error message now:  What have I made wrong and how could I fix it?")*

Hi,

Then, that's not how you want to do it.
You want to use the normal pagination override system of Joomla by creating a file templates/yourtemplate/html/pagination.php and then filling it with code like this:
[ www.web-eau.net/blog/pagination-bootstrap-4](https://www.web-eau.net/blog/pagination-bootstrap-4)
If you check the code of the pagination helper class of HikaShop, you can see it has such code: Code:

return ($listOverride) ? pagination_list_render($list) : $this-&gt;_list_render($list);

so that the pagination template override can be used instead of the default pagination.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy85MDMyMTgtY2FudC1vdmVycmlkZS1wYWdpbmF0aW9uLXBocD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.058 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
