How to add JS to M2

Published on 21 May 2019

Source To load a custom main.js file on all pages (in the RequireJS-way) this is a good way: 1) Create main.js Create main.js within the theme folder <theme_dir>/web/js/main.js with this content: In short: we declare dependencies at the start, e.g. “jquery”. We define as function’s parameter the variable name for using the dependency within the […]

Read more ...

M2M2: Migration

Published on 19 Mar 2019 , edited on 04 Apr 2019

Ah the migration. Oh the imports and exports. Woe is me. Countless hours spending crafting the biggest spreadsheets and CSV files. Error after error, so much frustration you eventually go beyond rock-bottom and reach a state of true nirvana. Let’s hope Magento’s Migration tool handles this for me this time around. What this tool does […]

Read more ...

M2M2: Installing certbot

Published on 15 Mar 2019 , edited on 22 Mar 2019

During setup and installation of the server for M2 I found that it wouldn’t run on an insecure IP address but it requires a FQDN with valid SSL certification. So I registered a .dev domain, because, well, why not. Just for full-disclosures sake, here’s the path for this; Registered domain Updated DNS to point to […]

Read more ...

M2M2: The server

Published on 15 Mar 2019 , edited on 22 Mar 2019

I was going to get my existing clean LEMP server install based on Ubuntu 14.04 LTS and update it. But I decided to get a clean slate and create a new image based on a clean Ubuntu 18.04 LTS version and start from scratch. What follows is more or less a direct copy of this […]

Read more ...

M2M2: The how-to

Published on 15 Mar 2019 , edited on 03 Apr 2019

We’re “Moving to Magento 2”. The “we” in this case is the company I work for and where I’m responsible for all things tech-related. Which, seeing as this business is an e-commerce business, is a big thing. We have been running about 20 Magento 1.9.x shops for a better part of two years now, but […]

Read more ...

Magento 2: Product types and layout handles

Published on 10 Nov 2016 , edited on 22 Mar 2019

I find this something worth documenting, for the sheer scope of sources, obsolete code and articles and different semi-functional workarounds I’ve found about it. The issue? loading separate XML layout files for products in Magento 2. In my particular case all the products are Simple Products and yet I need to have different XML layouts […]

Read more ...

Magento2 – Edit mailforms & templates

Published on 11 Oct 2016 , edited on 22 Mar 2019

http://stackoverflow.com/questions/35123779/how-to-add-subject-in-tranctional-email-template-for-magento-2-version http://magento.stackexchange.com/questions/114214/magento-2-how-to-declare-a-custom-email-template-for-your-module

Read more ...

Magento 2.1 – Adding custom attribute to category

Published on 15 Aug 2016

In Magento it’s pretty easy to create custom attributes for products, but it’s less so for categories. As with many things in Magento2, the general best practice is to create a custom module for it. Note: This guide is for version 2.1 and up, because since 2.1 a lot of the infrastructure regarding this functionality […]

Read more ...

Magento 2 Grunt not watching?

Published on 20 Jul 2016

The best way to make your Magento 2 frontend-development workflow wórk as a flow, is to use the included Grunt config. Now that’s quite a pain to set up but I found this article made it possible. But what if you’ve set this all up, and for some reason Grunt stops watching your files? Here’s […]

Read more ...

Install Magento 2 via Composer on Apache server

Published on 23 Jun 2016 , edited on 22 Mar 2019

– Install SSH, GIT, NodeJS, Composer and Grunt on server – SSH to directory – composer create-project –repository-url=https://repo.magento.com/ magento/project-community-edition – Set rights – Run install command That’s about it. Now we have Magento 2.0.7 installed via Composer But I wanted to go up to 2.1rc3 for various reasons. To do this edit composer.json and find […]

Read more ...

Get Magento 2.1 running – the definitive guide

Published on 22 Jun 2016 , edited on 22 Mar 2019

The dust is starting to settle around the release of Magento 2 – the biggest open-source e-commerce packet available. Fate would have it that I’m getting more and more enrolled in the development of, with and applying this system for clients. So mainly for my own learnings this is a work-in-progress guide on all the […]

Read more ...

Note: Optimize Magento 2 for speed

Published on 14 Jun 2016 , edited on 22 Mar 2019

The main thing when ‘they’ developed Magento 2 was to improve on resource management and overall speed. Most people working with it, would scratch their heads in disbelief about it. Magento 2 can be painstakingly slow, but also rapid fast with the right configuration. It’s a known fact a Magento 2 developer needs to be […]

Read more ...

Install Magento 2 via Composer on MAMP

Published on 09 Jun 2016

To install Magento 2 on MAMP takes a bit more effort than you’re regular WordPress installation. This is mostly because Magento 2 needs a newer MySQL and PHP version, and you’ll need your Terminal! 1. Install MAMP Download MAMP and install it. 2. Set correct PHP version Magento 2 will run on 5.6 and newer. […]

Read more ...

Magento 2 Snippets

Published on 02 Jun 2016 , edited on 18 Jun 2019

In it’s complexity I find one can lose a lot of time in just looking for the right mark-up for the right situation. That’s why I decided to make this little ‘scrap-book’ of snippets. Overwriting files Overwriting files in Magento 2 isn’t as straightforward as was with Magento 1. There you just had to have […]

Read more ...

Add non-category menu items to a Magento 2 shop

Published on 31 May 2016

In Magento 2 it seems to be difficult to add something to the menubar that isn’t a category, like a static page such as “About Us”. Well, I can tell you how to do it! There’s a quick and easy fix, and there’s a ‘good’ fix. Quick and dirty The quick and dirty fix would […]

Read more ...

Magento 2.x

All categories

All tags

All posts