Programming

Sort products by sold quantity in Magento

Sort products by sold quantity in Magento

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

Programmatically (manually) creating simple Magento product

Programmatically (manually) creating simple Magento product

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

Get the current customer role in Magento

Get the current customer role in Magento

Looking at the old articles on our website that long for a rewrite, I sometimes stumble upon a gem that can be useful. One of those is the piece of code enables us to do custom stuff if our customer is assigned to a certain customer group.

Read more

Programmatically adding new customers to the Magento store

Programmatically adding new customers to the Magento store

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

Get rewritten product url in a different store

Get rewritten product url in a different store

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

Show product thumbnail in grids

Show product thumbnail in grids

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

Implement rel alternate links in Magento

Implement rel alternate links in Magento

With the rise of E-commerce, selling goods to customers around the globe became easier than ever before. Internet has no borders, and anyone can ‘walk into your store’ whilst being in comfort of his own home.

An increasing need for multilingual stores has appeared. You might want your customers to be able to browse your store in their own language.

Read more

Custom category menu navigation in Magento

Custom category menu navigation in Magento

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

Advanced search in Magento and how to use it in your own way

Advanced search in Magento and how to use it in your own way

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

Filter order grid by multiple ID’s

Filter order grid by multiple ID’s

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

Display product’s rating beyond the review page

Display product’s rating beyond the review page

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

Utilizing Magento notification system

notifications-featured

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