Search Results event

Create a list of dispatched events in Magento2

Magento2 has reduced the use of events. I guess the Magento plug-ins are more powerful. Today I would like to show, how to create a list of all dispatched events after visiting the product page for example. I have written a similar post a few years ago for older Magento versions.

Continue reading ...

Create a list of notified events in Shopware 5

Shopware best practice while developing is to use events if you want to change or add the behavior of the shop. Some developers are often searching for full event lists of a system. But in the most cases are those lists incomplete. The main reason are dynamic events. It is always a good idea to create a fresh event list for every development task that desires events.

Continue reading ...

Create Eventlist in Magento

Events in magento are very cool. Mostly events make it possible to build very modular extensions for magento. In my first steps, I always searched for a full list of magento events. The problem with these lists were, they aren't complete and outdated. And you will never find dynamic events like this.

Mage::dispatchEvent($this->_eventPrefix.'_load_after', $this->_getEventData());

Continue reading ...

Building xmpp (jabber) app for Firefox OS - Part1

In the last month everybody is talking about instant messenger. There are some for Firefox OS, but not really good ones. Often you are bound to one service. But with xmpp you can create your account at one of hundreds of servers all over the world. It's just a protocol. A little bit like email. My client talks to my server, my server to the server of my contact and the server of my contact with the client of my contact. You can inform your self about jabber at jabber.org. I would like to build a xmpp (jabber) app for Firefox OS. The problem: I didn't know much about xmpp and I'm not the best javascript developer. The first problem will be solved in the second part of this post, but I want to build the basic structure of the app in the first part. I did read Quick Guide For Firefox OS App Development from Andre Garzia. The book is pretty good, but like explained in the book it isn't always best practice. But it works. So I have build my app a little bit like explained in this book. At the moment I have a Alcatel One Touch Fire with Firefox OS 1.1.0.0-prerelease. The ugliest phone you can imagine, please never buy such a shit. I just use it, cause I guess Firefox OS can maybe the next revolution for mobile OS. It's pretty hard to work with such a phone if you have used a iphone since 4 years.

Continue reading ...

Edit cacheTags and Parameters via events in Lesti_Fpc 1.3.2

In Lesti_Fpc 1.3.2 I have added the possibility to edit the cacheTags and Parameters via an event. The idea of the Fpc was very clear and simple, but every day I get requests from developers with problems, that aren't that simple. For example oblomovx wanted to Disable Cleaning of Categories after product save. Maybe 98% of all Fpc users didn't need the possibilty to disable this functionality. Or riznmage wanted to Add AJAX parameter to make a differnce between requests that are made by ajax and normal requests. I can understand the need of such a thing, but on the other site I can't implement every crazy idea or I just think that it is wrong to make a ajax request on a action that isn't normally made for it. To let the Fpc simple, but also give those people the possiblity for there workflow I have made it like Magento. I have dispatched some events to work a little bit more advanced with the behavior of the Fpc.

Continue reading ...

Simulate Mouse Clicks in QUnit on Coordinates

I made a small plugin for jQuery to get the color of an image pixel. It's called broilerjs. I wanted to test the plugin via QUnit, a JavaScript Unit Testing framework. But I could not find a possibility to simulate a mouse click on special x and y coordinates. But in the end it was very easy.

Continue reading ...

Magento2 ObjectManager preferences

When developing with Magento2 you have maybe come to the question were is my logger for example. This was the way in Magento before.

Mage::log('Some log message', null, 'file.log');

Maybe you have already found the logger here for example in the class Magento\Backup\Controller\Adminhtml\Index\Rollback.

$this->_objectManager->get('Psr\Log\LoggerInterface')->info($e->getMessage());

Today I don't want to show you the logger. More interesting for me are the shared instances inside of the Objectmanager that you can use with the fucntion get.

Continue reading ...

JavaScript device orientation tool

Just a small tool to show the device orientation data from JavaScript.

Continue reading ...

Creating a Search in Slim Framework with hooks

My project website numphp.org is based on the PHP micro framework Slim. There is no nead for a cms or blog system. I just need some static pages and a little bit of logic. My posts on numphp.org are just static html files that will be served with the php function file_get_contents. But I would like to make the posts searchable. The easy way would be a slim route for search that is just checking if the searched query is contained in every post of my blog. But in near future I would like to make also the documentation searchable. So I will use the hooks of the Slim Framework. Hooks are the same as events in other frameworks. You can throw them and listen or observe them.

