crear un modulo javascript para ejecutar funcionalidades especificas
javascrpt content
/var/www/woow/app/design/frontend/Pearl/volar/web/js/same-height-list-products-volar.js
define(
[
'jquery'
],
function ($) {
'use strict';
return function (config) {
//code here
}
}
);
PHTML
<script type="text/x-magento-init">
{
"*": {
"sameHeightListProductsVolar":{
"config":{
"var" : "value",
"var2": "value2"
}
}
}
}
</script>
*******************************
require config
/var/www/woow/app/design/frontend/Pearl/volar/requirejs-config.js
var config = {
map : {
'*' : {
javascriptToLoad : 'js/javascript-to-load'
}
}
};