Argento custom js
Notice
This tutorial assumes that you already created custom theme based on one of Argento themes.
If you did not — go ahead, it will take 15 minutes.
Argento allows one to create a new argento-custom.js file that will be
automatically included on all pages.
-
Create a new directory in your custom Argento sub-theme:
app/design/frontend/Local/argento-[essence|flat]-custom/web/js - Create
argento-custom.jsinside thejsfolder -
Add script skeleton:
define([ 'jquery', 'domReady!' ], function($) { alert("Hi, I'm custom js file"); }); -
Save the file and run the following bash commands to deploy the script
cd magento/root/folder php bin/magento setup:static-content:deploy