SwissUpLabs Logo

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 brings possibility to create new argento-custom.js file, that will be automatically included on all pages.

  1. Create new directory in yout custom Argento sub-theme:

    app/design/frontend/Local/argento-[essence|flat]-custom/web/js
    
  2. Create argento-custom.js inside js folder
  3. Add script skeleton:

    define([
        'jquery',
        'domReady!'
    ], function($) {
        alert("Hi, I'm custom js file");
    });
    
  4. Save the file and run following bash commands to deploy script

    cd magento/root/folder
    php bin/magento setup:static-content:deploy
    
Next up
Edit this Page