Programming? Aren’t 80% of the articles programming related? Well, yes. However, there are some that are really related to programming style, best practices, etc or ones that we couldn’t place anywhere else.
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. If you’re looking for professional Magento web design services, feel free to check out our Magento Web Design Service for more information. 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
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
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
Magento by default comes with a few basic product sorting options such as sorting by product position, name or price. In this article you’ll learn how to sort products by how many times they have been sold. Read more
At one point or another, you might want to implement a payment method with credit card types that are not implemented in Magento by default. Read more
Please note that in this article you’ll learn how to add a new credit card type and validate it only. This article does not cover the whole payment module creation.
In a development process, you often need some testing data you can use. Magento supplies you with it’s default Sample Data that contains some products. Thing is, they’re not of much use if you have some custom attributes added to your products, if you create your own attribute set, or a product type. Read more
Us developers love adding things programmatically. Even though you can create a new customer through a signup form, or via admin interface, in some cases, that might take too long.
If you need a bunch of customers assigned to different groups, from different countries, you might be better off doing this from the code. Read more
It was pointed out to me in one of the preceding articles that getting a product’s URL in a different store can get pretty complicated if the URL you want to get is rewritten. I decided to come up with a solution to that problem, as it could be useful in the future.
I came up with a method that returns a rewritten part (i.e. after rewrite) of a product’s URL. You’ll need to add base URL of a store to this return value to get a full URL (as shown on languages.phtml example). Read more
Editing products and changing their position in categories can be quite a task. This is especially true when you have a large number of products to edit or arrange, and some of them are very similar.
Sure, you could differentiate them by SKU, ID, price, or something else. But wouldn’t it be great if you had a thumbnail of each product in grid? Read more
Magento has its top menu reserved for category navigation. It’s pretty solid for displaying categories, even when there is a large number of them.
What some of the clients want is a vertical (sidebar) category menu, so they can display sibling categories of a category their customers are exploring.
In this article we’ll cover the creation of a full vertical menu. We’ll go 3 levels deep: category, subcategory, and sub-subcategory. You can always expand on this, but I believe 3 levels are more than enough for most stores. Read more
Magento’s default catalog search can be a powerful tool. It’s versatility is something every customer can appreciate.
One of the coolest features of the built-in advanced search is the ability to search by attributes assigned to a product. But what if your client’s plans for search are a bit different, and advanced search is too cluttered for his or her needs?
Let’s say your client wants his customers to be able to search by brand or SKU, with all other fields removed from the search, and wishes for custom URL for each one of those search types. Read more
We all know how great Magento grids can be – there is no alternative when it comes to displaying data in a efficient manner.
Our clients sometimes (almost always) have specific requirements when it comes to Magento. One of them had a request to be able to filter the order grid by multiple order ID’s.
This can be useful if you have a number of orders you’d like to track – filtering them one by one can be tedious and time-consuming task. Read more
Reviews are another one of numerous excellent features in Magento. Usage of reviews can increase visitors’ trust in your brand, which, in return boosts your sales by a significant amount.
Sometimes there is a need for showing star ratings outside the products’ review page. That’s what I’ll be addressing with this article. Read more
Dropdown login forms are not a feature many online stores use, but in some cases they could be quite useful UX feature. In this tutorial, I will explain how to create such a dropdown in a few minutes! Read more
Building your own Magento modules (extensions) can be a tedious task. We always strive to develop everything ‘the Magento way’, which is why we frequently dig into the core to see how Magento’s Core team does things. Once in a while, we stumble upon useful features we think are useful and share them with you. One of such features is Magento’s notification system. Read more
Some clients have a need to show product on sale on homepage, or, sometimes, to filter products on sale in each category individually. In this post i’ll show you two ways of listing products on sale:
- On CMS page as a list
- By using a filter in category view
Let’s get to it! Read more
If you are developing in Magento, sooner or alter you will need to obtain some information from database. This article will show you how to retrieve almost anything using getModel, getData and getter methods in general. Read more
Howdy! Recently I was in doubt about how to add custom Magento Block for my client’s requirements. One approach was to deal with it through .xml file, but when I was thinking about it I asked myself: “ Why add another .xml and load it?” And at this point, I decided to go with programmatic method. Read more
Testing can be boring and time consuming task. So why don’t we use some tools and make our lives easier? In Magento there are numerous “boring” tasks that need to be done after the first install and then again when you test a new functionality. For example, create a test account, add product to cart, go trough checkout process, add product to wishlist, compare etc. Read more
There are times when it’s necessary to access Magento system from outside Magento. A way to do this is using PHP shell script that bootstraps Magento. An average PHP developer would just go to Magento root directory to create Magento bootstrap file with it’s own code at the bottom. As you’ve probably guessed, there are two ways to bootstrap Magento, regular way and Magento way. In this article I’ll provide an overview of Magento way of creating PHP shell scripts. Read more
Currently there are three types of product relations in Magento: Up-sells, Related Products, and Cross-sell Products. Recently while discussing client’s requirements, we’ve come to conclusion it would serve our purpose best to link products in the same way Magento does, and then use our own relations independently of Magento’s built in product relations. In this article I’ll show you how to add custom product relations as addition to existing Magento product relations. Read more
There is no project that uses framework as is. Every now and then there is a need to change something, to add something new or to override something already written. Due to many reasons it’s a bad habit and bad programming if core files are modified and it’s not recommended at all. Therefore Magento brought in an excellent way how to override/overwrite those files. Read more
Every HTTP request in Magento results with a few layout handles which can be used to customize layout of desired pages. If you ever tried to dump layout handles in Magento, you would see many of them. These handles are calculated differently, based on different variables. Read more