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

#   Cannot read properties of undefined (reading 'registerAjax')

##

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

Less More

- Posts: 152
- Thank you received: 11
-
-

3 years 4 months ago [\#352296](#352296) by [gerryna09](/forum/user/52735-gerryna09 "View gerryna09's Profile")  *[Cannot read properties of undefined (reading 'registerAjax')](/forum/4-how-to/906515-cannot-read-properties-of-undefined-reading-registerajax#352296 "-- HikaShop version -- : 4.7.3 -- Joomla version -- : 4.3.1 -- PHP version -- : 8.0.28 -- Browser(s) name and version -- : Chrome  Reading on SEO forums i moved the scripts down      HikaShop Cart Module active.  is the error message i see in the browser console.  The message remains unchanged even if I add products to the cart  Is there a solution or do I put the scripts back in alto??      ")* was created by *[gerryna09](/forum/user/52735-gerryna09 "View gerryna09's Profile")*

-- HikaShop version -- : 4.7.3
-- Joomla version -- : 4.3.1
-- PHP version -- : 8.0.28
-- Browser(s) name and version -- : Chrome

Reading on SEO forums i moved the scripts down

**&lt;jdoc:include type="scripts" /&gt;**
&lt;jdoc:include type="modules" name="debug" style="none" /&gt;
&lt;/body&gt;

**HikaShop Cart Module active**.

Cannot read properties of undefined (reading 'registerAjax') is the error message i see in the browser console.

The message remains unchanged even if I add products to the cart

Is there a solution or do I put the scripts back in alto??

&lt;head&gt;
&lt;jdoc:include type="metas" /&gt;
&lt;jdoc:include type="styles" /&gt;
&lt;jdoc:include type="scripts" /&gt;
&lt;/head&gt;

[ ![xnicholas&#95;2023-06-11.jpg](/forum/attachment/57165) ](/forum/attachment/57165 "...2023-06-11.jpg")

- [ ![xnicholas&#95;2023-06-11.jpg](/forum/attachment/57165) ](/forum/attachment/57165 "...2023-06-11.jpg") [ ](/forum/attachment/57165?download=1 "...2023-06-11.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwNjUxNS1jYW5ub3QtcmVhZC1wcm9wZXJ0aWVzLW9mLXVuZGVmaW5lZC1yZWFkaW5nLXJlZ2lzdGVyYWpheD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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: 86358
- Thank you received: 14293
-
-

3 years 4 months ago [\#352299](#352299) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Cannot read properties of undefined (reading 'registerAjax')](/forum/4-how-to/906515-cannot-read-properties-of-undefined-reading-registerajax#352299 "-- HikaShop version -- : 4.7.3 -- Joomla version -- : 4.3.1 -- PHP version -- : 8.0.28 -- Browser(s) name and version -- : Chrome  Reading on SEO forums i moved the scripts down      HikaShop Cart Module active.  is the error message i see in the browser console.  The message remains unchanged even if I add products to the cart  Is there a solution or do I put the scripts back in alto??      ")*

Hi,

You can't do it like that. This will move all the scripts from the head at the end of the page, but this means that all the javascript which is inline on the page (and which expects the scripts from the head to be executed before) will be executed before the scripts from the head.
So if you want to do that, you need some code to automatically get the scripts inline on the page and move them to the end of the body, after the scripts from the head. It's possible but instead of just moving one line of code, you need to write a few dozen lines.

Rather than doing that, I would recommend using JCH Optimize:
[ extensions.joomla.org/extension/jch-optimize/](https://extensions.joomla.org/extension/jch-optimize/)
It can improve the JS loading in a much better way than this and optimize many other things too.

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzkwNjUxNS1jYW5ub3QtcmVhZC1wcm9wZXJ0aWVzLW9mLXVuZGVmaW5lZC1yZWFkaW5nLXJlZ2lzdGVyYWpheD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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.042 seconds

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