Close

     

Our Blog

How to add custom layout handle to category in Magento 2

December 6, 2018 // by Burlacu Vasilii

Disclaimer:

This post assumes the reader is familiar with Magento 2 modules and how they work. If not, it is highly recommended to read the documentation first. All files mentioned below must be placed inside a module.

TL;DR

In order to add a custom layout handle to category page, a (basic) Magento 2 module with these additional files and their content is needed:

1. The events.xml file to “subscribe” to the event and say which observer should be fired
2. An observer that adds a new layout handle to the page
3. A layout file that adds needed changes to the page

Comments (0)

Session depersonalization in Magento 2, why and how?

September 27, 2018 // by Dmytro Cheshun

Most likely, at least once you faced the issue when customer session does not work except an account page etc. And usually, it’s not obvious why. Is it a bug? No, actually that is the case when it’s not a bug, it’s kind of feature.

Comments (0)

How to add the details for cart item in Magento 2

June 4, 2018 // by Dmytro Cheshun

In this blog post, I would like to share a pretty interesting and not obvious solution on how to join some additional details to cart item block on checkout cart page.

Let’s say we need to add the “Brand” custom product attribute and show its value within a specific block on the product view page and checkout cart page. It’s very simple in the scope of the product page, but how to deal with number cart items on checkout cart page. There are a couple of issues which you may face with. We will cover them further.

Comments (0)

Alternative way of adding tabs to the Magento product page

October 15, 2014 // by Yaroslav Rogoza

In our previous article we have discussed how to add tabs to the product page. After Magento 1.9 has been released people started asking how to handle the product page tabs since the previous method caused different troubles. The reason is in the modern RWD theme, which goes out of the box with Magento 1.9. It uses slightly different method for adding tabs than in the previous versions. So, let’s review how you can easily add own tabs on the product page for RWD-based themes in Magento CE 1.9.

Comments (11)

Prevent JS and CSS caching during deployment

April 25, 2013 // by Nick Kravchuk

Hi guys, as you know, while moving changes to the production server very often we need to flush CSS or JS cache on the client’s side, as without this action clients will see broken design or, in case with JS cache, might get broken functionality. Therefore, we guess it is a good idea to describe how to prevent JS/CSS caching.

Comments (1)

How to insert your block into any place in Magento

March 5, 2013 // by Nick Kravchuk

Hello guys, it’s time to tell you how to insert block into any place you want in Magento. As you know, very often we need to set some block into selected weird place without editing template, so we’ll try to describe the way how to do this using layouts and observers.

Comments (14)

Advices and Best Practices for Magento developers

September 10, 2012 // by Yaroslav Rogoza

I think everyone who is interested in ecommerce development get familiar with Magento earlier or later. It’s a very popular platform, where a lot of modern programming technologies are used. Since Magento is one of the most powerful and flexible shopping cart engines, it requires a deep level of expertise to develop extensions or even do some basic changes. So we’ve decided to share our tips for Magento Developers in this article. [Continue to Part 2]

Comments (11)

Magento customer group layout handle

June 27, 2012 // by Alexander Turiak

It is a good idea to create a new layout handle in Magento when we need to be able to easily customize styling of pages or enable/disable specific blocks for the customer groups. Here is how.

Comments (5)

AJAX requests in Magento

October 21, 2011 // by Nick Kravchuk

AJAX is a great technology that is used to improve user experience and avoid page reloads, but how can you use it in your own Magento modules? Let’s explore…

1) You should either create a controller, for example: Namespace/YourModule/controllers/AjaxController.php or create a new action in an existing controller

Comments (10)