Javascript Error with basket-mini.js

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
robert63
Posts: 41
Joined: 03 Nov 2021, 13:38

Javascript Error with basket-mini.js

Post by robert63 » 09 Oct 2024, 11:01

Upgrading from Typo3 11.5.34 to 12.4.20.
Aimeos from 22.10.9 to 23.10.3
Aimeos_dist 22.10.1 to 23.7.1.
php is 8.3 on both
Linux is Ubuntu 20.04.6 LTS

Now I have a Javascript reference error in line 130 of basket-mini.js. Can't find variable: $
$(function() {
AimeosBasketMini.init();
});
The mini basket is not working due to this.

Best regards

Robert

robert63
Posts: 41
Joined: 03 Nov 2021, 13:38

Re: Javascript Error with basket-mini.js

Post by robert63 » 09 Oct 2024, 15:57

Adding
page {
includeJS {
cashDom = https://unpkg.com/cash-dom/dist/cash.min.js
cashDom.external = 1
}
}
into Setup solves the problem.

But why is this necessary?

User avatar
aimeos
Administrator
Posts: 8229
Joined: 01 Jan 1970, 00:00

Re: Javascript Error with basket-mini.js

Post by aimeos » 10 Oct 2024, 07:36

You should include the app.js of the theme which contains cash-dom and the Bootstrap JS:
https://github.com/aimeos/ai-client-htm ... ult/app.js
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

robert63
Posts: 41
Joined: 03 Nov 2021, 13:38

Re: Javascript Error with basket-mini.js

Post by robert63 » 11 Oct 2024, 15:56

I cannot find in the documentation and also have trouble to figure out how to include the app.js correctly. Maybe you can give a hint.

User avatar
aimeos
Administrator
Posts: 8229
Joined: 01 Jan 1970, 00:00

Re: Javascript Error with basket-mini.js

Post by aimeos » 11 Oct 2024, 17:10

Did you use the page tree to create the necessary pages?
https://github.com/aimeos/aimeos-typo3#page-setup
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

robert63
Posts: 41
Joined: 03 Nov 2021, 13:38

Re: Javascript Error with basket-mini.js

Post by robert63 » 11 Oct 2024, 17:17

Since I updated from an older version I didn't import a new web tree. I still have the one from 22.10.9.
What is the difference between these?

User avatar
aimeos
Administrator
Posts: 8229
Joined: 01 Jan 1970, 00:00

Re: Javascript Error with basket-mini.js

Post by aimeos » 14 Oct 2024, 14:55

The CSS/JS files have been spit into one file per plugin for best performance. You must remove and re-add the TypoScript from the Aimeos extension in the shop root page to update your TypoScript settings.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

robert63
Posts: 41
Joined: 03 Nov 2021, 13:38

Re: Javascript Error with basket-mini.js

Post by robert63 » 15 Oct 2024, 14:39

Thanks. Found everything and now it is working as expected.

Post Reply