Skip to content

Instantly share code, notes, and snippets.

View wpoortman's full-sized avatar

Willem Poortman wpoortman

View GitHub Profile
@wpoortman
wpoortman / route_controller_action.xml
Last active August 12, 2020 13:47
Magento 2 - Template
<?xml version="1.0"?>
<page
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<body>
<referenceBlock name="content">
<block
name="path.to.your.awesome.template-file"
template="Vendor_Namespace::path/to/your/awesome/template-file.phtml"
@wpoortman
wpoortman / OrderConverter.php
Created May 6, 2020 19:28
Magento 2 - Webhook
<?php
declare(strict_types=1);
namespace Vendor\Namespace\Model\Converter;
use MageHook\Hook\Model\ConverterInterface;
/**
* Class OrderConverter
@wpoortman
wpoortman / Product.php
Last active May 6, 2020 19:14
Magento 2 - Plugin
<?php
declare(strict_types=1);
namespace Vendor\Namespace\Plugin\Magento\Catalog\Model;
use Magento\Catalog\Model\Product as Subject;
/**
* Class Product