Two weeks ago I could not find events in the Slim Framework so I made a Pull Requests to add a EventManager to the Framework. But before sending the Pull Request I have figured out, events are just called hooks:)

Continue reading ...

C language - trigger key events in Linux with xdo

I needed a C library to build a small app that triggers keyboard events in Linux. Luckily I have found xdotool by Jordan Sissel that also contains the library libxdo.

Continue reading ...

Use TkInter without mainloop

I am building a small python program that is waiting for input from a bluetooth device. Depending on the input of the device I want to update my GUI. My decision was TkInter, the de-facto standard GUI for Python. But my main problem was the blocking method mainloop.

Continue reading ...

Book recommendation - Backbone.js Application Development

A few days ago, I bought me an ebook reader. I need a smart solution for the 2 hours in the subway each day. I just want to learn new frameworks or any other computer things. It was clear, the reader should at first support epub format. My choice was the kobo and I'm happy with that. But were did I get my ebooks from. Sure there are a lot of (free) ebooks in the web. But I want to support the authors and I can't write a critic review of a book I never paid for. Yes, I want to pay for my books, but I will never download books with DRM and install me any Adobe shit. It's very funny, many publisher have there own books without DRM and the reseller with DRM. But there are two publisher I did like very much in the last days. The first one is leanpub.com. You get good and also very bad books for mostly 10 to 20$ in all formats without DRM. A big disadvantage and also a advantage, the author can publish the book in a nonfinished status and you never know if it will be finished. The second Publisher is packtpub.com, a good known publisher from the old paper times. I like there instant books. Just 10$ and you get a more detailed tutorial I would say. And today I would like to say a little bit about Backbone.js Application Development from Thomas Hunter II.

Continue reading ...

Magento Stammtisch Meetup Berlin November 2017

The 45th version of the Berlin Magento Stammtisch or Meetup was on the 28th November 2017. Here a small summary of the event.

Continue reading ...

A Prism based web text editor with syntax highlighting

I like to use Prism on my blog for syntax highlighting. Today I just want to test something like prototype for web text editor with Prism syntax highlighting. I know there are also working web text editors like CodeMirror for example, but as mentioned this post more a feasibility study.

Continue reading ...

Prism - Code Folding plugin prototype

I am using Prism on my blog for my syntax highlighting and I am very happy and thankful about it. Sometimes I wanted to show the users of my blog a specific function of a class, but without decoupling the function from the class. So I needed something like a Prism plugin that can hide specific lines of the code in a foldable area.

Continue reading ...

Prism - Hooks list

I started my first Prism plugin. Prism uses hooks or in other software often called events to get simple plugin architecture. It is often a good idea to get an overview about all available hooks that Prism runs without any plugins. I will show in this post a small list with some explainations.

Continue reading ...

Touch signature identification with JavaScript

The uWave: Accelerometer-based Gesture Recognition project from the Rice Efficient Computing Group inspired me to build a small real time HTML based signature identification with JavaScript. Actually gestures have not that much incommon with drawn handwriting, but I wanted to test dynamic-time-warping on signatures. I am not sure if there is a real usecase for a signature identification in web applications, but it was fun to build this kind of prototyp. Feedback is welcome.

Continue reading ...

Building Lesti_Fpc2

I did start building Lesti_Fpc2. I always wanted a flexible and most compatible solution for Magento. That was never easy. So in Lesti_Fpc I did use the event controller_action_layout_generate_blocks_before as anchor. Just to explain, as anchor I mean the point were the Full Page Cache stops normal behavior of Magento and sends cached response. Normally you want to have this anchor as early as possible. My anchor was very flexible, but also not that fast as I expected.

Continue reading ...

How does Lesti_Fpc work?

Many full page caches are in front of Magento. Often Magento doesn't see the request. That makes external caches very fast. You only have to define a process in front of magento and send your own request. But external caches have to reload dynamic content with ajax and aren't that flexible. Lesti_Fpc has an other workflow.

Continue reading ...

Magento Stammtisch Meetup Berlin September 2017

