<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blog on DIAZWATSON</title><link>https://diazwatson.com/en/blog/</link><description>Recent content in Blog on DIAZWATSON</description><generator>Hugo</generator><language>en-GB</language><lastBuildDate>Wed, 15 Jul 2026 10:00:00 +0000</lastBuildDate><atom:link href="https://diazwatson.com/en/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>From Grav to Hugo</title><link>https://diazwatson.com/en/blog/grav-to-hugo/</link><pubDate>Wed, 15 Jul 2026 10:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/grav-to-hugo/</guid><description>&lt;p&gt;For years this blog ran on &lt;a href="https://getgrav.org/" target="_blank" rel="noopener noreferrer"&gt;Grav&lt;/a&gt;
, a lovely flat-file CMS. No database, just Markdown files, which
I always liked. But it still needs PHP hosting, updates, and the occasional plugin fix, and I found myself spending more
time maintaining the site than writing on it. So I rebuilt it as a static site with &lt;a href="https://gohugo.io/" target="_blank" rel="noopener noreferrer"&gt;Hugo&lt;/a&gt;
. Here is
the why and the how.&lt;/p&gt;</description></item><item><title>Warden</title><link>https://diazwatson.com/en/blog/warden/</link><pubDate>Sun, 01 Sep 2024 09:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/warden/</guid><description>&lt;p&gt;For years I ran everything natively on macOS and later moved to &lt;a href="../valet-plus"&gt;Valet Plus&lt;/a&gt;
. It was fast, but it also
tied my machine to specific PHP, MySQL and search versions, and every project that needed a slightly different stack
meant fighting the host. These days I use &lt;a href="https://warden.dev/" target="_blank" rel="noopener noreferrer"&gt;Warden&lt;/a&gt;
 and I am not looking back.&lt;/p&gt;</description></item><item><title>HowTo: Migrate data from Magento2 Commerce to Magento2 CE</title><link>https://diazwatson.com/en/blog/m2-data-migration/</link><pubDate>Thu, 24 Aug 2023 22:52:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-data-migration/</guid><description>&lt;p&gt;I recently was asked to work on a data migration from &lt;strong&gt;Adobe Commerce 2.3.7-p3&lt;/strong&gt; to a &lt;strong&gt;Magento Community 2.4.3-p2&lt;/strong&gt; instance.
I have done similar tasks in the past using the official &lt;a href="https://github.com/magento/data-migration-tool" target="_blank" rel="noopener noreferrer"&gt;Magento Data Migration Tool&lt;/a&gt;
 so that was my weapon of choice.
In the following lines I will try to describe the process.&lt;/p&gt;</description></item><item><title>HowTo: Create a custom bundle product type in Magento 2</title><link>https://diazwatson.com/en/blog/custom-bundle-product/</link><pubDate>Mon, 29 Nov 2021 22:52:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/custom-bundle-product/</guid><description>&lt;p&gt;On a recent project the native bundle product was &lt;em&gt;almost&lt;/em&gt; what we needed, but not quite. Instead of fighting the
bundle model with plugins everywhere, I decided to create a custom product type that inherits from it and only
changes the bits I cared about.&lt;/p&gt;</description></item><item><title>Magento 2 Core Contributions</title><link>https://diazwatson.com/en/blog/m2-core-contributions/</link><pubDate>Fri, 15 Nov 2019 10:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-core-contributions/</guid><description>&lt;p&gt;I have always believed the best way to really learn a framework is to work on the framework itself. So shortly after I
joined &lt;a href="https://www.space48.com/" target="_blank" rel="noopener noreferrer"&gt;Space48&lt;/a&gt;
 in Manchester, I started contributing to the Magento 2 repository — small
pull requests here and there.&lt;/p&gt;</description></item><item><title>The ColorPicker Ui Component</title><link>https://diazwatson.com/en/blog/colorpicker-ui-component/</link><pubDate>Mon, 08 Jul 2019 22:52:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/colorpicker-ui-component/</guid><description>&lt;p&gt;As part of the contributions I&amp;rsquo;m currently doing to the &lt;a href="https://github.com/magento/adobe-stock-integration" target="_blank" rel="noopener noreferrer"&gt;Adobe Stock Integration&lt;/a&gt;
 Project
