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

#   Insert HikaShop Content Module in product/listing.php

##

- **[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")**
- [![neo191987's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35364.jpg)](/forum/user/35364-neo191987 "View neo191987's Profile") Topic Author
- [ Offline](/forum/user/35364-neo191987)

Less More

- Posts: 431
- Thank you received: 19
-
-

7 years 3 months ago [\#308733](#308733) by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")  *[Insert HikaShop Content Module in product/listing.php](/forum/2-general-talk-about-hikashop/897892-insert-hikashop-content-module-in-product-listing-php#308733 "-- HikaShop version -- : 4.2.0  Hi, I'm trying to insert HikaShop Content Module in product/listing.php through this code  I constantly get this error with different settings: HTTP ERROR 500 The categories work well but with the products not.These are the settings of Hikashop and the module:")* was created by *[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")*

-- HikaShop version -- : 4.2.0

Hi, I'm trying to insert HikaShop Content Module in product/listing.php through this code Code:

&lt;?php jimport('joomla.application.module.helper'); $game_best_sellers = JModuleHelper::getModules('game-best-sellers'); foreach ($game_best_sellers as $game_best_seller) { echo JModuleHelper::renderModule($game_best_seller); } ?&gt;

I constantly get this error with different settings: HTTP ERROR 500
The categories work well but with the products not.These are the settings of Hikashop and the module:
[ ![1&#95;2019-07-16.PNG](/forum/attachment/47267) ](/forum/attachment/47267 "1&#95;2019-07-16.PNG")

[ ![2&#95;2019-07-16.PNG](/forum/attachment/47266) ](/forum/attachment/47266 "2&#95;2019-07-16.PNG")

####  Attachment 3.PNG not found

####  Attachment 4.PNG not found

-
-
- [ ![2&#95;2019-07-16.PNG](/forum/attachment/47266) ](/forum/attachment/47266 "2&#95;2019-07-16.PNG") [ ](/forum/attachment/47266?download=1 "2&#95;2019-07-16.PNG")
- [ ![1&#95;2019-07-16.PNG](/forum/attachment/47267) ](/forum/attachment/47267 "1&#95;2019-07-16.PNG") [ ](/forum/attachment/47267?download=1 "1&#95;2019-07-16.PNG")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg5Nzg5Mi1pbnNlcnQtaGlrYXNob3AtY29udGVudC1tb2R1bGUtaW4tcHJvZHVjdC1saXN0aW5nLXBocD90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14281
-
-

7 years 3 months ago [\#308740](#308740) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Insert HikaShop Content Module in product/listing.php](/forum/2-general-talk-about-hikashop/897892-insert-hikashop-content-module-in-product-listing-php#308740 "-- HikaShop version -- : 4.2.0  Hi, I'm trying to insert HikaShop Content Module in product/listing.php through this code  I constantly get this error with different settings: HTTP ERROR 500 The categories work well but with the products not.These are the settings of Hikashop and the module:")*

Hi,

If you get a 500 HTTP error, it means that the code breaks in the middle of the processing. Normally a fatal error should be logged in the PHP error log of your website. So I would recommend to check that out. The error message will tell you where the problem is coming from.
I expect the issue is not in how you configured your module but what code you have added or where you added it. But without the fatal error message I can't say anything for sure.

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

- **[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")**
- [![neo191987's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35364.jpg)](/forum/user/35364-neo191987 "View neo191987's Profile") Topic Author
- [ Offline](/forum/user/35364-neo191987)

Less More

- Posts: 431
- Thank you received: 19
-
-

7 years 3 months ago -  7 years 3 months ago [\#308790](#308790) by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")  Replied by *[neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")* on topic *[Insert HikaShop Content Module in product/listing.php](/forum/2-general-talk-about-hikashop/897892-insert-hikashop-content-module-in-product-listing-php#308790 "-- HikaShop version -- : 4.2.0  Hi, I'm trying to insert HikaShop Content Module in product/listing.php through this code  I constantly get this error with different settings: HTTP ERROR 500 The categories work well but with the products not.These are the settings of Hikashop and the module:")*

Can I ask you to test with these settings because I can not currently provide a live site.

Gives error:

Allowed memory size of 1073741824 bytes exhausted (tried to allocate 266240 bytes) in C:\xampp\htdocs\new\libraries\src\MVC\Model\BaseDatabaseModel.php on line 115

Allowed memory size of 1073741824 bytes exhausted (tried to allocate 155648 bytes) in Unknown on line 0

Last edit: 7 years 3 months ago by [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg5Nzg5Mi1pbnNlcnQtaGlrYXNob3AtY29udGVudC1tb2R1bGUtaW4tcHJvZHVjdC1saXN0aW5nLXBocD90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14281
-
-

7 years 3 months ago [\#308816](#308816) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Insert HikaShop Content Module in product/listing.php](/forum/2-general-talk-about-hikashop/897892-insert-hikashop-content-module-in-product-listing-php#308816 "-- HikaShop version -- : 4.2.0  Hi, I'm trying to insert HikaShop Content Module in product/listing.php through this code  I constantly get this error with different settings: HTTP ERROR 500 The categories work well but with the products not.These are the settings of Hikashop and the module:")*

Hi,

This error indicates that there is an infinite loop. And because of that, the processing of the page keeps allocating more and more memory until it reaches the limit configured in your php.ini
So as I expected, the issue comes from the code you added.
Note that the HikaShop content module loads the listing.php view file in order to display itself. So if you load the module all the time in the listing.php view file, you're effectively creating an infinite loop.
This means that you need to add an extra check around your code to only load once.
For example: Code:

static $done = false; if(!$done) { $done = true; // your code }

The following user(s) said Thank You: [neo191987](/forum/user/35364-neo191987 "View neo191987's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg5Nzg5Mi1pbnNlcnQtaGlrYXNob3AtY29udGVudC1tb2R1bGUtaW4tcHJvZHVjdC1saXN0aW5nLXBocD90bXBsPW1hcmtkb3du) 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.056 seconds

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