Last thursday, the 28th of September 2017 has taken place the Magento Stammtisch Meetup Berlin in the office of brandung. Here a small summary of the event.

Magento Stammtisch Meetup Berlin - September 2017

Continue reading ...

Persistent directories for one-way Docker containers

One-way bottles in germany will be thrown in the garbage after usage. Some Docker containers will be removed or destroyed after execution. But especially for some dependency management tools or task runners it can be nice to have a persistent directory. We can achieve that with the parameter --volumes-from and a busybox. I will show the usage on a Docker container of Composer and Gradle, but the principle is easy to transfer for other building or management Docker containers.

Continue reading ...

Linux - Convert all Ogg files in a directory to MP3

I need to convert all Ogg Vorbis files in a directory to MP3. I will create a small bash script that uses avconv or FFmpeg to convert the audio files.

Continue reading ...

Run different php-cli versions with Docker

I am working on a small PHP library that should use some new features from PHP 7, for example scalar type declarations and return type declarations. But my current Debian 8 has only PHP 5.6.29 for me at the moment. The unstable distribution sid is no option to me and in general I try to avoid installing a specific PHP interpreter on my OS. Fortunately I need PHP only on the command line to test my library so I can use Docker to switch between the versions.

Continue reading ...

Linux - Bluetooth version of connected devices

I had the dream to connect a Wii Remote controller with my web browser. The possibilities are infinite, playing games in the browser for example. Luckily Wii Remote controllers are using Bluetooth for the connection and there is already a group of developers on a possibility to connect Bluetooth devices with the Chrome web browser. With the help of How to get Chrome Web Bluetooth working on Linux from Alan C. Assis I was just one step away from reading the acceleration data of the controller via JavaScript, but unfortunately Web Bluetooth needs Bluetooth 4.0 or above. So this post is just about detecting the Bluetooth version of device with Linux.

Continue reading ...

Local browser storage over many tabs

I just want to check how the localStorage of a browser behaves over many tabs.

Continue reading ...

Magento 2 email template translator directives

Magento 2 email templates are supposed to be translated sentence by sentence. This post shows how to use the translator directive.

Continue reading ...

Text differencing tool

A small tool to show the differences between two texts. Similar to the command git diff. I was motivated to write the algorithm on my own in JavaScript, but there already exists an excellent implementation by Kevin Decker that is called jsdiff.

Continue reading ...

Lesti_Fpc documentation version 1.4.5

Lesti_Fpc is internal full page cache for Magento. This Cache needs no varnish or any other extenal software and works with events. It is an internal cache and so it replaces dynamic blocks before sending response to customer. Here is little post that explains the workflow of Lesti_Fpc.

Continue reading ...

Magento2 extension development with Travis CI

If you have started developing a Magento2 shop with Composer you should have noticed that you will need some authentication keys. Alan Kent is explaining in his post Magento 2 and Composer Authentication why Magento thinks this is necessary. It doesn't make much sense to me why it is necessary also to store the open source extensions and modules in a protected repository, but I guess Magento is a control freak.

This protection is really a problem for maintaining open source extensions with Composer in a public continous integration. Today I would like to show how to use Travis CI for open source extensions with the password protected repository repo.magento.com from Magento2.

Continue reading ...

Linux user management commands

This post will contain a list of common unix commands for user management that I didn't use that often, but that are pretty common for others. And just to prevent me from searching again in the web I will collect them here for myself.

Continue reading ...

Meet Magento 2015 Netherlands

I had the honor to give a talk about Recommender Systems at the Meet Magento NL 2015. It was an exciting event and I have met many interesting people.

Continue reading ...

Magento Unconference 2015 Summary

From the 7th to the 8th March 2015 was the Magento Unconference 2015 #mageuc15. Unfortunately I have missed the pre-party at Friday, but I heard it was quite funny. I have been arrived at Saturday morning. Every participant had the opportunity to suggest a topic that he is interested in. It was a cool mix, for example Avoiding Burnout, Magento Search or Module testing. Sometimes it was a presentation, sometimes a discussion or a mix of both. It was a real community event.

Continue reading ...

Vagrant Warning: Connection timeout

Second time that I run into the same issue with Vagrant. If you get a connection timeout warning like the following after vagrant up, this can have various reasons.

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...

Continue reading ...