Breaking: #135 - Add JS files with AssetViewHelper
See Issue 135
Description
EXT:cart v9 uses modularized JavaScript without jQuery (see
[TASK] Switch from j
).
This allows to add the JavaScript only on pages where it's really needed which
is good for performance. The JavaScript is for detail pages is now loaded with
the TYPO3 Asset.
.
Affected Installations
All installations which overwrite
Resources/
are affected.
When using the Cart
which comes with this extension it will work
without any changes.
Migration
The JavaScript in EXT:cart is no longer added via TypoScript. All JavaScript files are now added via ViewHelper.
- Two ViewHelpers needs to be added in
Resources/
:Private/ Partials/ Product/ Cart Form. html -
<f:
asset. script identifier="add- to- cart" src="EXT: cart/ Resources/ Public/ Java Script/ add_ to_ cart. js" /> <f:
(only when working with BE Variants).asset. script identifier="change- be- variant" src="EXT: cart/ Resources/ Public/ Java Script/ change_ be_ variant. js" />