If you have ever worked in a team or in any other way had to maintain others people code, you already know how important is to write maintainable code. Actually, this doesn’t need to be others people code at all – if you are trying to modify your year-old-code, you may already forgot all the details around it and it may be hard for you to read it, let alone modify it. Read more
Our design team switched to working in Sketch a while ago but it wasn’t until version 43 we really started seeing some opportunities to change our workflows more significantly. It was also an opportunity for more designers to work on the same project as well as collaborate with developers more easily. Read more
Session is something that PHP developers use in their everyday work. But how many of you did took some time to actually consider where are they stored and how does that impact your application? Should you even care? Does number of sessions influence performance of your application? Read more
In this article I will primary cover where minimization should be implemented, since writing a full code for dependable minifier is not a small task. Read more
If you are starting with Magento, just like I am, you might run into the issue of adding pagination to your table, list of products or anything else you want to list on frontend. Magento allows you to create your own pagination with adjustable built-in options. This tutorial will show you how to create pagination for a custom collection in Magento. Read more
I think that writing any non-trivial software without introducing bugs is close to impossible. World is complex, data used in programs is complex, handling all possible interactions of our code with said data is hard. Read more
When running a web shop there is always need to somehow keep your customers posted with the new information. It can be done in different ways, but using push notifications seems like a pretty neat and convenient way to do it. This technology has been around for some time now but unlike mobile apps, there aren’t many websites that actually utilize it. There’s probably not enough buzz about it out there and to be honest, for certain channels, the technology is not quite ready yet in terms of development. Nevertheless, let’s check it out. Read more
While Magento offers a lot of power when you want to customize category pages and their impressions on your users, there are still some options that are not provided but would come in handy. One common desire is to promote expensive products and ability to reverse sort direction of products in category is a simple way to achieve that.
Functionality like that will require some custom coding, but no fear – it is rather straightforward. 🙂 Read more
Prerequisites: Magento module creation, setup scripts, block rewrites.
Don’t do it. Just, simply, never write a database query inside a loop. Ever. Put in a little bit of effort and write code that will insert or read all data in one big batch, or at least group big chunks of data in the smallest possible number of queries. That’s it. Move on. These aren’t the droids you’re looking for. Read more
As promised, we prepared something that will spice up your holidays better than Christmas decorations and mulled wine. In this article you can find our open-source compatibility extension for Magento and PHP 7 (yes, you read that right!) as well as some of the experiences and performance tests. Read more
While working on a project, I had to add a unique static block between header and main content of the CMS page on each CMS page. Element had to be fully customizable via Magento admin panel and it had to be easy to create on new CMS pages, easily modifiable and removable. Since that element needed to be placed outside of the main content, it couldn’t have been added using CMS in Magento admin. It had to be added using Magento layouts. Here’s how I achieved that. Read more
UPDATE: The issue described in the following text has been taken care of in Magento EE 1.14 / CE 1.9
Recently, a pretty strange issue occurred on one of our projects. Our client reported that when trying to assign products to a category, only a thousand of products got saved while the other ones were ignored. To deal with this issue, I decided to jump to the category save action and check for any problems with the code that may cause this behaviour. Read more
Magento EAV (Entity Attribute Value) data model is used to get flexibility for your data, but it brings more complexity than relation table model. If you need data model that will have flexible attributes which can be dynamically added, for example from Magento admin panel, then EAV is the best solution for you. If using EAV, you don’t need to change table structure for every new attribute like you do on flat tables (creating new colums). Read more
If this was a series of articles, this would be the third one. If you previously read my articles on simple and configurable product creation in Magento, you already know the basics.
In this article we’ll expand our knowledge and learn how to create a bundle of products programmatically in Magento. Read more
I already wrote about creating a simple product programmatically in Magento. For configurable product, however, things get a little bit complicated.
As you already know, a configurable product is merely a product with simple products that differ in some option (attribute) assigned to itself.
We can use this conclusion to extend our code for creation of simple products to work with configurable. Read more