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.
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());
The Welcome Message in Magento 1.7 is a problem for Lesti_Fpc. You can find the reason in app/design/frontend/base/default/template/page/html/header.phtml.
<!-- ... -->
<p class="welcome-msg"><?php echo $this->getWelcome() ?> <?php echo $this->getAdditionalHtml() ?></p>
<!-- ... -->
The welcome message is just a function of the header block. Lesti_Fpc needs the welcome message in a seperated block. In Magento 1.8 this is solved and the name of the block is welcome. In Magento 1.7 there is a semi-solution in core, we just have to give a little help.
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.
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.
It can be quite comfortable to use configuration values in Magento 2 email templates. Let us assume we change our store phone number in the configurations and it changes also in templates where we use sentences like: You can call us any time at .... I will show pretty fast in this post how to use the restricted list of configs in email templates and will explain ways to add your own configuration paths.
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.
On my Wordpress blog I had a page for donations. It didn't happend that often, but when somebody wanted to spend some money for my small open source projects I always send a link to a page like this. A list of awesome software projects that I use every day. All these projects need some money or help. The donation page doesn't exist anymore, so I have created this small post that will be updated from time to time.
Lesti_Fpc has changed in the last month. Some of the changes are part of the code quality. Today I would like to present the tools, that I use to raise the quality of my Magento extension.
There are two logical directives that can be used in Magento 2 email templates. The depend
and the
if
directives. I will explain both in this post.
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.
I am running the ownCloud desktop client 2.2.3 for Debian 8, jessie. Since a while the client shows me that version 2.3.1 is available, but unfortunately did I get the following error if I want to update the client.
I always wanted to create a font out of my handwritten letters and in this small tutorial I will show you the way I have done it with the help of FontForge, Inkscape and GIMP.
I try to avoid installing specific versions of programming language interpreters and compilers on my operating system. Project A has other requirements as project B or C and the software stack on my operating system gets more and more confusing. Luckily is it possible to run the most command line based things in a Docker container. I will try to compile and run a small Java program in a Docker container.
If you are developing a website on Linux or Mac you may want to check the behavior of the website in Windows with the Internet Explorer or with the latest Microsoft Edge web browser. I am developing the most projects local in a Docker container, a Vagrant box or for example on a local Apache server. Sometimes also with the build in webserver of PHP or grunt-contrib-connect. The type of local webserver is not that important, more important is the fact that the webserver is not reachable from outside. Developing on my Linux machine and switching to an Windows machine in my network to check the behavior of the website is no option as workflow. Luckily is Microsoft providing Free Virtual Machines from IE8 to MS Edge.
I am a little bit interested in the possibilities of reading audio input from the web browser. So I have written a small audio noise filter based on frame wise speech / non-speech classifcation a few days ago. This filter was based on the research of the paper Quantile based noise estimation for spectral subtraction and Wiener filtering. The paper contains also an other approach, a quantile based noise spectrum estimation.
A few days ago I have written a small post about Reading Web Audio API with JavaScript. But no matter how silent I am acting on my working place, my computer is always producing the following noise.
I will try to create a small lightweight noise spectrum estimation and elimination filter in JavaScript that is based on the research of Quantile based noise estimation for spectral subtraction and Wiener filtering.
I have read Visualizations with Web Audio API and just wanted to check on my own if I can build a small working example that can read the audio input from the Web Audio API.
Pencil is a pretty nice open-source GUI prototyping tool. The only little problem for Debian user is, Pencil depends on Firefox and not on Iceweasel. If you want to bypass that problem very easy, you can download pencil as Firefox Extension. But if you want to use Pencil as native application you have to download the deb package and will see, that it depends on Firefox. Iceweasel and Firefox are the same things, but have different names.
Here is a Wikipedia articel about Mozilla Corporation software rebranded by the Debian project.You can run dpkg also with --ignore-depends=firefox, but that isn't a very good solution.
I recorded some old VHS tapes to digitize them to video movies and burn them on DVDs. Sadly the audio had a shift or drift of around one and a half second over the one hour video. Here a small solution to fix this problem with the help of Kdenlive and FFmpeg.
I like to use
Gradle as building
tool for my Java Open JDK projects.
Unfortunately is there no official image available on
Docker Hub.
That is why I started to build my own Gradle image.
I have started development of a
code folding plugin
for Prism syntax highlighting. The
comment
by Lea Verou
showed me that the details
and summary
tags combined with the
Keep markup plugin are a
more comfortable solution.
I'm starting to digitize many of my old tapes and vinyls. The final result should be my own multimedia center on a Raspberry Pi. Also important for me are my old DVDs. Today I would like to show, how to rip a DVD on Linux with HandBrake.
Two weeks ago, I did get my first bad review on magento connect. The review was for the extension Lesti::Smtp. I can't say how frustrating it was for me. I guess I'm able to take criticism and I know it looks very childish to write a post about it, but I just want say my oppinion about it. Here can you see the review of digisiil.
I didn't like to install special versions of JavaScript libraries globally on my operating system. The same for npm and Grunt. So I need to create small Docker image that fits my needs for development.
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.
Instead of just
including a block
into an email template, Magento makes it possible to load a hole tree of blocks or just in other words a layout.
Here a small post about the the layout
directive in Magento 2 email templates with source code examples
from Magento.
Sometimes tools are that awesome that you just want to spread the word. I guess I should do that more often. One fantastic tool is sitespeed.io. Sitespeed.io is a set of open source tools that will help you to analyze your website and gives you helpful advices to make your website faster.
Markers of a stroke have one problem in Inkscape,
they are always black. Here a small example of a unfilled shape with red Stroke paint, a DotL
as
Start Markers and a Arrow2Lend
as End Markers.
I would like to show three ways to turn the markers red.
I have some old compact cassettes or tapes that I would like to digitize before time is destroying the quality completely. I will document the digitization with this post.
In sommer 2015 I have visited the seminar Intelligent Software Systems at the TU Berlin. My topic was Fast Nearest Neighbour Classification. This post contains the results of the presentation and the term paper. Everything is open source and can be accessed on GitHub.
Debian Linux Vagrant VirtualBox
This is the third and last post of this series.
beastmaker Climbing Motherboard
As I bought my beastmaker Motherboard setup I was a bit upset. I did expect from the Motherboard and Grippy App somekind of digital tools to test my finger grip strength and improve it by a training plan or workout. The part with the workouts was fine. There existed a few predefined by big names of the climbing community and there was the possibility to add your owns. Unfortunately there didn't exist precise finger strengths tests as you may know them from Lattice Trainging for example. Until I opened the Grippy App yesterday.
In the following post I want to present my adjustable home climbing wall. It may help other people by decision making, but it won't cover construction plans or similar. Everything just for boast.
A small tutorial to document my steps with FreeCAD to construct a simple wooden climbing foothold.
Kali Linux is a cool Linux distribution with a lot of security tools preinstalled. To run those security tools agains a local webserver for example it would be nice and handsome as VirtualBox. Offensive VirtualBox images are also available at offensive-security.com, but creating your own custom image is also pretty easy.
KaTeX is a JavaScript library to render mathematic expressions in your web browser. Similar to MathJax it is able to use TeX as input.
LaTeX is the software that I prefer for creating presentation slides or small documents with technical and mathematical background. From time to time it is necessary to show code with highlighting in LaTeX documents. Sometimes also for less popular programming languages or file formats.
I need to change the size of a PGFPlots tikzpicture in my LaTeX document. There are two different things, scaling the graphic to the full or half width for example and changing the aspect ratio of a graphic.
My main resource to create tikzpicture
graphics in PDF files generated via
LaTeX is the
PGFPlots Gallery. But I guess
there are more than 400 examples on this page. Here a minimal example for a
PGFPlots function
visualisation with data loaded from an dat
file.
Grunt JavaScript QUnit Testing
Writing testable JavaScript code is in my eyes sometimes more complex as writing testable code in other programming
languages. JavaScript has it roots in the web development and the normal environment for JavaScript code was the
web browser. There was always the global document
object.
Node.js has changed this assumption.
I just want to check how the localStorage of a browser behaves over many tabs.
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
.
Today I come across the website of
PaperHive with my Android
phone and the tab in the chrome browser was blue instead of gray. I wanted the same for my website in green. I
checked the HTML source of the website and found the responsible meta
tag.
The title is maybe a little bit confusing, better would be maybe child template directives. This post
explains how to include a child template in a Magento email template. Pretty popular examples are
Magento_Email::email/footer.html
and Magento_Email::email/header.html
.
Magento 2 email templates are supposed to be translated sentence by sentence. This post shows how to use the translator directive.
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.
The artist Lesti (not me) will give his first exhibition with the title Wer-nie-sah, der kann doch fühlen in Berlin Neukölln.
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.
My new ZTE Open C arrived and I just wanted to share some pictures. The last 3 month I used the Alcatel One Touch Fire and it's a difference, like night and day. I have ordered it over the german ebay-shop of zte and I'm happy about my new 85€ smartphone.
The current Magento2 version is 2.0.0.0-dev45 and I would like to build a simple HelloWorld! extension. I guess the current version isn't that different to Magento1 and maybe it doesn't make that much sense to write this right now, but I just want to show the little difference in this moment.
I stared the repository of magento2 since 1 year, but I never did take a look at it. Today I wan't to change this. My current status is commit a15ecb31976feb4ecb62f85257ff6b606fbdbc00. Maybe in a few weeks all of my post isn't the latest. Let's install magento2.
In the first post I wrote a little summary of the vagrant Getting Started Documentation. But the only thing that has been working was a apache. And for my project I need also mysql and php. I did take a look at a repository of Danilo Braband who made a very cool Magento Skeleton with vagrant, n98 and composer. If you are a magento developer, take a look at it.