I recently had to implement a search filter for the color attribute.&lt;/p&gt;</description></item><item><title>HowTo: Update Product Attributes in Magento 2</title><link>https://diazwatson.com/en/blog/m2-update-product-attributes/</link><pubDate>Mon, 15 Apr 2019 07:44:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-update-product-attributes/</guid><description>&lt;p&gt;I once had to update a single attribute on thousands of products from a data import. My first instinct was to load
each product with the repository, set the value and save it, and it worked&amp;hellip; but it was painfully slow. Loading and
saving a full product just to change one attribute is a lot of wasted work. There is a much better tool for this.&lt;/p&gt;</description></item><item><title>HowTo: Create Custom Email Templates in Magento 2</title><link>https://diazwatson.com/en/blog/m2-custom-email-templates/</link><pubDate>Fri, 15 Mar 2019 13:28:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-custom-email-templates/</guid><description>&lt;p&gt;In the &lt;a href="../m2-send-emails-programmatically"&gt;previous post&lt;/a&gt;
 I showed how to send an email programmatically, but I left
one piece out on purpose, the template. Here is how I register a custom email template that ships with the module and
can still be overridden by the merchant from the admin.&lt;/p&gt;</description></item><item><title>HowTo: Send Emails Programmatically in Magento 2</title><link>https://diazwatson.com/en/blog/m2-send-emails-programmatically/</link><pubDate>Fri, 15 Feb 2019 10:12:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-send-emails-programmatically/</guid><description>&lt;p&gt;Sooner or later every project needs to send an email that Magento does not send out of the box, a notification to an
admin, a reminder to a customer, a report to the warehouse. The good news is that Magento gives us a clean service to
do it, the &lt;code&gt;TransportBuilder&lt;/code&gt;. Let me show you the setup I use.&lt;/p&gt;</description></item><item><title>Valet Plus</title><link>https://diazwatson.com/en/blog/valet-plus/</link><pubDate>Tue, 22 Jan 2019 20:02:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/valet-plus/</guid><description>&lt;p&gt;I first heard about &lt;a href="https://github.com/weprovide/valet-plus" target="_blank" rel="noopener noreferrer"&gt;Valet Plus&lt;/a&gt;
 a while ago and have to admit I did not pay
