Override classes and constructor arguments

As for Magento 1 it is possible to override classes in Magento 2 as well. Don’t get me wrong. It is not recommended to override classes or methods. It should be the really last resort. Use a plugin or an observer whenever possible. But sometimes the code you’re working against isn’t suitable for one of […]

Find and reference standard attribute types in Akeneo code

All standard attribute types available in Akeneo are listed in “\Akeneo\Pim\Structure\Component\AttributeTypes” (File: src/Akeneo/Pim/Structure/Component/AttributeTypes.php). <?php namespace Akeneo\Pim\Structure\Component; /** * Attribute types dictionary * * @author Willy Mesnage <willy.mesnage@akeneo.com> * @copyright 2015 Akeneo SAS (http://www.akeneo.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ final class AttributeTypes { const BOOLEAN = ‘pim_catalog_boolean’; const DATE = ‘pim_catalog_date’; const […]

Desktop FloppyDisk Pen Holder

New Thing on Thingiverse Recently I realised, that my girlfriend had some FloppyDisk left and wanted to throw them into trash! :-O Hence these awesome relics of computer history reminded me of my childhood and youth, I decided to build something new out of them. To be creative so to say! 😀 As a result […]

Create a bcrypt hash on commandline

Its easy to create a bcrypt hash  on commandline with this command: $> htpasswd -nbBC 10 USER PASSWORD Just replace the Placeholder USER and PASSWORD with the corresponding values. The Result should be something like that: USER:$2y$10$gfPbhclOrdjmMLEXSc5CTOWP5aBfjl59hhGvjp/qWXf1FfbQKb5ca The part before “:” is the username. The rest is the bcrypt password hash. The -C parameter specifies […]

Resize product images in Magento2

To resize product images in Magento2,  you just have to add a etc/view.xml into your own theme (f.e. app/design/frontend/Sheldon/Happytheme/etc/view.xml) ans add something like that: <?xml version=”1.0″?> <!– /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ –> <view xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:Config/etc/view.xsd”> <media> <images module=”Magento_Catalog”> <image id=”product_image” type=”image”> <width>800</width> <height>800</height> […]