much attention.&lt;/p&gt;
&lt;p&gt;When you work in an agency every minute counts, and if your local environment does not work and you have to spend time fixing it,
you are dead.&lt;/p&gt;</description></item><item><title>HowTo: Create an Alternative Success Page for a Payment Method in Magento2</title><link>https://diazwatson.com/en/blog/m2-how-to-creat-an-alternative-success-for-a-payment-method/</link><pubDate>Sat, 19 Jan 2019 01:26:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-how-to-creat-an-alternative-success-for-a-payment-method/</guid><description>&lt;p&gt;This week I had the task to build an alternative success page for customers who pay with a specific payment method.
If the customers select Bank Transfer method they should be redirected to &lt;code&gt;https://magento2.test/checkout/banktransfer/success&lt;/code&gt;.
If any other payment method is selected the customer should be redirected to the default success page &lt;code&gt;https://magento2.test/checkout/onepage/success/&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>HowTo: Create a Cron Job in Magento 2</title><link>https://diazwatson.com/en/blog/m2-create-a-cron-job/</link><pubDate>Sat, 15 Dec 2018 10:46:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-create-a-cron-job/</guid><description>&lt;p&gt;A while ago I needed to run a task automatically every night to clean up some old rows from a custom table.
The obvious tool for the job is a cron job, but if you come from Magento 1 the syntax changed a bit, so let me
show you how I set it up.&lt;/p&gt;</description></item><item><title>HowTo: Create a custom Payment Method in Magento 2</title><link>https://diazwatson.com/en/blog/m2-payment-method/</link><pubDate>Thu, 15 Nov 2018 00:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-payment-method/</guid><description>&lt;p&gt;Recently I was tasked with creating a custom payment method for a project. While doing some research I discovered
that there are two ways to create a payment method in Magento 2.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The legacy way, similar to how it used to be in M1, extending &lt;code&gt;AbstractMethod&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The new way, using the &lt;a href="https://developer.adobe.com/commerce/php/development/payments-integrations/payment-gateway/" target="_blank" rel="noopener noreferrer"&gt;Payment Provider Gateway&lt;/a&gt;
.&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>The Magento Hater</title><link>https://diazwatson.com/en/blog/the-magento-hater/</link><pubDate>Thu, 11 Oct 2018 19:43:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/the-magento-hater/</guid><description/></item><item><title>HowTo: Create a REST API Call in Magento 2</title><link>https://diazwatson.com/en/blog/m2-create-a-rest-api-call/</link><pubDate>Thu, 11 Oct 2018 14:30:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-create-a-rest-api-call/</guid><description>&lt;p&gt;These code snippets will show you how to ask the Magento REST API and retrieve some data.&lt;br&gt;
In this example I will query the Magento REST API to retrieve all products updated since &lt;code&gt;2018-10-09 00:00:00&lt;/code&gt;.&lt;/p&gt;
&lt;div class="callout callout--note"&gt;
&lt;p&gt;This method assumes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You are using an admin user to generate the token.&lt;/li&gt;
&lt;li&gt;You have a Magento2 instance running in your local environment.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description></item><item><title>HowTo: Create a Shipping Method in Magento 2</title><link>https://diazwatson.com/en/blog/m2-shipping-method/</link><pubDate>Sat, 15 Sep 2018 07:37:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-shipping-method/</guid><description>&lt;p&gt;A while ago I needed a flat, custom shipping method with a rate that depended on some of our own business rules.
The native flat rate was not flexible enough, so I built a small custom carrier. It is one of those tasks that looks
scary the first time but is actually very tidy once you know the three pieces involved.&lt;/p&gt;</description></item><item><title>HowTo: Create Extension Attributes in Magento 2</title><link>https://diazwatson.com/en/blog/m2-extension-attributes/</link><pubDate>Wed, 15 Aug 2018 00:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-extension-attributes/</guid><description>&lt;p&gt;Extension attributes are one of those Magento 2 concepts that sound complicated but click the moment you use them once.
They let you add data to an existing entity (an order, a customer, a product) &lt;strong&gt;without&lt;/strong&gt; rewriting its model, and
they travel nicely through the API, which is where they really shine.&lt;/p&gt;</description></item><item><title>HowTo: Join 2 tables in Magento 2</title><link>https://diazwatson.com/en/blog/m2-join-tables/</link><pubDate>Mon, 02 Jul 2018 00:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-join-tables/</guid><description>&lt;p&gt;Recently I faced the situation where I needed the information of a second table in my collection
and the first thought that crossed my mind was &lt;em&gt;let&amp;rsquo;s rewrite the collection to add my own stuff&lt;/em&gt; but&amp;hellip; is that really
the right approach?&lt;/p&gt;
&lt;p&gt;First, by rewriting the core collection class I am going to affect all the places that collection is used, and I do not
need that; second, the whole idea of rewriting things feels wrong to me, especially having mechanisms like observers
and plugins available to inject custom logic in a non-intrusive way, so that is probably NOT the best thing to do.&lt;/p&gt;</description></item><item><title>HowTo: Magento 2 Admin Grid using Ui Components</title><link>https://diazwatson.com/en/blog/m2-admin-grid-ui-component/</link><pubDate>Tue, 12 Jun 2018 00:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-admin-grid-ui-component/</guid><description>&lt;p&gt;Recently I was tasked to create an admin grid to let users manage the records of a custom entity from the backoffice.&lt;/p&gt;
&lt;p&gt;Although I had read and heard plenty about it, I had never had the chance to build one myself, because none of the tasks I had been assigned to before required it.&lt;/p&gt;</description></item><item><title>Show Success, Error, Warning messages in Magento 2</title><link>https://diazwatson.com/en/blog/m2-addsuccess-adderror-addnotice/</link><pubDate>Tue, 12 Jun 2018 00:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-addsuccess-adderror-addnotice/</guid><description>&lt;p&gt;To be able to output warnings, error and notice messages in our modules we have to use the following interface &lt;code&gt;\Magento\Framework\Message\ManagerInterface&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The best way to use it is through Dependency Injection in the constructor as follows:&lt;/p&gt;</description></item><item><title>HowTo: Use the InsertListing Ui Component in Magento 2</title><link>https://diazwatson.com/en/blog/m2-insertlisting-component/</link><pubDate>Tue, 15 May 2018 00:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-insertlisting-component/</guid><description>&lt;p&gt;Every now and then you need to embed a grid &lt;em&gt;inside&lt;/em&gt; a form, think of the &amp;ldquo;add products to a category&amp;rdquo; screen, where a
listing lets you tick the records you want and the selection is stored with the parent entity. The component that makes
this possible is &lt;code&gt;insertListing&lt;/code&gt;, and it is one of the most useful, and most confusing, Ui Components in Magento.&lt;/p&gt;</description></item><item><title>HowTo: Render a Grid on the Frontend using a Ui Component in Magento 2</title><link>https://diazwatson.com/en/blog/m2-frontend-grid-ui-component/</link><pubDate>Sun, 15 Apr 2018 00:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-frontend-grid-ui-component/</guid><description>&lt;p&gt;Listing Ui Components are everywhere in the admin, but there is nothing stopping you from rendering one on the
storefront, a &amp;ldquo;my downloads&amp;rdquo; page, a list of records tied to the customer, that sort of thing. It is not something you
see every day, so let me show you the little trick that makes it work.&lt;/p&gt;</description></item><item><title>HowTo: Use the Form Ui Component in Magento 2</title><link>https://diazwatson.com/en/blog/m2-form-component/</link><pubDate>Thu, 15 Mar 2018 00:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-form-component/</guid><description>&lt;p&gt;The Form Ui Component is what Magento uses everywhere in the admin to render edit screens. The first time you build one
it feels like a lot of XML for a simple form, but the pattern is always the same, so once you have done it once you can
do it in your sleep.&lt;/p&gt;</description></item><item><title>HowTo: Add a Button using a Ui Component in Magento 2</title><link>https://diazwatson.com/en/blog/m2-button-ui-component/</link><pubDate>Thu, 15 Feb 2018 00:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-button-ui-component/</guid><description>&lt;p&gt;Buttons in the admin used to be a one liner in Magento 1. In Magento 2, when your page is a Ui Component, you add a
button through the component: you declare it in the XML and back it with a small PHP class that provides its
configuration. It feels like more work at first, but it is actually cleaner because every button becomes testable and
reusable.&lt;/p&gt;</description></item><item><title>HowTo: Magento 2 Add a field to the product edit form</title><link>https://diazwatson.com/en/blog/m2-add-field-to-product-edit-form/</link><pubDate>Mon, 15 Jan 2018 00:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m2-add-field-to-product-edit-form/</guid><description>&lt;p&gt;Adding a field to the product edit form in the admin is one of those things that feels harder than it should the first
time, because the form is a Ui Component and not a plain layout. Once you know where to hook in, it is just a bit of XML.&lt;/p&gt;</description></item><item><title>HowTo: My Dev Environment</title><link>https://diazwatson.com/en/blog/my-dev-environment/</link><pubDate>Sat, 01 Jul 2017 07:37:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/my-dev-environment/</guid><description>&lt;p&gt;People often ask me what I use to develop locally. I have gone through Vagrant and Docker over the years, but for the
projects I work on day to day I keep everything installed natively on macOS. It is fast, and when something breaks I
know exactly where to look. This is the stack I run.&lt;/p&gt;</description></item><item><title>Fixing extensions after SUPEE-6788</title><link>https://diazwatson.com/en/blog/m1-fixing-extensions-after-supee-6788/</link><pubDate>Thu, 05 Nov 2015 00:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/m1-fixing-extensions-after-supee-6788/</guid><description>&lt;p&gt;If you applied the SUPEE-6788 security patch to a Magento 1 store and half of your extensions suddenly stopped working,
you are not alone. The patch closes some real security holes, but in doing so it changes a few behaviours that a lot of
third party modules were relying on. These are the issues I ran into and how I fixed them.&lt;/p&gt;</description></item><item><title>N98-Magerun</title><link>https://diazwatson.com/en/blog/n98-magerun/</link><pubDate>Mon, 21 Apr 2014 00:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/n98-magerun/</guid><description>&lt;p&gt;&lt;strong&gt;N98-Magerun&lt;/strong&gt; is a command line utility for environments (Mac OS / Linux) that streamlines many common tasks in Magento development.&lt;/p&gt;</description></item><item><title>Why this Blog?</title><link>https://diazwatson.com/en/blog/about-this-blog/</link><pubDate>Tue, 01 Apr 2014 00:00:00 +0000</pubDate><guid>https://diazwatson.com/en/blog/about-this-blog/</guid><description>&lt;p&gt;Have you ever solved a tricky problem, only to hit the exact same problem a couple of months later on a different
project and have no memory of how you fixed it the first time? That happens to me all the time, and it is the main
reason I am starting this blog.&lt;/p&gt;</description></item></channel></rss>